<<< Multiple Address Displacements | Index | Indirect Syntax Options >>> |
You must give the size of an indirect memory operand in one of three ways:
By the variable's declared size
With the PTR operator (which acts similar to C-style cast)
Implied by the size of the other operand.
The following lines illustrate all three methods, assuming the size of the table array is WORD, as declared earlier.
table WORD 100 DUP (0) . . . mov table[bx], 0 ; 2 bytes - from size of table mov BYTE PTR table, 0 ; 1 byte - specified by BYTE mov ax, [bx] ; 2 bytes - implied by AX
<<< Multiple Address Displacements | Index | Indirect Syntax Options >>> |