Push — Push To Stack - Samsung S3F84B8 User Manual

8-bit cmos
Hide thumbs Also See for S3F84B8:
Table of Contents

Advertisement

S3F84B8_UM_REV 1.00
6.3.52 PUSH — PUSH TO STACK
src
PUSH
SP  SP – 1
Operation:
@SP  src
A PUSH instruction decrements the stack pointer value and loads the contents of source (src) into
the location addressed by the decremented stack pointer. The operation then adds new value to
the top of stack.
No flags are affected.
Flags:
Format:
opc
Given register 40H = 4FH, register 4FH = 0AAH, SPH = 00H, and SPL = 00H:
Examples:
PUSH 40H
PUSH @40H 
In the first example, if the stack pointer contains the value 0000H, and general register 40H
contains 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 stack.
src
Register 40H = 4FH, stack register 0FFH = 4FH,
SPH = 0FFH, SPL = 0FFH
Register 40H = 4FH, register 4FH = 0AAH, stack register
0FFH = 0AAH, SPH = 0FFH, SPL = 0FFH
Bytes
Cycles
2
8 (internal clock)
8 (external clock)
8 (internal clock)
8 (external clock)
6-65
6 INSTRUCTION SET
Opcode
Addr Mode
(Hex)
dst
70
R
71
IR

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents