Download Print this page

RCA COSMAC User Manual page 25

Hide thumbs Also See for COSMAC:

Advertisement

24
________________________________________________________________ User Manual for the
SUBTRACT D IMMEDIATE
I
M(R(P))-D
-+
D; C
-+
DF; R(P)+1
I
SDI
I
When I=F and N=D, the two operands are subtracted as in F5. The D byte is the subtrahend, and the
memory byte immediately following the FD instruction is the minuend.
A
03
32
N
D
c6
f--
p
0
X
2
ADDH~SS
M
l-
I
F
03
2F
FC
RIOI
03
32
03
30
80
Rll)
00
71
ALU
HI-
A
03
32
1
N
0
c6
I-
p
0
X
2
ADDRESS
M
f--
I
F
03
2F
FC
RIOI
03
33
-
03
30
80
RllI
00
71
ALU
H
03
31
FD
R(2)
00
33
DF
~-
f
03
31
FD·
R(2)
00
33
DF
~
1
+
03
32
92
R(3)
-
-
D
77
03
32
92
R(3)
-
-
D
lB
+
92
Fig. 28 - Example of instruction FD - SUBTRACT D IMMEDIA TE.
SUBTRACT M IMMEDIATE
I
D-M(R(P))
-+
D; C
-+
DF; R(P)+1
I
SMI
I
When I=F and N=F, the two operands are subtracted as in F7. The D byte represents the minuend, and
the memory byte immediately following the FF instruction represents the subtrahend. (This instruction is
equivalent to FD with the operands reversed.)
A
03
34
N
F
cb
-
p
0
X
2
ADDRESS
M
4 -
I
F
03
33
FF
RIO)
03
34
03
34
lA
R(l)
00
71
ALU
H
A
03
34
N
F
cb
I-
p
0
X
2
ADDRESS
M
f--
-
I
F
03
33
FF
RIO)
03
35
03
34
lA
R(l)
00
71
ALU
H
03
35
62
R(2)
00
33
OF
~-
f
03
35
62
R(2)
00
33
DF
~
1
1
33
36
6A
R(3)
-
-
D
lB
03
36
6A
R(3)
-
-
D
01
t
lA
Fig.
29 -
Example of instruction FF - SUBTRACT M IMMEDIATE.
Input/Output Byte Transfer
N=O-7
OUTPUT
M(R(X))
-+
BUS; R(X)+1
10UTI
When 1 =6 and N=O,1 ,2,3,4,5,6, or 7, the memory byte addressed by R (X) is placed on the data bus. The
four bits of N are simultaneously sent from COSMAC to the I/O system, and a specific code is provided on
r+
7
r+
7
A
00
33
N
7
cb
p
0
f-- x
2
ADDRESS
M
I
6
00
31
12
RIO)
03
36
00
32
34
Rll)
00
71
IALul-
I
A
00
33
N
7
c6
p
0
-
X
2
ADDRESS
M
I
6
00
31
12
RIO)
03
36
00
32
34
Rll)
00
71
!ALU
I-
I
00
33
56
R(2)
00
33
I-
DF~-
00
33
56-
-
R(2)
00
34
~
OF
~-
00
34
78
R(3)
-
-
I
D
I - I
00
34
78
R(3)
-
-
I
D
I-
I
+
56
Fig. 30 - Example of instruction 6N (N=0-7J - OUTPUT.
56

Advertisement

loading