<<< | Index | Address Displacements >>> |
Like direct memory operands, indirect memory operands specify the contents of a given address.
However, the processor calculates the address at run time by referring to the contents of registers.
Since values in the registers can change at run time, indirect memory operands provide dynamic access to memory.
Indirect memory operands make possible run-time operations such as pointer indirection and dynamic indexing of array elements, including indexing of multidimensional arrays.
For example, the following instruction moves into AX the word value found at the address in DS:BX.
mov ax, WORD PTR [bx]
where
WORD specifies the data size
PTR re-casts memory location pointed by [BX] into the WORD-sized value.
When you specify more than one register, the processor adds the contents of the two addresses together to determine the effective address (the address of the data to operate on):
mov ax, [bx+si]
<<< | Index | Address Displacements >>> |