Stack Memory Addressing Mode
Stack is
special purpose memory area reserved for interrupt related operations. It is
used to hold data & return addresses in case of procedures. The stack
memory is LIFO (last in first out). The data are stores stack using PUSH
instruction and removed using instruction. The CALL instruction also uses stack
memory to hold return address for procedure and a RET instruction to remove the
return address as from the stack.
Two registers stack segment register (SS) &
stack pointer (SP) are used to store base & offset address for stack
memory. (When a word (16 –bit data)) is pushed on stack the higher order 8086
bits are stored on memory location pointed SP-1. The low order 8086 bits are
stored on memory location pointed by SP-2. It means one PUSH operation SP is
decremented by 2. Similarly when data is popped (read) from store SP is
incremented by 2.
Example,
PUSH DS
PUSH F (FLAG REGISTER)
POP BX
0 Comments