SPLat Logo

mEQU Directive

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

mEQU Directive

The mEQU directive is a special variant of the EQU directive intended for defining RAM (data memory) locations.

There are two forms of the mEQU directive:

"Classic form"

Example:

Counter:     mEQU    27

In this form the label Counter is defined to have the numeric value 27, so any subsequent use of Counter as an instruction argument will substitute the number 27.

"Extended form"

Example:

Counter:     mEQU    27,6

In this form there is a second optional argument, '6'. The label Counter is defined to have the numeric value 27 and 6 bytes of RAM will be reserved (and hence not available for automatic RAM allocation.)

The "classic" form, i.e. with the optional second argument omitted, will reserve 4 bytes of RAM by default (corresponding to a floating point variable).

Using mEQU is called manual RAM allocation. You work out exactly where you want your RAM variables to be located. Note that it is perfectly legal to overlap the RAM addresses and blocks declared in mEQU directives and SPLat/PC will not raise any errors. However, you should do that only if you understand the ramifications of having several variables share the same RAM.

As an aid to debugging mEQU adds label information to the SPLat/PC Data Memory window. As you move the mouse across the memory locations the corresponding labels will appear in the title bar of the window, providing SPLat/PC has scanned the program line (as will be the case during simulation or single stepping).