Samsung S3C9228/P9228, 8-Bit CMOS Microcontroller user manual Push SYM

Models: S3C9228/P9228 8-Bit CMOS Microcontroller

1 462
Download 462 pages 42.12 Kb
Page 260
Image 260

ADDRESS SPACES

S3C9228/P9228

 

 

+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

SP,#0B8H

;

SP B8H (Normally, the SP is set to 0B8H by the

 

 

;

initialization routine)

 

 

 

 

 

 

 

 

 

PUSH

SYM

;

Stack address 0B7H SYM

PUSH

WTCON

;

Stack address 0B6H WTCON

PUSH

20H

;

Stack address 0B5H 20H

PUSH

R3

;

Stack address 0B4H R3

 

 

 

 

 

 

 

 

 

POP

R3

;

R3 Stack address 0B4H

POP

20H

;

20H Stack address 0B5H

POP

WTCON

;

WTCON Stack address 0B6H

POP

SYM

;

SYM Stack address 0B7H

2-6

Page 260
Image 260
Samsung S3C9228/P9228, 8-Bit CMOS Microcontroller user manual Push SYM