4/17/98 6-141 Addressing Modes and Data Types
POP Pop Multiple
POPU Pop User Multiple
Syntax: POP Rlist
POPU Rlist
Description: Pop the specified registers (one or more) from the stack. The stack is popped (from
1 to 8 times) and the data stored in the specified registers. Any combination of word registers in
the group R0 to R7 may be popped in a single instruction in a word operation. Or, any combination
of byte registers in the group R0L to R3H or the group R4L to R7H may be popped in a single
instruction in a byte operation. POP uses the current stack pointer, while POPU forces an access to
the user stack.
Note: Rlist is a bit map that represents each register to be popped. The registers are in the order R7,
R6, R5,......, R0, for word registers or R3H.... R0L, or R7H... R4L for byte registers. The pop order
is from right to left, i.e., the register specified by the rightmost one in Rlist will be popped first, etc.
The order must be the reverse of that used by the preceding PUSH instruction. Note that if the same
register list is used first with a PUSH, then with a POP, the original register contents will be
restored. The order in which the registers are called out in the source code is not important because
the Rlist operand is encoded as a fixed order bit map (see below).
Size: Byte, Word
Flags Updated: none
POP Rlist
Bytes: 2
Clocks: 4 + 2 per additional register
Operation: Repeat for all selected registers (Ri):
(Ri) <-- ((SP))
(SP) <-- (SP) + 2
Encoding:
POPU Rlist
Bytes: 2
Clocks: 4 + 2 per additional register
Operation: Repeat for all selected registers (Ri):
(Ri) <-- ((USP))
(USP) <-- (USP) + 2
Encoding:
0 H/L 1 0 SZ 1 1 1
Rlist
0 H/L 1 1 SZ 1 1 1
Rlist