
Instructions
Note: 1. Has a vertical skip function.
2. CF will be zero if there was a borrow and one otherwise.
No. 4677-16/23
LC66354B, 66356B, 66358B
Mnemonic
Instruction code
Operation
Description
Affected
status bits
Note
D
7
D
6
D
5
D
4
D
3
D
2
D
1
D
0
CLA
Clear AC
1
0
0
0
0
0
0
0
1
1
AC
←
0
(Equivalent to LAI0.)
AC
←
(AC) + 6
(Equivalent to ADI6.)
AC
←
(AC) + 10
(Equivalent to
ADIOAH.)
CF
←
0
CF
←
1
Clear AC.
ZF
1
DAA
Decimal adjust AC
in addition
1
0
1
0
0
1
0
0
1
0
1
1
1
1
1
0
2
2
Add six to AC.
ZF
Decimal adjust AC
in subtraction
1
0
1
0
0
1
0
0
1
1
1
0
1
1
1
0
DAS
2
2
Add 10 to AC.
ZF
CLC
Clear CF
0
0
0
1
1
1
1
0
1
1
Clear CF to 0.
CF
STC
Set CF
0
0
0
1
1
1
1
1
1
1
Set CF to 1.
CF
CMA
Complement AC
0
0
0
1
1
0
0
0
1
1
AC
←
(AC)
Take the one’s complement
of AC.
ZF
IA
Increment AC
0
0
0
1
0
1
0
0
1
1
AC
←
(AC) + 1
AC
←
(AC) – 1
AC
3
←
(CF),
ACn
←
(ACn + 1),
CF
←
(AC
0
)
AC
0
←
(CF),
ACn + 1
←
(ACn),
CF
←
(AC
3
)
E
←
(AC)
AC
←
(E)
Increment AC.
ZF, CF
DA
Decrement AC
0
0
1
0
0
1
0
0
1
1
Decrement AC.
ZF, CF
Rotate AC right
through CF
RAR
0
0
0
1
0
0
0
0
1
1
Shift AC (including CF) right.
CF
Rotate AC left
through CF
RAL
0
0
0
0
0
0
0
1
1
1
Shift AC (including CF) left.
CF, ZF
TAE
Transfer AC to E
0
1
0
0
0
1
0
1
1
1
Move the contents of AC to E.
TEA
Transfer E to AC
0
1
0
0
0
1
1
0
1
1
Move the contents of E to AC. ZF
XAE
Exchange AC
with E
0
1
0
0
0
1
0
0
1
1
(AC)
(E)
Exchange the contents of
AC and E.
IM
Increment M
0
0
0
1
0
0
1
0
1
1
M (HL)
←
[M (HL)]
+ 1
M (HL)
←
[M (HL)]
– 1
Increment M (HL).
ZF, CF
DM
Decrement M
0
0
1
0
0
0
1
0
1
1
Decrement M (HL).
ZF, CF
IMDR i8
Increment M
direct
1
I
7
1
I
7
1
I
6
1
I
6
0
I
5
0
I
5
0
I
4
0
I
4
0
I
3
0
I
3
1
I
2
0
I
2
1
I
1
1
I
1
1
I
0
1
I
0
2
2
M (i8)
←
[M (i8)] + 1
Increment M (i8).
ZF, CF
DMDR i8
Decrement M
direct
2
2
M (i8)
←
[M (i8)] – 1
Decrement M (i8).
ZF, CF
SMB t2
Set M data bit
0
0
0
0
1
1
t
1
t
0
1
1
[M (HL), t2]
←
1
Set the bit in M (HL) specified
by t0 and t1 to 1.
RMB t2
Reset M data bit
0
0
1
0
1
1
t
1
t
0
1
1
[M (HL), t2]
←
0
Clear the bit in M (HL)
specified by t0 and t1 to 0.
ZF
Add the contents of AC and
M (HL) as two’s complement
values and store the result
in AC.
AD
Add M to AC
0
0
0
0
0
1
1
0
1
1
AC
←
(AC) + [M (HL)]
ZF, CF
Add the contents of AC and
M (i8) as two’s complement
values and store the result
in AC.
ADDR i8
Add M direct to AC
1
I
7
1
I
6
0
I
5
0
I
4
1
I
3
0
I
2
0
I
1
1
I
0
2
2
AC
←
(AC) + [M (i8)]
ZF, CF
Add the contents of AC,
ADC
Add M to AC with
CF
0
0
0
0
0
0
1
0
1
1
AC
←
(AC) + [M (HL)] M (HL) and C as two’s
+ (CF)
complement values and
store the result in AC.
ZF, CF
Add the contents of AC and
the immediate data as two’s
complement values and
store the result in AC.
ADI i4
Add immediate
data to AC
1
0
1
0
0
1
0
0
1
I
3
1
I
2
1
I
1
1
I
0
2
2
AC
←
(AC) + I
3
, I
2
,
I
1
, I
0
ZF
Subtract the contents of AC
SUBC
Subtract AC from
M with CF
0
0
0
1
0
1
1
1
1
1
AC
←
[M (HL)] – (AC) and CF from M (HL) as two’s
– (CF)
complement values and
store the result in AC.
ZF, CF
2
ANDA
And M with AC
then store AC
AC
←
(AC)
[M (HL)]
Take the logical and of AC
and M (HL) and store the
result in AC.
0
0
0
0
0
1
1
1
1
1
ZF
I
g
N
b
N
c
A
M
A
Continued on next page.