Download Intel 8xC251Sx User`s Manual

Transcript
8XC251SA, SB, SP, SQ USER’S MANUAL
PUSH DRk
Binary Mode
Source Mode
Bytes:
3
2
States:
9
8
[Encoding]
1100
1010
uuuu
Hex Code in:
Binary Mode = [A5][Encoding]
Source Mode = [Encoding]
Operation:
PUSH
(SP) ← (SP) + 1
((SP)) ← (DRk)
(SP) ← (SP) + 3
1011
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:
CY
AC
OV
N
Z
—
—
—
—
—
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:
1
1
States:
7
7
[Encoding]
0010
0010
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
A-114