Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN8051 HANEL
REGISTER BANKS AND STACKStack And Bank 1 Conflict(cont’)Example 2-10Examining the stack, show the contents of the register and SP after execution of the following instructions. All value are in hex.
MOV SP, #5FH ;make RAM location 60H ;first stack locationMOV R2, #25HMOV R1, #12HMOV R4, #0F3HPUSH 2PUSH 1PUSH 4
Solution:F3 12 25
After PUSH 4 63 62 61 60 SP = 62SP = 61SP = 60Start SP = 5F25
60
25
606012
616161626262636363After PUSH 1After PUSH 2