544
CHAPTER 28 INSTRUCTION OPERATION
User’s Manual U12697EJ3V0UM
(15) Stack manipulation instructions: PUSH, PUSHU, POP, POPU, MOVG, ADDWG, SUBWG, INCG, DECG
Mnemonic
Operand
Bytes
Operation
Flag
S
Z
AC P/V CY
PUSH
PSW
1
(SP – 2)
←
PSW, SP
←
SP – 2
sfrp
3
(SP – 2)
←
sfrp, SP
←
SP – 2
sfr
3
(SP – 1)
←
sfr, SP
←
SP – 1
post
2
{(SP – 2)
←
post, SP
←
SP – 2}
×
m
Note
rg
2
(SP – 3)
←
rg, SP
←
SP – 3
PUSHU
post
2
{(UUP – 2)
←
post, UUP
←
UUP – 2}
×
m
Note
POP
PSW
1
PSW
←
(SP), SP
←
SP + 2
R
R
R
R
R
sfrp
3
sfrp
←
(SP), SP
←
SP + 2
sfr
3
sfr
←
(SP), SP
←
SP + 1
post
2
{post
←
(SP), SP
←
SP + 2}
×
m
Note
rg
2
rg
←
(SP), SP
←
SP + 3
POPU
post
2
{post
←
(UUP), UUP
←
UUP + 2}
×
m
Note
MOVG
SP, #imm24
5
SP
←
imm24
SP, WHL
2
SP
←
WHL
WHL, SP
2
WHL
←
SP
ADDWG
SP, #word
4
SP
←
SP + word
SUBWG
SP, #word
4
SP
←
SP – word
INCG
SP
2
SP
←
SP + 1
DECG
SP
2
SP
←
SP – 1
Note
m is the number of registers specified by post.