Download Print this page

Samsung S3C8248 User Manual page 30

8-bit cmos

Advertisement

S3C8248/C8245/P8245/C8247/C8249/P8249
+ +
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

loading

This manual is also suitable for:

C8245P8245C8249C8247P8249