Instruction Set
3-54
RISC 16-Bit CPU
* POP[.W]
Pop word from stack to destination
* POP.B
Pop byte from stack to destination
Syntax
POP
dst
POP.B
dst
Operation
@SP −> temp
SP + 2 −> SP
temp −> dst
Emulation
MOV
@SP+,dst or MOV.W @SP+,dst
Emulation
MOV.B
@SP+,dst
Description
The stack location pointed to by the stack pointer (TOS) is moved to the
destination. The stack pointer is incremented by two afterwards.
Status Bits
Status bits are not affected.
Example
The contents of R7 and the status register are restored from the stack.
POP
R7
; Restore R7
POP
SR
; Restore status register
Example
The contents of RAM byte LEO is restored from the stack.
POP.B
LEO
; The low byte of the stack is moved to LEO.
Example
The contents of R7 is restored from the stack.
POP.B
R7
; The low byte of the stack is moved to R7,
; the high byte of R7 is 00h
Example
The contents of the memory pointed to by R7 and the status register are
restored from the stack.
POP.B
0(R7)
; The low byte of the stack is moved to the
; the byte which is pointed to by R7
: Example:
R7 = 203h
;
Mem(R7) = low byte of system stack
: Example:
R7 = 20Ah
;
Mem(R7) = low byte of system stack
POP
SR
; Last word on stack moved to the SR
Note:
The System Stack Pointer
The system stack pointer (SP) is always incremented by two, independent
of the byte suffix.
Summary of Contents for MSP430x4xx Family
Page 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Page 2: ......
Page 6: ...vi ...
Page 114: ...3 76 RISC 16 Bit CPU ...
Page 304: ...5 20 FLL Clock Module ...
Page 340: ...7 8 Supply Voltage Supervisor ...
Page 348: ...8 8 16 Bit Hardware Multiplier ...
Page 372: ...9 24 32 Bit Hardware Multiplier ...
Page 400: ...10 28 DMA Controller ...
Page 428: ...13 10 Basic Timer1 ...
Page 466: ...15 24 Timer_A ...
Page 522: ...17 30 USART Peripheral Interface UART Mode ...
Page 544: ...18 22 USART Peripheral Interface SPI Mode ...
Page 672: ...23 12 Comparator_A ...
Page 692: ...24 20 LCD Controller ...
Page 746: ...26 28 ADC12 ...