S3F84B8_UM_REV 1.00
Following example shows you how to perform stack operations in the internal register file using PUSH and POP
instructions.
LD
•
•
•
PUSH
PUSH
PUSH
PUSH
•
•
•
POP
POP
POP
POP
Example 2-4
Standard Stack Operations Using PUSH and POP
SPL,#0FFH
PP
RP0
RP1
R3
R3
RP1
RP0
PP
; SPL FFH
; (Normally, the SPL is set to 0FFH by the initialization
; routine)
; Stack address 0FEH PP
; Stack address 0FDH RP0
; Stack address 0FCH RP1
; Stack address 0FBH R3
; R3 Stack address 0FBH
; RP1 Stack address 0FCH
; RP0 Stack address 0FDH
; PP Stack address 0FEH
2-20
2 ADDRESS SPACES