Assume that the registers
have the following initial
values (all numbers in hex)
Reg
Value
AX
1111
BX
2222
CX
3333
DX
4444
Assume that we execute
the following code
PUSH AX
PUSH CX
PUSH BX
POP AX
PUSH DX
POP CX
POP BX
PUSH CX
PUSH DX
PUSH AX
Draw a picture of the stack after executing the code.
Show the hex values of each element on the stack.
Indicate the location of the top of the stack.
Indicate the memory location of each stack element, relative to SP
(8 pts)
What are the values of the registers after executing the code ?
(8 pts)
Reg
Value
AX
BX
CX
DX
Suppose we write a very short routine which will be used throughout
a program. Describe the difference between implementing this routine
as a MACRO and implementing it as a procedure.