Dabs Directive

The DABS directive allows one or more bytes of memory to be reserved at the specified address. The general form of the directive is:

DABS memorySpace, address, bytes [,symbol]

where memorySpace is a number representing the memory space in which the reservation will take place, address is the address at which the reservation will take place and bytes is the number of bytes that is to be reserved. The symbol is optional and refers to the name of the object at the address.

Use of symbol in the directive will aid debugging. The symbol is automatically made globally accessible and is equated to the address specified in the directive. For example, the following directive:

DABS 1,0x100,4,foo

is identical to the following directives:

GLOBAL foo
foo EQU 0x100
DABS 1,0x100,4

This directive differs to the DS directive in that it can be used to reserve memory at any location, not just within the current psect. Indeed, these directives can be placed anywhere in the assembly code and do not contribute to the currently selected psect in any way.

The memory space number is the same as the number specified with the space flag option to psects (see Space Flag).

The linker reads this DABS-related information from object files and ensures that the reserved addresses are not used for other memory placement.