530
CHAPTER 28 INSTRUCTION OPERATION
User’s Manual U12697EJ3V0UM
(5) 16-bit data exchange instruction: XCHW
Mnemonic
Operand
Bytes
Operation
Flag
S
Z
AC P/V CY
XCHW
rp, rp'
2
rp
↔
rp'´
AX, saddrp2
2
AX
↔
(saddrp2)
rp, saddrp
3
rp
↔
(saddrp)
rp, sfrp
3
rp
↔
sfrp
AX, [saddrp]
3/4
AX
↔
((saddrp))
AX, [%saddrg]
3/4
AX
↔
((saddrg))
AX, !addr16
4
AX
↔
(addr16)
AX, !!addr24
5
AX
↔
(addr24)
saddrp, saddrp'
4
(saddrp)
↔
(saddrp')
AX, mem
2-5
AX
↔
(mem)
(6) 8-bit arithmetic instructions: ADD, ADDC, SUB, SUBC, CMP, AND, OR, XOR
Mnemonic
Operand
Bytes
Operation
Flag
S
Z
AC P/V CY
ADD
A, #byte
2
A, CY
←
A + byte
×
×
×
V
×
r, #byte
3
r, CY
←
r + byte
×
×
×
V
×
saddr, #byte
3/4
(saddr), CY
←
(saddr) + byte
×
×
×
V
×
sfr, #byte
4
sfr, CY
←
sfr + byte
×
×
×
V
×
r, r'
2/3
r, CY
←
r + r'
×
×
×
V
×
A, saddr2
2
A, CY
←
A + (saddr2)
×
×
×
V
×
r, saddr
3
r, CY
←
r + (saddr)
×
×
×
V
×
saddr, r
3
(saddr), CY
←
(saddr) + r
×
×
×
V
×
r, sfr
3
r, CY
←
r + sfr
×
×
×
V
×
sfr, r
3
sfr, CY
←
sfr + r
×
×
×
V
×
saddr, saddr'
4
(saddr), CY
←
(saddr) + (saddr')
×
×
×
V
×
A, [saddrp]
3/4
A, CY
←
A + ((saddrp))
×
×
×
V
×
A, [%saddrg]
3/4
A, CY
←
A + ((saddrg))
×
×
×
V
×
[saddrp], A
3/4
((saddrp)), CY
←
((saddrp)) + A
×
×
×
V
×
[%saddrg], A
3/4
((saddrg)), CY
←
((saddrg)) + A
×
×
×
V
×
A, !addr16
4
A, CY
←
A + (addr16)
×
×
×
V
×
A, !!addr24
5
A, CY
←
A + (addr24)
×
×
×
V
×
!addr16, A
4
(addr16), CY
←
(addr16) + A
×
×
×
V
×
!!addr24, A
5
(addr24), CY
←
(addr24) + A
×
×
×
V
×
A, mem
2-5
A, CY
←
A + (mem)
×
×
×
V
×
mem, A
2-5
(mem), CY
←
(mem) + A
×
×
×
V
×