>>37<>12<<4>>12< >>37<<5552 >>37<>37<<248>>37<< 2vvv8 />>37< 78087 >>37<>37<<11 12>>34<<21 >>37<<5552 >>37<>17<<0>>14<<0>>17<< >>37<<55>>15<>37< 11>>37<<11 >>37<>37<<55>>15<>37<<0 xvvv8 555 >>37<<5552 >>37<<55>>15<>37<<0 2vvv>>16<< 1z53 >>16<//>>16<<
expensive typewriter 15 apr 1970
f=20000
0/ jmp aa
hlt
jmp be1
/common storage
b, f 401 /end of text
dimension foo(1)
dimension rpc(1) /repeat count
dimension lsy(1),chc(1),lo1(1),lo2(1),lo3(1)
lpp, 60. /lines printed per page
szp, 66. /lines per page
syl, 0 /decimal no. typed in
num, 0 /value of expression
sy2, 0 /value preceding comma
poi, 0 /current line no.
guc, 0 /line count of "g"
gul, 0 /upper limit of "g"
prc, 0
bb, f 400 /begin of current page
nf, i /last field assigned (for text)
paf, 0 /punch assigned
lnc, 0
ocp, 0
dpv, 0
csm, 0 /checksum
bc, 56 /break character for searches
/drum pointers
pfa, 0 /initial drum address
pfd, 0 /initial field
pwc, 0 /word count
phf, 0 /final field
pha, 0 /final drum address+1
pfr, 0 /read field
pfw, 0 /write field
dsn, 0 /-word count
>>13<>40<<>
lia /word count = min(size of buffer,size of rest of text)
law a
jda pcc
pay, jmp .
>>13<<>>32<<
/drum transfer, core address in AC, write if AC sign on,
/read if off, drum address set up by pad, word count in IO
/(may be 0)
/leaves word count in pwc, -word count in dsn (unless it was 0)
/end of drum area+1 in pha, AC is saved
/assigns more fields if necessary
pcc, 0
dio pwc
dap pcx
lac pwc
CAA|=
jmp pcx-1
dac dsn
law i 1
add pad
add pwc
dip phf
dac pha
idx pha
lio phf
lac nf
AMI>>40<<>
jsp fad
lac pfd
lio pcc
spi i
cla
dac pfw
xor pfd
dac pfr
dzm pc2
lac pfa
add pwc
sub (i
szm
jda pc2
pc1, lac pfw
add pfa
lia
dia
lac pfr
add pwc
sub pc2
cli+swp-opr
pc3, add pcc
dac pam
dcc
hlt
lac pam
sas pcc
jmp pc1
pcx-1, lac pcc
pcx, jmp .
>>13<>13<<
?MAIN LOOP
BE"= LEM ?READ GARBAGE FROM DRUM
LAW '
MTA >>04<<>>20<<>>20<<
NOP
SZA I
JMP >>20<< ?FIELD ' NOT ASSIGNED
LIO [~>>05<<'
DIA
LAW A
LIO [F ~<>>04<<+~>>05<<'
DCC
HLT
LAC A+20 /look for end pointer at 372
sza i
lac a /or get it from 352
dac b
and (-177777
sza
jmp ntd
lac a+373-352 /current page
dac bb
law i 1
add b
and (770000
dac nf
bee,
bes, nam
lem
jsp t35
bet, jsp dd
con-5, dzm sy2
con-4, dzm num
con-3, cla
dap sgn
dzm syl
con, clf 7
dzm rpc
jsp tot
law opt-1
dse, dap dsr
lai
rar 6s
dip ope
dip ept
dac chc
idx dsr
dsr, lac .
dap lcx
and (770000
sas chc
jmp dsr-1
lcr, lac dsr
sub (lac opn
sma
jmp lcx
jsp dlm
jsp tot
sad (40
jmp rt
dzm csm
sas (77
sad (36
jmp int
tcr, jsp t34
write -?>>40<<-
rrt, jsp t35
rt, law 77
jdp tys
jmp bet
>>13<<>>32<<
int, lac num
dac poi
lcx, jmp .
ic1, lai /used as lai
sad (char r0
cla
dac ocp
sar 4s
sza
jmp tcr
lac syl
sal 3s
add syl
add ocp
adm syl
jmp con
udt, jsp tot
lio (72
sas (72
tyo
lia
law upt-1
jmp dse
/assorted typewriter routines
tys, 0
lio (770000
rcl 6s
sni i
tym, tyo
sas (770000
jmp tys 2
jmp i tys
t34, dac tys
law 34
jmp tys 1
t35, dac tys
law 35
jmp tys 1
tot, dap .+3
tyi
lai
jmp .
>>13<<>>14<<
/dispatch table
opt, char lw prt /print a page
char li ins /insert before line N
char ll lin /print a line or lines
char ld dlt /delete a line or lines
char lk kll /kill a page or N pages
char la app /append at end of current page
char lr rea /append a tape or N pages to buffer
char lf fed /feed tape
char lv sin /insert stop code before line N
char ln nex /move forward N pages
char lc chn /change a line or lines
char lj jfp /jump to page N
char lt rep /punch N pages with stop codes
char ly typ /print N pages
char lb blk /dismiss
char lo cop /combine this page with next
char lu put /save a line or lines for g
char lg get /insert block saved by u
opn, char l spc
char lx xcp /dismiss punch
char lq wle /change within line
char lz wlz /ditto, assuming search
770000 con-5
360000 con-5
720000 con
char l/ bar /last line of page
char l, cmm
char l- min
char l. per /current line
char l( prn /comment
char l>>56<< ser /search for string on this page
char le equ /print value
740000 udt
750000 onl /print next line
char l>>40<< rt /cancel command
ope, ic1 /digits
>>13<>40<< sev /search entire buffer
char ll lps /set page size
char l9 opl /print preceding line
char ln qut /nightmare
char lm mm1 /merging assembly
char lc cc1 /certainly
char lf fil /file
char la eap /append new page
char lp pne /punch everything
char l0 slp /number of last page
char l4 cpn /number of current page
char lw wbf /print everything
char lt tit /title punch
char ls spz /set page length
char lb bup /set search break character
char l/ but /type current break character
char l1 up1 /beginning of string
char l2 up2 /end of string
char lx swa /swap high and low text
ept, tcr /illegal
>>13<<
/partial line numbers
up2, lio wlq
jmp pe1
up1, lio wlp
jmp pe1
/break character for searches
but, lac bc
jdp tys
jmp rt
bup, jsp tot
sas (77
dac bc
jmp rt
/equals
equ, jsp dlm
jdp dpt
law 36
jdp tys
jmp con-4
dlm, dap dlx
lac syl
sgn, opr
adm num
dlx, jmp .
/slash, period, space
bar, jsp sln
lio lnc
jmp pe1
per, lio poi
sni
lio (1
pe1, jsp dlm
dio syl
spc, jsp dlm
jmp con-3
/minus, comma
min, jsp dlm
law 1000
jmp con-2
cmm, jsp dlm
dac sy2
jmp con-4
>>13<>13<<7
/set highest assigned field to IO 0-5
/low IO clear
fad, dap fej
dio >>56<>40<
lac t1
ral 6s
jdp dpt
jsp txx
text .?
.35. >>40<<.
tyi
jmp fe0
>>13<>13<<>>17<<
/command "g"
get, jda fln
lac gul
sza i
jmp tcr
lio guc
dio foo
gv, dac los
stf 5
jmp in2
/command "u"
put, jdp ffl
sub fln
dac foo
lac num
jda fln
law i a-aa
add lo2
sub lo3
szm
jmp tcr
add (a
dac gul
idx foo
dac guc
lac lo3
jda pad
lac lo2
sub lo3
lia
law aa
jda pcc
jmp bet
/command "A"
eap, law 7734
jdp tys
jsp flp
move b,bb
dzm poi
stf 4
jmp in1
>>13<<.
/commands "c","i"
chn, jsp t34
jsp del
jmp ins 1
ins, jsp t34
law i 1
add poi
jda fln
in1, move lo2,lo1
dzm foo
stf 5
law aa
jda los
jsp tot
jsp pic
jmp .-2
/command "v"
sin, jda fln
lac (131313
dac aa
dzm foo
law aa 1
jmp gv
/command "a"
app, jsp t34
jsp sln
idx lnc
dac poi
jmp in1
/command "L"
lps, jsp dlm
sub mps
spa
jmp tcr
lac num
dac lpp
jmp rt
/command "S"
spz, jsp dlm
sub mps
spa
jmp tcr
lac num
dac szp
jmp rt
>>13<<>>37<<
/pack one character into output
pic, dap pix
cla
rcr 6s
sad (130000
jmp psc
sad (750000
jmp bks
dac dpt
pia, lio dpt
rir 6s
law 7700
pim, xct .
cma
pid, and
dio chc
ior chc
dac i pid
idx pim
sad (xct pit+3
jmp pii
pib, lac dpt
sad (130000
jmp pix+1
sas (770000
pix, jmp .
ral 6s
sas chc
jmp pia
lac pad
dac los
idx foo
jmp pix
psc, lac dpt /stop code
sad (770000
lac (130000
sad (130000
jmp pia-1
lac pix
dap pyx
lio (77
jsp pic /if last char was not stop code or c.r.
pyx, law . /precede this with c.r.
lio (13
jmp pic
>>13<>13<<>>32<<
/initialize writer
los, 0
dap tsx
law pit
dap pim
lac los
dac pad
law aa
dap pid
dzm gul
law i 7777
dac dpt
tsx, jmp .
ibi, law i aa
add los
jdp inq
law i aa
add los
adm lo1
law aa
dac chc
bid, lac i los
dac i chc
idx chc
idx los
sas (a
jmp bid
lac chc
dap pid
dac pad
law aa
dac los
jmp piy
>>13<>13<<>>53<<
/fetch one character for output
1c, dap 1cx
idx 1cs
1ca, lac .
1cs, xct .
and (77
sas (77
sad (13
jda 1ci
1cx, jmp .
1ci, 0
dap 1cj
law 1ct-1
dap 1cs
idx 1ca
isp dsn
jmp 1cj-1
lac pha
jda pam
dap 1ca
lac 1ci
1cj, jmp .
1ct, ral 6s
rar 6s
opr
jmp .+1
law 1c+1
jmp 1ci+1
1su, 0
dap 1cj
dzm dsn
lac 1su
dac pha
jmp 1ci+2
>>13<>56<>05<>56<>05<>13<>56<>56<>13<>56<>56<>13<<>>34<<
1aw, lac lnc
dac poi
dac num
jmp con-3
ses, dac lnc
jda fln
lac lo1
jmp srs
ssc, szs 10
jmp bet
lac 1ca
sub (lac a
add pad
sub b
szf 4
sma
jmp mis
add b
jmp sro
mis, write [-missing
>>40<<-]
jmp bez
sr9, dzm wlp
idx lnc
jmp sr1 3
/backspace, up arrow
opl, law i 2
adm poi
onl, idx poi
dzm sy2
dac num
/command "l"
lin, sza i
jmp onl
lac sy2
sza
sub num
sub (1
dac rpc
add num
dac foo
add (1
jda fln
lac lo1
dac lo3
jda 1su
lir, jsp t1l
isp rpc
jmp lir
jmp tyt 2
>>13<<>>53<<
/output one line
t1l, dap t1x
szs 20
szf 3
jmp t1c
law 1
add foo
jdp dpt
law 36
jdp tys
t1c, szs 10
jmp rrt
jsp 1c
sad (13
jmp tcr
szf 3
jda p1o
lia
xct tym
t1r, sas (77
jmp t1c
idx foo
t1x, jmp .
p1o, 0
law 6000
add p1o
dap p1s
lio (525
p1s, sir
rar 7s
rcl 7s
ppa
law i 277
A>>05<>13<<>>76<<
ntd, write [/
no text>>40<]
dsm
/command "b"
blk, jsp t34
jsp dd
jsp dp
dsm
prn, law 1
dac prc
jsp tot
sub (56
SA=
sad (1
adm prc
lac prc
sza
jmp prn+2
jmp con
/decimal print
dpt, 0
dac ocp
dzm lnc
dpa, dac dpv
mul (1
div .+1
rad, 10.
sas lnc
jmp dpa
sni
lio (20
xct tym
lac dpv
dac lnc
lac ocp
sas lnc
jmp dpa
jmp i dpt
/text printer
txx, dap txu
lio i txu
idx txu
lac (607600
rcl 6s
sad ic1 /lai
txu, jmp .
sad . 2
jmp txx 1
swp
xct tym
lia
jmp txu-3
>>13<<>>35<<
/command "t"
rep, feed 1
init pu0,bet
jmp typ+2
soo, dap soj
szf 3
stf 4
feed 20
lio (13
ppa
law i 277
add csm
ior (100
lia
szf i 4
jmp .+3
szs i 50
ppa
dzm csm
feed 40
soj, jmp .
/command P
pne, feed 1
szs 60
jmp pnh
lac (20400
jda 1su
clf 1
pnf, jsp 1c
sad (77
jmp png
stf 1
jdp tt1
jmp pnf
png, szf i 1
jmp pnf
pnh, feed 50
init pu0,xcp
jmp wbf 2
>>13<>13<<9
prl, law 1
mul foo
div lpp
mps, 2
A>>05<>13<<0
/command "r"
rea, sub (1
dac num
law 51
arq
jmp rby
law i 1
adm b
sas (f 400
idx b
jda los
dzm prc
dzm foo
stf 2
stf 6 /to quote backspace
rpa-i
rel, lac (740000
dac lsy
rek, cks
ril 1s
spi
jmp rei
isp lsy
jmp rek
jmp ren
rei, rrb
rpa-i
dio lsy
rln, lac lsy
rar 7s
szf 4
jmp rem
spq
jmp rel
law 1000
add lsy
dap rp1
law i 264
xor lsy
add csm
and (277
dac csm
law i 5252
szs i 60
rp1, rar
sma
jmp rpe
>>13<<>>12<<
rlt, lio lsy
jsp pic
lac dpt
sas (130000
jmp rel
stf 4
dzm foo
idx prc
lac num
spa
jmp rel
sub (1
dac num
sma
jmp rel
ren, lio (13
lac dpt
sas (130000
jsp pic
law i 51
arq
jsp piw
lac pha
dac b
jmp bet
rby, write [/
busy
>>40<] jmp bet
>>13<>40<<-]
law 1
add prc
jdp dpt
write [- line >>40<<-]
law 1
add foo
jdp dpt
law 36
jdp tys
law 10
dac rad
lac lsy
jdp dpt
law 10.
dac rad
law 3577
jdp tys
cli
jmp rlt
rem, lio csm /look for checksum
dzm csm
clf 4
sma
jmp rln+4 /no delete bit punched
law i 100
and lsy
szs 60 i
A~IP|
jmp rel
jsp t34
write [-cksm page >>40<<-]
lac prc
jdp dpt
law 3577
jdp tys
jmp ren+4
>>13<<7
/find line, number in AC. returns with drum address of line
/in lo1, drum addr of next line in lo2, unless ask for line zero,
/in which case both point to line 1
fln, 0
dap flx
lac fln
spa
jmp tcr /negative?
lia
cma
dac chc
lac bb
dac lo2
dac lo1
sni
jmp flx
fl0, jda pam
dap fl4
fl1, law 77
fl4, and
sad (13
jmp tcr /ran off end of page
sad (77
jmp fl2
fl3, idx fl4
isp dsn
jmp fl1
lac pha /get another buffer
jmp fl0
fl2, lac lo2 /cr found
dac lo1 /beginning of this line
lac pad
add fl4
sub (and a-1
dac lo2 /beginning of next line
isp chc
jmp fl3
flx, jmp .
>>13<>13<<>>14<< /command "M"
mm1, ZAP
/command "N"
qut, law 7776
lio (620000
dio num
qut+3, dap .+2
lac (dcc
dac 0
jsp t34
jsp dp
cli>>05<>05<>05<>05<>13<<.
/dismiss
dd, dap dxd
law a
dap .+1
dzm .
idx .-1
sas .+2
jmp .-3
dzm a+21
lac b
dac a /352
dac a+20 /372
lac bb
dac a+21 /373
lio (f 352
dia
law a
lio (22
dcc
hlt
dxd, jmp .
xcp, law rt
dp, dap ddx
dzm paf
law i 47
arq
ddx, jmp .
/command "F"
fil, jsp dp
law 16
mta 204 /clear out old assignment
jsp dlm
and (17
ral 6s
ior (16
mta 306
jmp rby
law 3477
jdp tys
ZAI
ivk 16
skp i
jmp 2
write [/
not ready/35/
>>40<] jmp bet
>>13<<
?TITLE PUNCH
TIT= LAW >>04<<<
SAD PAF
JMP x >>04<<
ARQ
JMP RBY
DAC PAF
JSP T~>>04<<
TTA= TYI
LAI
SAD [<<
JMP BET+"
JDP TT"
JMP TTA
?TITLE PUNCH SUBROUTINE
TT"= >>20<<
DAC TT'
SAL 'S
ADM TT'
LAW I >>05<<
DAC TT~
TT>>04<<= IDX TT'
MUL TT>>05<<
ADD TT>>06<<
DAP TT<
CLA
RCL 'S
ADD TT>
DAP x '
TT<= LAC x
XCT x
AND [<<
ADD TT>>06<<+"
SWP
PPA
ISP TT~
JMP TT>>04<<
LIO TT>>06<<+"
PPA
JMP I TT"
>>13<>20<<= >>20<< >>20<< ?SPACE
>>04<<>>04<<<>>06<<>>04<<>>20<< >>04<<>>04<<>>06<<' >>05<<'>>05<<'>>04<<>>04<< ?"='
>>04<<'>>05<<'>>05<<' >>05<<''>>04<<">>20<< ?~
">>04<<"'<>>06<< ">>20<<>>05<<>>06<<>>05<<' >>05<<'>>05<<''>>20<< ?>>04<<=>>05<<
~>>04<<>>05<<'>>05<<' >>05<<''>>20<<>>20<<>>20<< ?>>06<<
'>>06<<'"' >>06<<'>>04<<>>05<<' >>05<<'>>05<<''>>04<< ?<=>
>>20<<>>04<<>>05<<'>>05<<' >>05<<'~>>04<<>>20<<>>20<< ?^
TT>>>40<<= x " RAR " RAL >>05<>20<< >>20<< >>20<<
>>20<< ~>>04<<
>>04<<'>>04<<'>>04<<' ~>>04<<>>04<<>>20<<'>>20<< ">>20<<>>20<<>>04<<>>20<<' ?>>20<<=?
>>20<<>>04<<>>05<<'>>05<<' >>05<<''>>20<<>>20<<' ?S
'<>>06<<>>20<<' '~>>06<<>>04<<>>20<< >>04<<>>20<<>>04<<>>20<<~>>06<< ?T=U
">>06<<'>>20<<>>04<<>>20<< '>>20<<">>06<<~>>06<< ?V
>>04<<>>20<<~>>20<<>>04<<>>20<< ~>>06<<>>04<<''>>04<< ">>20<<'>>04<<>>04<<' ?W=X
'>>20<<>>04<<<>>20<< >>04<<>>20<<'>>04<<' ?Y
>>06<<'>>05<<'>>04<<>>06<< >>04<<'>>20<<>>20<<>>20<<>>20<< >>20<< ?Z
">>04<<">>04<<">>04<< ">>04<<">>04<<>>20<<>>20<< ?=
0 0 0
0 0
tt3>>40<<, 0 1010 761010 />>40<< (punches +)
204040 360076 /j
101024 427640 404040 /k,l
760410 47676 /m
41020 763442 424234 /n,o
761212 120434 /p
424222 547612 123244 /q,r
tt5>>40<<, 125252 100
tt6>>40<<, tt0 1010 101010 /-
42 340000 /)
7600 34 420000 /| ,(
tt2>>40<<, 0 74
121212 747652 525224 /a,b
344242 422476 /c
424242 347652 524242 /d,e
761212 20234 /f
424252 727610 101076 /g,h
4276 420000 /i
0 60 600000 /.
0 0
variables
constants
z=7700
aa, a=aa+1000 aaa=aa+400
>>13<>13<<
/window
offset 0
tot 1/ jmp ew
7100/ 131313
131313
7140/
ew, szs 50
jmp df
lac bb
dip pfd
dap pfa
lio (600
law 6300
jda pcc
law 13
lio poi
AMII<
AMIA
add (add-25
dac >>56<
jmp di
TXA
dap dr
nam
dr, law .
dap ddp
law cd9
dac cds
lac (add-25
dac >>56<>13<<
cks
ril 3s
spi
jmp df
ddp, lac .
ral 6s
jdp cd
xct ddp
rar 6s
jdp cd
xct ddp
jmp de
df, tyi
clf 3
jmp tot 2
cdc, ZAP
law 200
add dr 2
dac cds
jmp i cd
cds, cd9
cdx, 500000
cdy, 300000
c9d, sas (add
jmp c8d
idx cd4-1
dap . 1
jmp .
c8d, law 3000
dap cd6 2
cma
adm cdy
xct cd4-1
jmp cd1
cd8, lac (-14000
adm cdy
jmp dj
>>13<<6
/character display
cd, 0
and (77
sal 1
add cds
dap cd4-1
cla
dap cd6 2
law cd5-1
dap cd4
xct cd4-1
spa
jmp c9d
cd1, and (376000
TAXA
lio cdy
cd2, A+XX<
jmp cd3
lac cdx
dpy-i 200
cd3, law 1000
A+II
lac (376000
A>>06<>13<<0
cd9, 0 0 /space
27 740000 /1
305214 462306 /2
105014 462266 /3
36100 437610 /4
137114 462261 /5
175114 462262 /6
3610 441203 /7
155114 462266 /8
15114 452236 /9
add jmp i cd
add jmp dr /stop
51253 305010 /pointer
add jmp i cd
add jmp i cd
add jmp i cd
175014 60276 /0
100200 401002 //
221245 211000 /s
10764 211000 /t
171004 37000 /u
70404 10034 /v
171003 20074 /w
210501 12104 /x
417104 417600 /y
211445 223104 /z
add jmp i cd
500200 0 /,
add jmp i cd
add jmp i cd
add jmp cd7 /tab
add jmp i cd
>>13<<>>14<<
0 400000 />>40<<
501004 217200 /j
376202 421000 /k
1774 0 /l
370047 401170 /m
370040 236000 /n
161044 216000 /o
776110 441400 /p
414110 477640 /q
370040 202000 /r
add jmp i cd
add jmp i cd
20100 402010 /-
1012 107000 /)
2010 40201 />>56<<
342 120200 /(
add jmp i cd
161044 237100 /a
377104 414000 /b
161044 212000 /c
161044 237600 /d
161245 226000 /e
21760 440400 /f
415114 457600 /g
376100 434000 /h
7 500000 /i
add jmp cdc
4 0 /.
add jmp cdc 1
add jmp i cd
add jmp i cd
add jmp cd8
>>13<<>>40<<
0 0 /space
30 600 /"
0 140000 /'
4010 40401 /~
104422 110434 />>04<<
70402 10034 />>05<<
70020 100434 />>06<<
20242 120200 /<
1012 105010 />
10027 740404 /^
add jmp i cd
add jmp dr /stop
51253 305010 /pointer
add jmp i cd
add jmp i cd
add jmp i cd
20102 507010 />>20<<
4015 42206 /?
115114 462262 /S
2017 740201 /T
177004 20077 /U
76404 10037 /V
177003 20077 /W
306240 405143 /X
6047 401003 /Y
303214 461303 /Z
add jmp i cd
50241 205024 /=
add jmp i cd
add jmp i cd
add jmp cd7 /tab
add jmp i cd
>>13<>40<<
101004 20077 /J
376101 210501 /K
377004 20100 /L
376020 200577 /M
376040 404177 /N
175014 60276 /O
376110 442206 /P
175015 50336 /Q
376111 452306 /R
add jmp i cd
add jmp i cd
20103 702010 /+
1014 77600 /]
7 740000 /|
1774 60200 /[
add jmp i cd
370221 44574 /A
377114 462266 /B
175014 60242 /C
377014 60276 /D
377114 462301 /E
376110 442201 /F
175015 64262 /G
376100 402177 /H
1017 760200 /I
add jmp cdc
104240 405042 /x
add jmp cdc 1
add jmp i cd
add jmp i cd
add jmp cd8
>>13<<>>16<<