8XC251SA, SB, SP, SQ USER’S MANUAL
A-114
PUSH DRk
Binary Mode Source Mode
Bytes: 32
States: 98
Hex Code in: Binary Mode = [A5][Encoding]
Source Mode = [Encoding]
Operation: PUSH
(SP) ← (SP) + 1
((SP)) ← (DRk)
(SP) ← (SP) + 3
RET
Function: Return from subroutine
Description: Pops the high and low bytes of the PC successively from the stack, decrementing the stack
pointer by two. Program execution continues at the resulting address, which normally is the
instruction immediately following ACALL or LCALL.
Flags:
Example: The stack pointer contains 0BH and on-chip RAM locations 0AH and 0BH contain 01H and
23H, respectively. After executing the instruction,
RET
the stack pointer contains 09H and program execution continues at location 0123H.
Binary Mode Source Mode
Bytes: 11
States: 77
Hex Code in: Binary Mode = [Encoding]
Source Mode = [Encoding]
Operation: RET
(PC).15:8 ← ((SP))
(SP) ← (SP) – 1
(PC).7:0 ← ((SP))
(SP) ← (SP) – 1
[Encoding] 1 1 0 0 1 0 1 0 u u u u 1 0 1 1
CY AC OV N Z
—————
[Encoding] 0 0 1 0 0 0 1 0