/AA SUPERVISOR
 .LOC 0
   JMP DA                /->INITIALISATION
   JMP I0
   .SIZE                 /LOW (2)
   20000                 /UP (3)
   0
   0
   0
   0
   0                     /NP (10)
   0
   0
PINT                     /(13)
   0                     /NEWIND (14)
   0
   0
   0
   0                     /CAL (20)
   XCT 32; TAD 20; DAC 20
   LAC* 20; JMP* 27
   0
   IERR                  /CALAD (27)
WC                       /(30)
CA                       /(31)
B0  PAR;PAR=CLC          /BOOTSTRAP (32)
   DAC A1; DAC A2        /NO EFFECT
   LAC (BV; JMS D0
   JMP 2001
BV 12007                 /READ CONT UNIT 7
   -1                    /BLOCK 1 REV
   -2                    /WORD COUNT (DUMMY)
   30                    /STORE ADDRESS
TEST                     /(44)
   JMP* TEST
WAIT JMP Q2              /(46)
   .SIZE                 /SUPLIM (47)
RETAD
RET 7000
   Z1
   Z1
ACCAD
ACC 0
   0
   0
D  JMS D0                /(60)
K  JMS K0                /(61)
T  JMS T0                /(62)
M  JMS M0                /(63)
R  JMS R0                /(64)
P  JMS P0                /(65)
   XX
   XX
RA                       /(70)
RB                       /(71)
PA                       /(72)
PB                       /(73)
/SYSTEM LOAD PROCEDURES
   JMS SYSLD             /LOAD COMPILER (74)
    0; 40; -14400; 3400
   JMP 3400
   JMS SYSLD             /LOAD LOADER (102)
    0; 10; -1600; 4000
   JMP 4000
   JMS SYSLD             /LOAD CONT (110)
    0; 16; -11000; 7000
   JMP 7000
   0                     /SPARE (116)
   0                     /PROG (117)
   0                     /IN (120)
   0; 0; 0; 0; 0; 0; 0
   0                     /OUT (130)
   0; 0; 0; 0; 0; 0; 0
/INTERRUPT: SAVE ACC ETC.
I0 EEM
   DAC* ACCAD
   LAC TEST
   SNA!CLC; JMP .+3
   TAD TEST; SKP
   LAC 0; DAC* RETAD
/DEVICE SKIP CHAIN
I1 DTRB                  /DECTAPE?
   SNA; JMP I3
   DTRA; AND (400
   SNA; JMP I3
   LAC (700; DTXA        /DISABLE BUT
   JMP* DD               /LEAVE FLAGS
I3 RSF; JMP I4           /TAPE READER?
   RRB
   JMP* RD
I4 PSF; JMP I5           /TAPE PUNCH?
   PCF
   JMP* PD
I5 TSF; JMP I6           /TELEPRINTER?
   TCF
   JMP* TD
I6 KSF; JMP Q0           /KEYBOARD?
   KRB; AND (177
   SAD (175;  JMP I8     /ALT MODE ->
   SAD (30; JMP I9       /CONTROL X
   JMP* KD
I7 SAD (40; SKP; JMP Q0
   LAC (-140000; DAC QI
   DAC LP
   ISZ QI; JMP .-1
   JMP Q0
I8 KSF; JMP .-1
   KRB; AND (177
   DAC PINT
   JMP Q0
I9 KSF; JMP .-1
   KRB; AND (177
   DAC QI; AND (170
   SAD (60; SKP; JMP Q0
   LAC QI; AND (7
   XOR (12000; DAC BV
   LAC QI; DAC 2000
   CAF
   JMP B0
IERR XX
   JMP Q0
/DECTAPE HANDLER
D0
   IOF; DAC DA
   LAC WAIT; DAC D
   LAC D0; DAC* RETAD
   LAW -2; DAC TRY
B1 DTCA
   LAC DA
   DAC DB; ISZ DB        /*REQD BLOCK
   LAC* DA; SPA!SNA; LAC BV  /FUN+UNIT
   AND (16007; DAC* DA   /NO FUNNIES
   AND (7; DAC X         /UNIT
   TAD (U0; DAC CA       /*UNIT SLOT
   LAC (NOP; DAC Q       /NOP IF REV
   LAC* DB
   SMA!RAL; ISZ Q        /CMA IF FWD
   LAC X; RTR; RTR
   XOR (21000; DAC X     /UUUDGN+SEARCH
   LAC* CA; XCT Q; TAD* DB
   RAL
   LAC X
   SNL; JMP B6
B2 XOR (40000
B3 JMS ACT               /BACK OFF
   SZL; JMP B5           /EOT
   LAC* CA; XCT Q; TAD* DB
   SPA!SNA!CLA; JMP B3
B5 XOR (40000
B6 JMS ACT               /HOME IN
   SZL; JMP B2           /EOT
   LAC* CA; XCT Q; TAD* DB
   TAD (1
   SMA!SZA!CLA; JMP B6   /-> KEEP GOING
   SNL; JMP B2           /->BACK OFF
   LAW -3; XCT Q         /THIS IS IT
   ADD* CA; DAC* CA
   ISZ DB                /*WORD COUNT
   LAC* DB; DAC WC
   SMA!CLC; JMP B8
   ISZ DB                /*BUFF START
   TAD* DB; DAC CA
   DTRA; AND (17400; XOR* DA
   JMS ACT
B8 DTRA; AND (21000; DTXA   /STOP UNIT
   LAC TRY
   SZA!CLA; JMP D9
   LAC* DA; AND (7
   XOR DT0; CMA
D9 DAC* DA
   LAC (JMS D0; DAC D
   JMS DD; JMP IERR
DT0 .SIXBT (DT0
/DECTAPE ACTION ROUTINE
ACT
   XOR (400; DTXA
A1 JMS DD
   DTRB; SNA!RCL; JMP .-2
   SNL!RTL; JMP* ACT
   ISZ TRY; SKP
A2 JMP B8
   SNL; JMP B1
   LAC (20000            /GO BIT
   JMP* ACT              /EOT
U0 0; 0; 0; 0; 0; 0; 0; 0
DD IERR
   JMP Q0
SYSLD
S1 JMS TEST
   LAC SYSLD; XCT D
   JMS TEST
   LAC* SYSLD
   SMA!SZA; JMP Q2
   SMA!CMA; JMP S2
   XCT M
   JMP S1
S2 DZM TEST
   LAC SYSLD; TAD (4
   DAC SYSLD
   JMP* SYSLD
/PAPER-TAPE READER HANDLER
R0
   IOF
   LAC R0; DAC* RETAD
   DZM RB; ISZ RB
R1 IORS; AND (1000       /OUT OF TAPE?
   SZA!CLC; JMP R9       /YES ->
R2 LAC* RA
   SNA; JMP R3           /BUFF FREE ->
   SPA; JMP R8           /BUFF FULL ->
   DAC RA                /WRAP ROUND
   JMP R2
R3 RSA; JMS RD           /GET CHAR
   CMA; DAC* RA          /STORE \CHAR
   ISZ RA
   JMP R1
R8 CLA
R9 DAC RB
   JMS RD; JMP IERR
RD IERR
   JMP Q0
                         /
                         /PAPER-TAPE PUNCH HANDLER
                         /
P0
   IOF
   LAC P0; DAC* RETAD
   DZM PB; ISZ PB
P1 LAC* PA
   SPA; JMP P2           /CHAR READY ->
   SNA; JMP P9           /BUFF EMPTY ->
   DAC PA
   JMP P1
P2 IORS; AND (400        /OUT OF TAPE?
   SZA!CLC; JMP P9       /YES ->
   LAC* PA; CMA
   PSA; JMS PD           /PUT CHAR
   DZM* PA; ISZ PA       /BUFF FREE
   JMP P1
P9 DAC PB
   JMS PD; JMP IERR
PD IERR
   JMP Q0
/TELEPRINTER HANDLER
CR=15;LF=12
BS .BLOCK 120
BE -1
TI BS;TJ BS;LP;TCHAR LF
T0
   IOF; CMA
   DAC* TJ; ISZ TJ
   LAC T0; DAC* RETAD
T1 LAC* TJ
   SMA!CMA; JMP T4
   SZA; JMP T3
   LAC KK; SZA; JMP T2
   LAC (BS; DAC KI
T2 LAC KI; DAC TJ
   JMP T1
T3 LAC WAIT; DAC T
T4 LAC (I7; SAD KD; JMP Q0
   DAC KD
T5 LAC PINT
   SZA; JMP T7
   LAC TCHAR
   SZA; JMS TYPE
   LAC* TI; CMA
   SAD (LF; JMP T9
   LAC LP; SPA; JMP T7
   LAW -110; TAD LP
   SPA; JMP .+5
   LAC (CR; JMS TYPE
   LAC (LF; JMS TYPE
   ISZ LP
T6 LAC* TI; CMA; JMS TYPE
T7 DZM* TI; ISZ TI
   LAC (JMS T0; DAC T
T8 LAC* TI
   SMA!CMA; JMP T10
   SZA; JMP T5
   LAC KI; DAC TI
   JMP T8
T9 LAC (CR; JMS TYPE
   LAC (LF; DAC TCHAR
   JMP T7
T10 LAC (Q0; DAC KD
   JMP Q0
TYPE
   SAD (CR; DZM LP
   TLS; JMS TD
   LAC (IERR; DAC TD
   DZM TCHAR
   JMP* TYPE
TD IERR
   JMP Q0
/KEYBOARD HANDLER
KI BS;KJ;KK
K0
   IOF
   SNA; DZM KK
   LAC K0; DAC* RETAD
   LAC KK; DAC* ACCAD
   SNA; JMP KS
   DZM KK
   ISZ KJ; LAC* KJ
   SMA!SZA; DAC KK
   JMP Q0
KS LAC KD; SAD (I7; JMP Q0
   LAC WAIT; DAC K
   DAC T
K1 LAC (BS; DAC KI
   LAC TCHAR; SZA        /PENDING LF?
K2 JMS TYPE
K3 LAC KI
   SAD (BS+111; JMP K9
   JMS KD
   SAD (177; JMP K4
   SAD (25; JMP K5
   SAD (LF; JMP K6
   SAD (CR; JMP K7
   SAD (4; JMP K8
   DAC* KI
   ISZ KI; ISZ LP
   JMP K3
K4 LAC KI
   SAD (BS; JMP K3
   TAD (-1; DAC KI
   ISZ LP; LAC (42
   JMP K2
K5 LAC KI
   SAD (BS; JMP K3
   LAC (100; JMS TYPE
   LAC (CR; JMS TYPE
   LAC (LF; JMS TYPE
   JMP K1
K6 LAC (CR
   JMP K2
K7 DZM LP
   LAC (LF; DAC TCHAR
K8 DAC* KI; ISZ KI
K9 DZM* KI
   LAC (BS; DAC KJ
   LAC KI
   DAC TI; DAC TJ
   LAC BS; DAC KK
   LAC (JMS K0; DAC K
   LAC (JMS T0; DAC T
   JMS KD; JMP Q0
KD Q0
   JMP Q0
/MESSAGE OUTPUT SR
M0
   DAC M1+1              /DEVICE
   LAC WAIT
   IOF
   DAC M; DZM TEST
   ION
   JMS MESS
M1 .SIXBT ("@@*** NOT READY;
M2 JMS TEST
   LAC (1; XCT K
   SAD (12; SKP; JMP M2
   LAC (JMS M0
   IOF; DAC M; ION
   JMP* M0
MESS
M5 LAC* MESS; DAC MI
   ISZ MESS
   LAW -3; DAC MK
M6 LAC MI
   SMA!CLL; STL
   RTL; RTL; RTL
   DAC MI
   RAL; AND (177
   SAD (100; JMP M7
   SAD (73; JMP* MESS
   SAD (42; LAC (LF
   DAC MJ
   JMS TEST
   LAC MJ; XCT T
M7 ISZ MK; JMP M6
   JMP M5
/INITIALISE  (OVERWRITTEN)
QI -400
DA LAC 2001
DB DAC 1
Q  ISZ DA
X  ISZ DB
TRY ISZ QI
MI JMP DA
MJ LAC 0
MK SMA!SZA
   DAC BV
   CAF
                         /PRIORITY QUEUE (?)
Q0 DZM TEST
Q1 LAC (RET; DAC RETAD
   LAC (ACC; DAC ACCAD
   LAC ACC
   ION; DBR
   JMP* RET
Q2 IOF
   CLC; TAD TEST
   DAC* RETAD
   DZM TEST
   ISZ RETAD
   ISZ ACCAD
   LAC* RETAD
   DAC QI
   LAC* ACCAD
   ION; DBR
   JMP* QI
Z1 JMP Z1
DTCA=707541;DTRA=707552;DTXA=707544
DTLA=707545;DTRB=707572
RSF=700101;RCF=700102;RRB=700112
RSA=700104
PSF=700201;PCF=700202;PSA=700204
TSF=700401;TCF=700402;TLS=700406
KSF=700301;KRB=700312
 .END
END OF OUTPUT

