THE INSTRUCTION SET
STAX rp (Store accumulator indirect)
«rp»
-
(A)
The content
of
register A is moved to the
memory
location whose address is in the
register pair rp. Note:
only register pairs
rp
= B (registers B and
C)
or rp = 0
(registers 0 and
E)
may be specified.
0
0
R P 0 0
0
Cycles: 2
States: 7
Addressing:
reg. indirect
Flags: none
XCHG (Exchange
Hand
L with 0
and
E)
(H) -
(0)
(L) - (E)
The contents
of
registers
Hand
L are ex-
changed with the contents
of
registers 0
and
E.
1 1
0 0
Cycles:
1
States: 4
Addressing:
register
Flags:
none
5.6.2
Arithmetic Group
This group
of
instructions performs arithmetic
operations on data in registers and memory.
Unless indicated otherwise,
all instructions in
this
group
affect
the Zero, Sign, Parity, Carry,
and Auxiliary Carry
flag&. according
to
the stan-
dard rules.
All subtraction operations are performed via
two's
complement arithmetic and set the carry
flag
to
one
to
indicate a borrow and clear it
to
indicate no borrow.
ADD r (Add Register)
(A) - (A) + (r)
The content
of
register r is added
to
the
content
of
the accumulator. The result is
placed in the accumulator.
1
0 0
0 0
S S S
Cycles:
1
States: 4
Addressing: register
Flags:
Z,S,P,CY,AC
*AII mnemonics
copyrighted©lntel
Corporation
1976.
5-6
ADD M (Add memory)
1
(A) - (A) + «H) (L»
The content
of
the memory location whose
address is contained in the
Hand
L
registers is added
to
the content
of
the ac-
cumulator.
The result is placed in the ac-
cumulator.
o o
o
Cycles:
States:
Addressing:
Flags:
o
2
7
1 1
reg. indirect
Z,S,P,CY,AC
o
ADI data (Add immediate)
1
(A)
-
(A)
+ (byte
2)
The content
of
the second byte
of
the in-
struction is added
to
the content
of
the ac-
cumulator.
The result is placed in the ac-
cumulator.
o o
Cycles:
States:
Addressing:
Flags:
o 1
1
2
7
immediate
Z,S,P,CY,AC
o
ADC r (Add Register
with
carry)
(A) - (A) + (r) + (CY)
The content
of
register r and the content
of
the carry bit are added
to
the content
of
the
accumulator. The result is placed in the ac-
cumulator.
o
o
o
Cycles:
States:
Addressing:
Flags:
1
S
S
1
4
register
Z,S,P,CY,AC
S