Maxim Integrated DS4830A Optical Microcontroller User Manual
Page 219
DS4830A User’s Guide
219
PUSH src
Push Word to the Stack
Description:
Increments the stack pointer (SP) and pushes a single word specified by src to the stack
(@SP).
Status Flags:
None
Operation:
SP
++SP
Encoding:
15
0
f000
1101
ssss
ssss
Example(s):
PUSH GR
; GR=0F3Fh
PUSH #40h
Stack Data:
xxxxh
0040h
SP (after PUSH #40h)
0F3Fh
SP (after PUSH GR)
xxxxh
SP (initial)
xxxxh
RET
Return from Subroutine
Description:
RET pops a single word from the stack (@SP) into the Instruction Pointer (IP) and
decrements the stack pointer (SP). The decremented SP is saved as the new stack pointer
(SP).
Status Flags:
None
Operation:
IP
@ SP--
Encoding:
15
0
1000
1100
0000
1101
Example(s):
RET
Code Execution:
Addr (IP)
Opcode
0311h
…
0312h
RET
0103h
…
Stack Data:
xxxxh
xxxxh
0103h
SP (before RET)
xxxxh
SP (after RET)
xxxxh