fiH/
0:START.
rIM
4P
0
2:
SRC
4P
3:
RDR
4ft:
XCH
0
5%
INC 8
6:
SRC
4P
7:
RDR
8:
XCH
I
9:
JMS
AND
II:
XCH
2
12:
WMP
13:
JUN
START
IS:
NOP
16:
=104ft
104:/
104:
AND.
Cl.B
105:
XCH
2
106:
l.DM
4
107:
XCH
0
108:
RAR
109:
XCH
0
110:
JCN
CZ
ROTRI
112:
XCH
I
113:
RAR
114:
XCH
I
liS:
ROTR2.
XCH
2
116:
RAR
117:
XCH
2
118:
DAC
I
19:
JCN
AN
Z
AN
D+ 3
121:
B8L 0
122:ROTR1,
XCH
1
123:
RAR
1-24:
XCH
I
125:
CLC
126:
JUN
ROTR2
128:CZ
=10
128:ANZ
-=12
128:$
fOUR
81 T nAND" ROUTINE
/
LOAD
ROM
PORT
0
ADDRESS
/
SEND
ROM
PORT
ADDRESS
/
READ
INPUT A
/ A
TO
REGISTER 0
/
LOAD
ROM
PORT
1
ADDRESS
/
SEND
ROM
PORT
ADDRESS
/
READ
INPUT 8
/ B
TO
REGISTER
/
EXECUTE
"AND··
/
l.OAD
RESUL
T C
/
STORE
AT
MEMORY
PORT 0
/ RESTART
"AND" SUBROUTINE
/
CLEAR
ACCUMUl.ATOR
AND
CARRY
/
CLEAR
REGISTER 2
/
LOAD
LOOP
COUNT
(l.C>
/
LOAD
A,
LC
TO
REGISTER 0
/
ROTATE
LEAST
SIGNIfICANT
BIT
TO
CARRY
/
RETURN
ROTATED
A
TO
REG
0#
LC
TO
ACC.
/
JUMP
TO
ROTRI
If
CARRY
ZERO
/
LOAD
B.
LC
TO
ACCUMUl.ATOR
/
ROTATE
LEAST
SIGNIfICANT
BIT
TO
CARRY
/
RETURN
ROTATED
B
TO
REG.
I.
LC
TO
ACC.
/
LOAD
PARTIAl. RESULT C.
LC
TO
REGISTER 2
/
ROTATE
CARRY
INTO PARTIAL RESULT
MSB
/
LOAD
l.C.
RETURN
C
TO
REGISTER 2
/
DECREMENT
THE
ACCUMULATOR
(l.C>
/
LOOP
IF
LC
NON
ZERO
/
RETURN
/
LOAD
B.
LC
TO
REGISTER I
/
ROTATE
8
/
RETURN
ROTATED
B
TO
REG.
I"
LC
TO
ACC.
/
CLEAR
CARRY
/
RETURN
TO
LOOP
Figure
9.4.
Pass 1 Listing.
01
0:BPPNPNPPPF
BPPPPPPPNF
2:
BPPNPNPPNF 31BNNNPNPNPF
4:8NPNNPPPPf
5:
BPNNPNPPPF
6:
BPPNPNPPNF 7:BNNNPNPNPF
8:BNPNNPPPNf
9:BPNPNPPPPF
BPNNPNPPPF 11:BNPNNPPNPF
12:BNNNPPPPNf
13:BPNPPPPPPF
BPPPPPPPPf
LS:BPPPPPPPPf
16:
10~:
10~:BNNNNPPPPf
10S:BNPNNPPNPf
106:BNNPNPNPPf
107lBNPNNPPPP
108aBNNNNPNNPF
109:8NPNNPPPPF
1
lOa
BPPPNNPNPf
BPNNNNPNPF
112:BNPNNPPPNF 113tBNNNNPNNPf I I
4ft
I BNPNNPPPNF
IIS:BNPNNPPNPF
116:BNNNNPNNPF
tI7:BNPNNPPNPf
118:BNNNNNPPPF 119aBPPPNNNPPF
BPNNPNPNNF
121aBNNPPPPPPf
122aBNPNNPPPNF 1 23aBNNNNPNNPF
124:BNPNNPPPNf
125:BNNNNPPPNf
126:BPNPPPPPPf
BPNNNPPNNF
128
: 1
28
:
128
:
F
Figure
9.5
Programming
Tape
Listing.
12