MB90420G/5G (A) Series
84
Table 9
Addition and Subtraction Instructions (Byte/Word/Long Word) [42 Instructions]
Note : For an explanation of “(a)” to “(d)”, refer to Table 4, “Number of Execution Cycles for Each Type of Addressing,”
and Table 5, “Correction Values for Number of Cycles Used to Calculate Number of Actual Cycles.”
Mnemonic
#
~
RG
BOperation
LH
AH
I
S
T
N
Z
V
C
RMW
ADD
A,#imm8
ADD
A, dir
ADD
A, ear
ADD
A, eam
ADD
ear, A
ADD
eam, A
ADDC
A
ADDC
A, ear
ADDC
A, eam
ADDDC A
SUB
A, #imm8
SUB
A, dir
SUB
A, ear
SUB
A, eam
SUB
ear, A
SUB
eam, A
SUBC
A
SUBC
A, ear
SUBC
A, eam
SUBDC A
2
2+
2
2+
1
2
2+
1
2
2+
2
2+
1
2
2+
1
2
5
3
4+ (a)
3
5+ (a)
2
3
4+ (a)
3
2
5
3
4+ (a)
3
5+ (a)
2
3
4+ (a)
3
0
1
0
2
0
1
0
1
0
2
0
1
0
(b)
0
(b)
0
2
× (b)
0
(b)
0
(b)
0
(b)
0
2
× (b)
0
(b)
0
byte (A)
← (A) +imm8
byte (A)
← (A) +(dir)
byte (A)
← (A) +(ear)
byte (A)
← (A) +(eam)
byte (ear)
← (ear) + (A)
byte (eam)
← (eam) + (A)
byte (A)
← (AH) + (AL) + (C)
byte (A)
← (A) + (ear) + (C)
byte (A)
← (A) + (eam) + (C)
byte (A)
← (AH) + (AL) + (C) (decimal)
byte (A)
← (A) –imm8
byte (A)
← (A) – (dir)
byte (A)
← (A) – (ear)
byte (A)
← (A) – (eam)
byte (ear)
← (ear) – (A)
byte (eam)
← (eam) – (A)
byte (A)
← (AH) – (AL) – (C)
byte (A)
← (A) – (ear) – (C)
byte (A)
← (A) – (eam) – (C)
byte (A)
← (AH) – (AL) – (C) (decimal)
Z
–
Z
–
Z
–
*
–
*
–
*
–
ADDW A
ADDW A, ear
ADDW A, eam
ADDW A, #imm16
ADDW ear, A
ADDW eam, A
ADDCW A, ear
ADDCW A, eam
SUBW
A
SUBW
A, ear
SUBW
A, eam
SUBW
A, #imm16
SUBW
ear, A
SUBW
eam, A
SUBCW A, ear
SUBCW A, eam
1
2
2+
3
2
2+
2
2+
1
2
2+
3
2
2+
2
2+
2
3
4+ (a)
2
3
5+ (a)
3
4+ (a)
2
3
4+ (a)
2
3
5+ (a)
3
4+ (a)
0
1
0
2
0
1
0
1
0
2
0
1
0
(c)
0
2
× (c)
0
(c)
0
(c)
0
2
× (c)
0
(c)
word (A)
← (AH) + (AL)
word (A)
← (A) +(ear)
word (A)
← (A) +(eam)
word (A)
← (A) +imm16
word (ear)
← (ear) + (A)
word (eam)
← (eam) + (A)
word (A)
← (A) + (ear) + (C)
word (A)
← (A) + (eam) + (C)
word (A)
← (AH) – (AL)
word (A)
← (A) – (ear)
word (A)
← (A) – (eam)
word (A)
← (A) –imm16
word (ear)
← (ear) – (A)
word (eam)
← (eam) – (A)
word (A)
← (A) – (ear) – (C)
word (A)
← (A) – (eam) – (C)
–
*
–
*
–
*
–
ADDL
A, ear
ADDL
A, eam
ADDL
A, #imm32
SUBL
A, ear
SUBL
A, eam
SUBL
A, #imm32
2
2+
5
2
2+
5
6
7+ (a)
4
6
7+ (a)
4
2
0
2
0
(d)
0
(d)
0
long (A)
← (A) + (ear)
long (A)
← (A) + (eam)
long (A)
← (A) +imm32
long (A)
← (A) – (ear)
long (A)
← (A) – (eam)
long (A)
← (A) –imm32
–
*
–