Addressing Mode
Addressing Mode
1.
2.
3.
4.
Register Addressing
Figure 33The effect of executing the MOV BX, CX instruction at the point
just before the BX register changes. Note that only the rightmost 16 bits of
register EBX change.
Immediate Addressing
Direct Addressing
Displacement Addressing
Base-Plus-Index Addressing
Similar to indirect addressing because it
indirectly addresses memory data.
This type of addressing uses one base
register (BP or BX) & one index register
(DI or SI) to indirectly address memory.
The base register often holds the
beginning location of a memory array.
the index register holds the relative
position
of an element in the array
Base Relative-Plus-Index
Addressing
Similar to base-plus-index addressing.
adds a displacement
uses a base register and an index register to
form the memory address
Scaled-Index Addressing
STACK MEMORY-ADDRESSING
MODES
The stack plays an important role in all
microprocessors.
holds data temporarily and stores return
addresses used by procedures
Figure 317The PUSH and POP instructions: (a) PUSH BX places the
contents of BX onto the stack; (b) POP CX removes data from the stack and
places them into CX. Both instructions are shown after execution.
SUMMARY
The MOV instruction copies the
contents of the source operand into
the destination operand.
The source never changes for any
instruction.
Register addressing specifies any 8-bit
register (AH, AL, BH, BL, CH, CL, DH,
or DL) or any 16-bit register (AX, BX,
CX, DX, SP, BP, SI, or DI).
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
(cont.
)
SUMMARY
The PUSHA and POPA instructions
transfer AX, CX, DX, BX, BP, SP, SI,
and DI between the stack and these
registers.
In 80386 and above, the extended
register and extended flags can also
be transferred between registers and
the stack.
A PUSHFD stores the EFLAGS, whereas
a PUSHF stores the FLAGS. POPA and
PUSHA are not available in 64-bit