
SP
old
SP
old
SP
1
PUSH SP
The stack pointer is changed after
a PUSH SP instruction.
SP
1
SP
2
POP SP
The stack pointer is not changed after a POP SP
instruction. The POP SP instruction places SP1 into the
stack pointer SP (SP2 = SP1)
Item n-1
Item.19:16
Item.15:0
SP
old
SP
I3
I1
I2
I3
0xxxh
0xxxh - 2
0xxxh - 4
0xxxh - 6
0xxxh - 8
I1
I2
SP
0123h
SP
I1
I2
I3
SP
PUSH #0123h
POP R8
Address
0
Stack Pointer Bits 19 to 1
19
1
0
MOV.W
2(SP),R6
; Copy Item I2 to R6
MOV.W
R7,0(SP)
; Overwrite TOS with R7
PUSH
#0123h
; Put 0123h on stack
POP
R8
; R8 = 0123h
CPU Registers
shows the stack usage.
shows the stack usage when 20-bit address words are
pushed.
Figure 4-5. Stack Pointer
Figure 4-6. Stack Usage
Figure 4-7. PUSHX.A Format on the Stack
The special cases of using the SP as an argument to the PUSH and POP instructions are described and
shown in
Figure 4-8. PUSH SP, POP SP Sequence
92
CPUX
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated