Download Print this page

RCA COSMAC User Manual page 24

Hide thumbs Also See for COSMAC:

Advertisement

COSMAC Microprocessor
23
AND IMMEDIATE
I
M(R(P)) . D -+ D; R(P)+l
ANI
When I=F and N=A, a logical AND operation is performed similar to F2. The D byte is one operand, and
the memory byte immediately following the FA instruction is the second operand.
A
03
2C
N
dJ
A
I+-
p
0
X
2
ADDRESS
M
I
F
03
2B
FA
R(QI
03
2C
t-
03
2C
OF
R(ll
00
71
ALU ('1
03
20
FB
R(21
00
33
OF
=-
r
03
2E
Fa
R(31
-
-
0
07
N
A
cb
A
03
2C
~
p
0
X
2
ADDRESS
M
I
F
03
2B
FA
r---
R(OI
03
20
-
03
2C
OF
R(ll
00
71
~
03
20
FB
R(21
00
33
OF
=-
03
2E
Fa
R(31
-
-
o
07
~
OF
Fig. 25 - Example of instruction FA - AND IMMEDIA TE.
EXCLUSIVE-OR IMMEDIATE
I
M(R(P))
EB
D -+ D; R(P)+l
XRI
When I=F and N=B, an EXCLUSIVE-OR operation similar to F3 is performed. The D byte is one
operand, and the memory byte immediately following the FB instruction is the second operand. This
instruction can be used to complement the D register when the immediate byte is "F F".
A
03 ' 2E
N
B
dJ
I-
p
0
X
2
ADDRESS
M
f-
I
F
03
2B
FA
R(OI
03
2E
03
2C
OF
Rill
00
71
ALU
«!)
I
A
03
2E
N
B
c6
I-
p
0
X
2
ADDRESS
M
I
F
03
2B
FA
t-
R(OI
03
2F
~
03
2C
OF
R(ll
00
71
ALU
«!) )
03
20
FB
R(21
00
33
DF
= -
t
03
20
FB
R(21
00
33
OF
=-
+
03
2E
Fa
R(31
-
-
0
07
03
2E
Fa
R(31
-
-
0
F7
l
FO
Fig.
26 -
Example of instruction FB - EXCLUSIVE-OR IMMEDIA TE.
ADD IMMEDIATE
I
M(R(P))+D
-+
D; C
-+
DF; R(P)+l
ADI
When I=F and N=C, the two operands are added as in F4. The D byte is one operand, and the memory
byte immediately following the FC instruction is the other operand.
A
03
30
N
C
dJ
r-
p
0
X
2
ADDReSS
M
f-
I
F
03
2F
FC
RIOI
03
30
03
30
80
Rill
00
71
ALU
(+)
A
03
30
N
C
c6
~
p
0
X
2
ADDRESS
M
I
F
03
2F
FC
r---
R(OI
03
31
-
03
30
80
R(ll
00
71
ALU
(+)]
03
31
FD
RI21
00
33
DF
=-
t
03
31
FD
R(21
00
33
OF
= -
1
03
32
92
R(31
-
-
D
F7
03
32
92
R(31
-
-
0
77
~
80
Fig.
27 -
Example of instruction FC - ADD IMMEDIA TE.

Advertisement

loading