CS401 CH 14
CS401 CH 14
call far
ret far
Other Stack operations
SP 9FFE
AX 2000
push
Pop
int
iret 00 20 -SP
00 00
Push and Pop
Other Stack operations
SP A000
AX 2000
push
Pop
int
iret 00 20
00 00 -SP
push
push decrements SP (the stack pointer)
by two and then transfers a word from
source operand from top of stack now
pointed by SP.
push often is used to place parameters
on the stack before calling a
procedure; more generally, it is the
basic means of storing temporary data
on stack.
Flags affected: NONE
push ax
push cs
pop
pop transfers the word at the current
top of stack (pointed to by SP) to the
destination operand and then
increments SP bt two to point to the
new top of stack.
pop can be used to move temporary
variables from the stack to registers
or memory.
Flags affected: NONE
pop ax
pop cs
call