Texas Instruments MSP430x1xx User Manual page 90

Texas instruments modules and peripherals user's guide
Table of Contents

Advertisement

Instruction Set
* POP[.W]
Pop word from stack to destination
* POP.B
Pop byte from stack to destination
Syntax
POP
POP.B
Operation
@SP −> temp
SP + 2 −> SP
temp −> dst
Emulation
MOV
Emulation
MOV.B
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
POP
Example
The contents of RAM byte LEO is restored from the stack.
POP.B
Example
The contents of R7 is restored from the stack.
POP.B
Example
The contents of the memory pointed to by R7 and the status register are
restored from the stack.
POP.B
POP
Note: The System Stack Pointer
The system stack pointer (SP) is always incremented by two, independent
of the byte suffix.
RISC 16−Bit CPU
3-54
dst
dst
@SP+,dst
or
MOV.W
@SP+,dst
R7
; Restore R7
SR
; Restore status register
LEO
; The low byte of the stack is moved to LEO.
R7
; The low byte of the stack is moved to R7,
; the high byte of R7 is 00h
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
SR
; Last word on stack moved to the SR
@SP+,dst

Advertisement

Table of Contents
loading

Table of Contents