
35
AT/TSC8x251G2D
4135F–8051–11/06
Table 28.
Summary of Exchange, Push and Pop Instructions
Notes: 1. A shaded cell denotes an instruction in the C51 Architecture.
2. If this instruction addresses an I/O Port (Px, x = 0-3), add 1 to the number of states.
Add 2 if it addresses a Peripheral SFR.
3. If this instruction addresses an I/O Port (Px, x = 0-3), add 2 to the number of states.
Add 3 if it addresses a Peripheral SFR.
Exchange bytesXCH A, <src>(A)
src opnd
Exchange DigitXCHD A, <src>(A)3:0 src opnd3:0
PushPUSH <src>(SP)
← (SP) +1; ((SP)) ← src opnd;
(SP)
← (SP) + size (src opnd) - 1
PopPOP <dest>(SP)
← (SP) - size (dest opnd) + 1;
dest opnd
← ((SP)); (SP) ← (SP) -1
Mnemonic
<dest>,
<src>(1)
Comments
Binary Mode
Source Mode
Bytes
States
Bytes
States
XCH
A, Rn
ACC and register
1
3
2
4
A, dir8
ACC and direct address (on-chip
RAM or SFR)
23(3)
A, at Ri
ACC and indirect address
1
4
2
5
XCHD
A, at Ri
ACC low nibble and indirect address
(256 bytes)
14
2
5
PUSH
dir8
Push direct address onto stack
2
2(2)
22(2)
#data
Push immediate data onto stack
4
3
#data16
Push 16-bit immediate data onto
stack
55
4
5
Rm
Push byte register onto stack
3
4
2
3
WRj
Push word register onto stack
3
5
2
4
DRk
Push double word register onto
stack
39
2
8
POP
dir8
Pop direct address (on-chip RAM or
SFR) from stack
23(2)
Rm
Pop byte register from stack
3
2
WRj
Pop word register from stack
3
5
2
4
DRk
Pop double word register from stack
3
9
2
8