Samsung S3P80C5 User Manual page 48

8-bit cmos microcontrollers
Table of Contents

Advertisement

S3P80C5/C80C5/C80C8
F F
PROGRAMMING TIP — Standard Stack Operations Using PUSH and POP
The 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
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
ADDRESS SPACES
2-19

Advertisement

Table of Contents
loading

This manual is also suitable for:

S3c80c5S3c80c8

Table of Contents