Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(1) 1000 11F8 (2) 1000 11FC (3) 1000 11F4 (4) 1000 1200 (5) 1000 11FC (6) 1000 1

ID: 3740659 • Letter: #

Question

       (1) 1000 11F8  
(2) 1000 11FC    
(3) 1000 11F4   
(4) 1000 1200   
(5) 1000 11FC
(6) 1000 11F8

       (1) 1000 11FC  
(2) 1000 11F8    
(3) 1000 1200   
(4) 1000 11F4   
(5) 1000 11FC
(6) 1000 11F8

       (1) 1000 11F8  
(2) 1000 11FC    
(3) 1000 11F4   
(4) 1000 1200   
(5) 1000 11F8
(6) 1000 11FC

       (1) 1000 11FC
(2) 1000 11F4    
(3) 1000 1200  
(4) 1000 11F4  
(5) 1000 11F8
(6) 1000 11FC

       (1) 1000 11F8
(2) 1000 11FC    
(3) 1000 11F4   
(4) 1000 1200  
(5) 1000 11F8
(6) 1000 11FC

Consider the program below The initial value of the stack pointer ESP = 1000 1200. What is the value of the STACK POINTER (ESP) after the each CALL instruction and each RET instruction.

INCLUDE Irvine32.inc
.DATA
val1 DW 78h
val2 DW 40h
val3 DW 5Fh

.CODE
Main PROC

mov ax,val1
call proc1 (1) ESP=____________(AFTER the CALL) 11FC
exit
main ENDP

proc1 PROC ;Begin Procedure
nop   
call proc2 (2) ESP=___________(AFTER the CALL) 11F8
nop   
ret (3) ESP=____________(AFTER the RET) 1200
proc1 ENDP

proc2 PROC ;Begin Procedure
nop
call proc3 (4) ESP=___________(AFTER the CALL) 11F4
nop   
ret (5) ESP=___________(AFTER the RET) 11FC
proc2 ENDP

proc3 PROC ;Begin Procedure
nop   
nop   
ret (6) ESP=____________(AFTER the RET) 11F8
proc3 ENDP
END


(Points : 10)

Explanation / Answer

Answer :-----

(1) 1000 11F8  
(2) 1000 11FC    
(3) 1000 11F4   
(4) 1000 1200   
(5) 1000 11F8
(6) 1000 11FC