Chapter 14 Flashcards
What is stack
It is a Last in First Out structure
Push and pop works on top most element in stack. True or False
True
What is stack pointer
In stack, the most top element’s memory address is stored in stack pointer (SP).
What are 2 types of stack
- Incrementing stack
- Decreminting stack
What stack is used in ias88
Decrementing stack
What is call far
It allow us to call from one code segment to another code segment. It is inter segment call
What is the difference between car near and call far
in call far segment and offset both are used and in car near only offset is used
What is ret far
It is return instruction for far, same as call far and use both segment and offset.
What is exchange
it swaps but one argument should be in register and one argument should be in memory or register.
Does push do decrements and pop do increment
Yes
What is call near
It is intra segment call
What are types of call
- direct call
- indirect call
What happened in intra segment direct call
For an intra segment direct call, SP is decremented by two and IP is pushed on to stack
What happened in inter segment direct call
For an inter segment direct call, SP is decremented by 2 and CS is pushed onto stack.
What ret do
ret (return) transfers control from a procedure back to instruction. It increment SP by two.