<<< ADDR and OFFSET | Index | Plus, Minus, and Index >>> |
A direct memory operand specifies the data at a given address.
The instruction acts on the contents of the address, not the address itself.
Except when size is implied by another operand, you must specify the size of a direct memory operand so the instruction accesses the correct amount of memory.
The following example shows how to explicitly specify data size with the BYTE directive:
.DATA? ; Segment for uninitialized data var BYTE ? ; Reserve one byte, labeled "var" .CODE . . . mov var, al ; Copy AL to byte at var
Any location in memory can be a direct memory operand as long as a size is specified (or implied) and the location is fixed.
The data at the address can change, but the address cannot.
By default, instructions that use direct memory addressing use the DS register.
<<< ADDR and OFFSET | Index | Plus, Minus, and Index >>> |