Push Push To Stack - Samsung S3C8275X User Manual

8-bit cmos microcontrollers
Table of Contents

Advertisement

INSTRUCTION SET
PUSH
— Push To Stack
PUSH
src
SP ← SP – 1
Operation:
@SP ← src
A PUSH instruction decrements the stack pointer value and loads the contents of the source (src)
into the location addressed by the decremented stack pointer. The operation then adds the new
value to the top of the stack.
Flags:
No flags are affected.
Format:
opc
Examples:
Given: Register 40H = 4FH, register 4FH = 0AAH, SPH = 00H, and SPL = 00H:
PUSH
PUSH
In the first example, if the stack pointer contains the value 0000H, and general register 40H the
value 4FH, the statement "PUSH 40H" decrements the stack pointer from 0000 to 0FFFFH. It
then loads the contents of register 40H into location 0FFFFH and adds this new value to the top
of the stack.
6-66
src
40H
Register 40H = 4FH, stack register 0FFH = 4FH,
SPH = 0FFH, SPL = 0FFH
@40H
Register 40H = 4FH, register 4FH = 0AAH, stack register
0FFH = 0AAH, SPH = 0FFH, SPL = 0FFH
S3C8275X/F8275X/C8278X/F8278X/C8274X/F8274X
Bytes
Cycles
2
8 (internal clock)
8 (external clock)
8 (internal clock)
8 (external clock)
Opcode
Addr Mode
(Hex)
dst
70
R
71
IR

Advertisement

Table of Contents
loading

This manual is also suitable for:

F8275xF8274xC8278xC8274xF8278x

Table of Contents