The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University, TAIWAN

8051 HANEL
REGISTER BANKS AND STACKPushing onto Stack

Example 2-8Show the stack and stack pointer from the following. Assume the default stack area.
MOV R6, #25HMOV R1, #12HMOV R4, #0F3HPUSH 6PUSH 1PUSH 4
Solution:


F3 12 25
After PUSH 40B 0A 09 08 SP = 0A

SP = 09

SP = 08

Start SP = 07

25
08
25
08

08

12
09

09

09

0A

0A

0A

0B

0B

0B

After PUSH 1

After PUSH 6
Free download pdf