POP loc16
6-274
POP loc16 Pop Top of Stack
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
POP loc16 0010 1010 LLLL LLLL X − 2
Operands loc16 Addressing mode (See Chapter 5)
Description Predecrement SP by 1. Load the contents of loc16 with the 16-bit value
pointed to by SP.
SP -= 1;
[loc16] = [SP];
Flags and
Modes
N If (loc16 = @AX), then the load to AX is tested for a negative condition. Bit-15
of the AX register is the sign bit, 0 for positive, 1 for negative. The negative
flag bit is set if the operation on the AX register generates a negative value,
otherwise it is cleared.
Z If (loc16 = @AX), then the load to AX is tested for a zero condition. The bit is
set if the result of the operation on the AX register generates a 0 value,
otherwise it is cleared
Repeat This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
POP @T ; Predecrement SP by 1. Load
; XT(31:15) with the
; contents of the location pointed to
; by SP. TL is unchanged.
POP @AL ; Predecrement SP by 1. Load AL with
; the contents of the location pointed
; to by SP. AH is unchanged.
POP @AR4 ; Predecrement SP by 1. Load AR4 with
; the contents of the location pointed
; to by SP. AR4H is unchanged.
POP *XAR4++ ; Predecrement SP by 1. Load the
; 16-bit location pointed to by XAR4
; with the contents of the location
; pointed to by SP.
Post-increment
; XAR4 by 1