1
0
mirror of https://github.com/livingcomputermuseum/pdp7-unix.git synced 2026-02-07 17:02:05 +00:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
Warren Toomey
2016-02-27 08:02:18 +10:00
4 changed files with 1310 additions and 1 deletions

View File

@@ -30,3 +30,6 @@ ind.b: page 2 of 08-rest.pdf
lease.b: page 4 of 08-rest.pdf
as.s: pages 32-48 of 05-1-4.pdf
ed1.s: pages 7-20 of 08-rest.pdf
ed2.s: pages 21-29 of 08-rest.pdf

View File

@@ -1,3 +1,4 @@
"** 04-cas.pdf page 1
" cas
narg = i 017777
@@ -60,6 +61,7 @@ mes:
dac 10
advanc:
"** 04-cas.pdf page 2
lac nchar
dzm nchar
sza
@@ -121,6 +123,7 @@ adv1:
sad o170
skp
jmp 1f
"** 04-cas.pdf page 3
dzm vis
jmp advanc
1:
@@ -182,6 +185,7 @@ adv1:
alss 6
llss 3
tad o60060
"** 04-cas.pdf page 4
dac i 10
cla
llss 3
@@ -243,6 +247,7 @@ loop:
lac dely ;"dx ,gr, 0
sna
jmp c3
"** 04-cas.pdf page 5
spa
jmp c4
lac d1
@@ -304,6 +309,7 @@ a:
dac dist
tad incxp
dac tmp
"** 04-cas.pdf page 6
lac i tmp
dac incx
lac dist
@@ -364,7 +370,7 @@ com:
tad y
dac y
jmp loop
"** 04-cas.pdf page 7
out:
lac nx
dac x
@@ -425,6 +431,7 @@ dm3: -3
dm4: -4
o162: 0162
o166: 0166
"** 04-cas.pdf page 8
o17: 017
o777: 0777
o72: 072
@@ -486,6 +493,7 @@ o12060: 012060
"** 04-cas.pdf page 9
:ca
v
af
@@ -548,6 +556,7 @@ x
mk
v
ma
"** 04-cas.pdf page 10
aa
ak
x
@@ -609,6 +618,7 @@ r
:ci
x
"** 04-cas.pdf page 11
md
v
mi
@@ -670,6 +680,7 @@ r
:cm
v
aa
"** 04-cas.pdf page 12
hf
ak
nk
@@ -731,6 +742,7 @@ ck
kk
mi
mc
"** 04-cas.pdf page 13
x
jh
v
@@ -792,6 +804,7 @@ x
aa
v
ka
"** 04-cas.pdf page 14
mc
ml "???
kk
@@ -853,6 +866,7 @@ v
if
x
ak
"** 04-cas.pdf page 15
v
if
nf
@@ -914,6 +928,7 @@ gc
ia
ma
ml "???
"** 04-cas.pdf page 16
mc
mi
kk
@@ -975,6 +990,7 @@ hi
fk
x
mn
"** 04-cas.pdf page 17
x
mn
r

771
scans/ed1.s Normal file
View File

@@ -0,0 +1,771 @@
"** 08-rest.pdf page 8
"[handwritten page number top right of scan - 1]
" ed1
lac d1
sys write; 1f; 3
lac o17
sys creat; tname
spa
sys save
dac sfo
sys open; tname; 0
spa
sys save
dac sfi
-1
tad lnodp
dac zermp
tad d1
dac zerop
dac dot
tad d1
dac eofp
dzm i eofp
dzm i zerop
dzm lastre
dzm fbuf
lac d1
dac dskadr
dac wrlfg
dzm diskin
"o------------> [scan markup]
jmp advanc
1:
<ed>; <it>; 012
advanc:
jms rline
lac linep
dac tal
dzm adrflg
jms addres
jmp comand
-1
dac adrflg
lac addr
dac addr1
dac addr2
1:
lac char
sad o54
jmp 2f
sad o73
skp
jmp chkwrp
lac addr
dac dot
2:
jms addres
jmp error
lac addr2
dac addr1
lac addr
dac addr2
jmp 1b
"** 08-rest.pdf page 9
"[handwritten page number top right of scan - 2]
chkwrp:
-1
tad addr1
jms betwen; d1; addr2
jmp error
comand:
lac char
sad o141
jmp ca
sad o143
jmp cc
sad o144
jmp cd
sad o160
jmp cp
sad o161
jmp cq
sad o162
jmp cr
sad o163
jmp cs
sad o167
jmp cw
sad o12
jmp cnl
sad o75
jmp ceq
jmp error
ca:
jms newline
jms setfl
lac addr2
dac dot
ca1:
jms rline
lac line
sad o56012
jmp advanc
jms append
jmp ca1
cc: cd:
jms newline
jms setdd
lac addr1
sad zerop
jmp error
dac dot
tad dm1
dac 9
lac addr2
dac 8
2:
lac i 8
dac i 9
sza
jmp 2b
"??? illegible line cut off - dac 0, lac 0, something else???
"** 08-rest.pdf page 10
"[handwritten page number top right of scan - 3]
dac eofp
lac char
sad o144
jmp advanc
-1
tad dot
dac dot
jmp ca1
cp:
jms newline
cp1:
jms setdd
lac addr1
sad zerop
jmp error
1:
lac addr1
dac dot
lac i addr1
jms gline
dac 2f
lac d1
sys write; line; 2: 0
lac addr1
sad addr1
jmp advanc
tad d1
dac addr1
jmp 1b
cq:
jms newline
lac adrflg
sza
jmp error
sys exit
cr:
jms setfl
lac addr2
dac dot
jms rname
"------------> [scan markup]
sys open; fbuf; 0
spa
jmp error
dac tfi
lac linep
dac tal
dzm num
1:
lac tfi
sys read; tbuf; 64
sza
jmp 2f
lac tfi
sys close
jms number
jmp advanc
2:
"??? illegible line cut off - cma, sma, something else?
"** 08-rest.pdf page 11
"[handwritten page number top right of scan - 4]
tad d1
rcl
dac c1
lac tbufp
dac tal1
2:
jms getsc; tal1
sna
jmp 3f
jms putsc; tal
isz num
sad o12
skp
jmp 3f
lac tal
add o400000
and o17777
cma
tad linep
cma
dac linsiz
jms append
lac linep
dac tal
3:
isz c1
jmp 2b
jmp 1b
cw:
jms setfl
lac i addr1
sna
jmp error
jms rname
lac o17
sys creat; fbuf
spa
jmp error
dac tfi
-128
dac c2
lac tbufp
dac tal1
dzm num
1:
lac i addr1
jms gline
rcl
cma
tad d1
dac c1
lac linep
dac tal
2:
jms getsc; tal
sna
jmp 3f
isz num
jmp putsc; tal1
isz c2 "???
"** 08-rest.pdf page 12
"[handwritten page number top right of scan - 5]
jmp 3f
lac tfi
sys write; tbuf; 64
-128
dac c2
lac tbufp
dac tal1
3:
isz c1
jmp 2b
lac addr1
sad addr2
jmp 1f
isz addr1
jmp 1b
1:
lac tal1
sma cla
jmp 1f
jms putsc; tal1
1:
-1
tad tufp
cma
tad tal1
dac 1f
lac tfi
sys write; tbuf; 1: 0
lac tfi
sys close
jms number
jmp advanc
cn1:
lac adrflg
sna
jmp 1f
lac addr2
dac addr1
jmp cp1
1:
lac dot
tad d1
sad eofp
jmp error
dac dot
jmp cp1
ceq:
jms newline
jms setfl
lac addr2
dac dot
cma
tad zerop
cma
dac num
jms number
jmp advanc
setdd: 0
"** 08-rest.pdf page 13
"[handwritten page number top right of scan - 6]
lac adrflg
sza
jmp i setdd
lac dot
dac addr1
dac addr2
jmp i setdd
setfl: 0
lac adrflg
sza
jmp i setfl
lac zerop
tad d1
dac addr1
-1
tad eofp
dac addr2
jmp i setfl
newline: 0
jms getsc; tal
sad o12
jmp i newline
jmp error
addres: 0
dzm minflg "..) [stray scan mark?]
-1
dac addr
ad1:
jms getsc; tal
ad2:
jms betwen; d47; d56
skp
jmp numb
sad o40 "[o40 circled in scan]
jmp ad1 "[hand drawn check mark follows operand in scan]
sad o11
jmp ad1 "[hand drawn check mark follows operand in scan]
"[check mark underlined in scan]
sad o55
jmp amin "[hand drawn check mark follows operand in scan]
sad o56
jmp adot "[hand drawn check mark follows operand in scan]
sad o53
jmp ad1 "[hand drawn check mark follows operand in scan]
sad o44
jmp adol "[hand drawn check mark follows operand in scan]
sad o57
jmp fsrch "[hand drawn check mark follows operand in scan]
sad o77
jmp bsrch "[hand drawn check mark follows operand in scan]
dac char
lac minflg
sza
jmp error
lac addr
sma
isz addres
jmp i addres
"** 08-rest.pdf page 14
"[handwritten page number top right of scan - 7]
adot:
lac minflg
sza
jmp error
lac addr
sma
jmp error
lac dot
dac addr
jmp ad1
adol:
lac minflg
sza
jmp error
lac addr
sma
jmp error
-1
tad eofp
dac addr
jmp ad1
amin:
-1
dac minflg
jmp ad1
numb:
dac char
sad o60
jmp 1f
lac d10
jmp 2f
1:
lac d8
2:
dac 2f
dzm num
1:
lac num
cll; mul; 2: 0
lacq
tad char
tad dm48
dac num
jms getsc; tal
dac char
jms betwen; d47; d58
skp
jmp 1b
lac minflg
sna
jmp 1f
-1
tad num
cma
dac num
dzm minflg
1:
lac addr
"** 08-rest.pdf page 15
"[handwritten page number top right of scan - 8]
spa
lac zerop
tad num
dac addr
jms betwen; zermp; eofp
jmp error
lac char
jmp ad2
number: 0
lac d100000
dac n1
law tbuf-1
dac 8
n0:
lac num
cll; idiv; n1: 0
dac num
lacq
tad d48
dac i 8
lac n1
cll; idiv; 10
lacq
dac n1
sza
jmp n0
lac o12
dac i 8
law tbuf-1
dac 8
dac 9
-5
dac n1
n2:
lac i 8
sad d48
skp
jmp n3
dzm i 9
isz n1
jmp n2
n3:
lac d1
sys write; tbuf; 7
jmp i number
rname: 0
lac fbufp
dac tal1
-8
dac c1
1:
jms getsc; tal
sad o40
jmp 1b
sad o12
jmp 1f
jms putsc; tal1
isz c1
jmp 1b
"** 08-rest.pdf page 16
"[handwritten page number top right of scan - 9]
jmp i rname
1:
lac tal1
sad fbufp
skp
jmp 1f
lac fbuf
sna
jmp error
jmp i rname
1:
lac o40
jms putsc; tal1
isz c1
jmp 1b
jmp i rname
gline: 0
dac glint1
jms getdsk
lac glint1 " [these 6 lines were surrounded by a box
adn o17777 " that was Xed out with an arrow pointing to it]:
tad dskbfp " --
dac ital "|\/|
lac linep "|/\|<---
dac otal " --
1:
lac ital
sad edskbfp
skp
jmp 2f
lac diskin
tad d1024
jms getdsk
lac dskbfp
dac ital
2:
jms getsc; ital
jms putsc; otal
sad o12
skp
jmp 1b
lac otal
sma
jmp 1f
cla
jms putsc; otal
1:
lac linpm1
cma
tad otal
jmp i gline
rline: 0
lac linep
dac tal
1:
cla
sys read; char; 1
lac char
"** 08-rest.pdf page 17
"[handwritten page number top right of scan - 10]
lrss 9
jms esc
lac char
and o777
jms esc
jmp 1b
esc: 0
sna
jmp i esc
jms putsc; tal
sad o12
jmp 2f
sad o100
jmp 1f
sad o43
skp
jmp i esc
-1
tad tal
dac tal
and o17777
sad linpm1
jmp 1f
jmp i esc
1:
lac linep
dac tal
jmp i esc
2:
lac tal
sma cla
jmp 1f
jms putsc; tal
1:
-1
tad linep
cma
tad tal
dac linsiz
jmp i rline
getsc: 0
lac i getsc
dac sctalp
isz getsc
lac i sctalp
dac sctal
add o400000
dac i sctal
ral
lac i sctal
szl
lrss 9
and o777
jmp i getsc
putsc: 0
and o777
"** 08-rest.pdf page 18
"[handwritten page number top right of scan - 11]
lmq
lac i putsc
dac sctalp
isz putsc
lac i sctalp
dac sctal
add o400000
dac i sctalp
sma cla
jmp 1f
llss 27
dac i sctal
lrss 9
jmp i putsc
1:
lac i sctal
and o777000
omq
dac i sctal
lacq
jmp i putsc
append: 0
-1
tad eofp
dac 8
cma
tad dot
dac apt1
1:
lac i 8
dac i 8
-3
tad 8
dac 8
isz apt1
jmp 1b
isz eofp
dzm i eofp
isz dot
jms addline
jmp i append
addline: 0
lac dskadr
dac i dot
jms getdsk "[line crossed out - scan markup]
-1
tad linsiz
cma
dac apt1
law line-1
dac 8
lac dskadr "[line crossed out - scan markup]
and o1777 "[line crossed out - scan markup]
tad dskbfp "[line crossed out - scan markup]
dac otal "[line crossed out - scan markup]
lac dskadr "[line crossed out - scan markup]
tad linsiz "[line crossed out - scan markup]
dac dskadr "[line crossed out - scan markup]
"** 08-rest.pdf page 19
"[handwritten page number top right of scan - 12]
1:
lac otal " [these 9 lines were surrounded by a box
sad edskbfp " that was Xed out]:
skp " --
jmp 2f "|\/|
lac diskin "|/\|
tad d1024 " --
jms getdsk "
lac dskbfp "
dac otal "
2: "[line crossed out - scan markup]
lac i 8
dac i otal "[line crossed out and a note that looks like *jous prtwrd*]
isz otal
dzm wrflg "[line crossed out - scan markup]
isz apt1
jmp 1b
jmp i addline
getdsk: 0 "[the entire getdsk procedure was surrounded
and o776000 " by a box that was Xed out]:
sad diskin " --
jmp i getdsk "|\/|
dac 2f "|/\|
lac wrflg " --
sza "
jmp 3f "
lac diskin "
dac 1f "
lac sfo "
sys seek; 1: 0; 0 "
lac sfo "
sys write; dskbuf; 1024 "
lac d1 "
dac wrflg "
3: "
lac 2f "
dac diskin "
lac sfi "
sys seek; 2: 0; 0 "
spa "
jmp i getdsk "
lac sfi "
sys read; dskbuf; 1024 "
jmp i getdsk "
betwen: 0
dac bett1
lac i betwen
dac bett2
isz betwen
lac i bett2
cma
tad bett1
spa
jmp 1f
lac i betwen
dac bett2
isz betwen
-1
tad i bett2
"** 08-rest.pdf page 20
"[handwritten page number top right of scan - 13]
cma
tad bett1
spa
1:
isz betwen
lac bett1
jmp i betwen
error:
lac d1
sys write; 1f; 1
jmp advanc
1:
077012

519
scans/ed2.s Normal file
View File

@@ -0,0 +1,519 @@
"** 08-rest.pdf page 21
"[handwritten page number top right of scan - 14]
" ed2
cs:
jsm getsc; tal
sad o40
jmp cs
sad o12
jmp error
dac delim
jms compile
lac tbufp
dac tal1
1:
jms getsc; tal
sad delim
jmp 1f
sad o12
jmp error
jms putsc; tal1
jmp 1b
1:
lac o12
jms putsc; tal1
jms newline
jms setdd
lac addr1
sad zerop
jmp error
1:
dac addr1
lac i addr1
jms execute
jmp 2f
lac addr1
dac dot
law line-1
dac 8
law nlist-1
dac 9
-64
dac c1
3:
lac i 8
dac i 9
isz c1
jmp 3b
-1
tad fchrno
dac linsiz
rcr
szl
xor o400000
tad linep
dac tal1 "???
lac tbufp
dac tal
3:
jms getsc; tal
sad o12
jmp 3f
jms putsc; tal1
isz linsiz "???
"** 08-rest.pdf page 22
"[handwritten page number top right of scan - 15]
jmp 3b
3:
-1
tad lcrhno
rcr
szl
xor o400000
tad nlistp
dac tal
3:
jms getsc; tal
jms putsc; tal1
isz linsiz
sad o12
skp
jmp 3b
jms addline
2:
lac addr1
sad addr2
jmp advanc
tad d1
jmp 1b
fsrch:
dac delim
jms compile
jms srcsav
lac dot
floop:
tad d1
dac addr
lac i addr
sza
jmp 1f
lac zerop
dac addr
jmp 2f
1:
jms execute
jmp 2f
jms srcres
jmp ad1
2:
lac addr
sad dot
jmp error
jmp floop
bsrch:
dac delim
jms compile
jms srcsav
lac dot
dad zerop
lac eofp
bloop:
tad dm1
dac addr
lac i addr
"** 08-rest.pdf page 23
"[handwritten page number top right of scan - 16]
sza
jmp 1f
lac eofp
dac addr
jmp 2f
1:
jms execute
jmp 2f
jms srcres
jmp ad1
2:
lac addr
sad dot
jmp error
jmp bloop
srcsav: 0
lac minflg
sza
jmp error
lac addr
sma
jmp error
law line-1
dac 8
law tbuf-1
dac 9
-64
dac c1
1:
lac i 8
dac i 9
isz c1
jmp 1b
jmp i srcsav
srcres: 0
law tbuf-1
dac 8
law line-1
dac 9
-64
dac c1
1:
lac i 8
dac i 9
isz c1
jmp 1b
jmp i srcres
compile: 0
law compbuf-1
dac 8
dzm prev
dzm compflg
cadvanc:
jms getsc; tal
sad delim
jmp cdone
dac compflg "???
"** 08-rest.pdf page 24
"[handwritten page number top right of scan - 17]
dzm lastre
sad o12
jmp error
"sad o133
"jmp chrcls
sad o136 "???
jmp beglin
sad o44
jmp endlin
"sad o52
"jmp clsure
dac 1f
jmp comp
1; jms matchar; 1: 0; 0
jmp cadvanc
cdone:
lac compflg
sna
jmp 1f
dac lastre
jms comp
1; jms found; 0
jmp i compile
1: "???
lac lastre
sna
jmp error
jmp i compile
chrcls:
jmp error
beglin: "???
jms comp
1; jms matbol; 0
dzm prev
jmp cadvanc
endlin: "???
jms comp
1; jms mateol; 0
dzm prev
jmp cadvanc
clsure:
lac prev
sna
jmp error
tad d1
dac 1f
jms comp
1; jms matclo; 1: 0; 0
dzm prev
jmp cadvanc
comp: 0 "???
-1
tad comp
dac 9
lac 8 "???
"** 08-rest.pdf page 25
"[handwritten page number top right of scan - 18]
dac prev
1: "???
lac i 9
sna
jmp i 9
dac i 8
jmp 1b
execute: 0
jms gline
lac linep
dac tal1
dzm charno
dzm fchrno
dzm lchrno
lac jmpclist
dac trvect
lac jmpnlist
dac trvect+1
lac jmpxchg
dac i trvect+1
jmp 1f
exchg: "???
lacq
sad o12
jmp i execute
lac jmpxchg
dac i 8
1: "???
lac trvect
lmq
lac trvect+1
dac trvect
lacq
dac trvect+1
tad dm1
dac 8
jms getsc; tal1
lmq
isz charno
jms compbuf
charno:
0
trvect:
0;0
matchar: 0 "???
-2
tad matchar
dac exret
lac i exret
dac exret
lacq
sad i matchar
skp
jmp 1f
lac matchar
adn o17777
tad jms1
dac i 8 "??? [unreadable page cutoff]
"** 08-rest.pdf page 26
"[handwritten page number top right of scan - 19]
lac i exret
dac i 8
1: "???
isz exret
jmp i exret
found: 0
-2
tad found
dac exret
lac i exret
dac exret
lac fchrno
sza
jmp 1f
isz execute
jmp 2f
1: "???
sad i exret
jmp 1f
cma
tad i exret
spa
jmp 2f
jmp 3f
1: "???
lac charno
cma
tad charno
spa
jmp 3f
2: "???
lac i exret
dac fchrno
lac charno
dac lchrno
3: "???
isz exret
jmp i exret
matbol: 0 "???
lac charno
sad d1
jmp 1f
lac matbol
jmp 2f
1: "???
lac matbol
jmp 3f
mateol: 0 "???
lacq
sad o12
jmp 1f
lac mateol
2: "???
tad dm2
dac exret
lac i exret
dac 9
"??? [line is cut off in scan, maybe lac i 8 or jmp i 9]
"** 08-rest.pdf page 27
"[handwritten page number top right of scan - 20]
1: "???
lac mateol
3: "???
tad dm3
dac 9
lac i 9
isz 9
dac i 9
jmp i 9
matclo: 0 "???
-2
tad matclo
dac exret
lac i exret
dac cloret
lac i cloret
dac 1f
dac 2f
lac i matclo
dac exret
jms i exret; 1: 0
isz matclo
jms i matclo; 2: 0
isz cloret
jmp i cloret
"??? the remainder of this scan had an unreadable first character
"??? I did the best I could to recreate the characters appropriately
o1: 1
o133: 0133
dm3: -3
o136: 0136
dm2: -2
o52: 052
o57: 057
o77: 077
o40: 040
o12: 012
d47: 47
d58: 58
dm48: -48
d10: 10
d8: 8
d48: o60: 060
d100000: 100000
o44: 044
o53: 053
o56: 056
o55: 055
o11: 011
o400000: 0400000
o17777: 017777
o144: 0144
dm1: -1
o56012: 056012
o777: 0777
o100: 0100
o43: 043
o777000: 0777000
o75: 075
o167: 0167
o161: 0161
"** 08-rest.pdf page 28
"[handwritten page number top right of scan - 21]
o160: 0160
o143: 0143
o141: 0141
o1777: 01777
d1024: 1024
o776000: 0776000
o162: 0162
o163: 0163
o73: 073
o54: 054
o17: 017
tname:
0145056;0164155;0160040;040040
tbufp: tbuf
linep: line
nlistp: nlist
fbufp: fbuf
dskbfp: dskbuf "[line crossed out - scan markup]
edskbfp: dskbuf+1024 "[line crossed out - scan markup]
lnodp: lnodes
linpm1: line-1
jmpclist: jmp clist
jmpnlist: jmp nlist
jmpxchg: jmp xchg
jms1: jms 1
tal: .=.+1
exret: .=.+1
cloret: .=.+1
delim: .=.+1
prev: .=.+1
compflg: .=.+1
tal1: .=.+1
c1: .=.+1
ital: .=.+1
otal: .=.+1
diskin: .=.+1
glint: .=.+1
c2: .=.+1
num: .=.+1
zermp: .=.+1
minflg: .=.+1
adrflg: .=.+1
dot: .=.+1
addr: .=.+1
addr1: .=.+1
addr2: .=.+1
eofp: .=.+1
zerop: .=.+1
dskadr: .=.+1
linsiz: .=.+1
tfi: .=.+1
fchrno: .=.+1
lchrno: .=.+1
lastre: .=.+1
bett1: .=.+1
bett2: .=.+1
wrflg: .=.+1
apt1: .=.+1
"[page cuts off one label]
"** 08-rest.pdf page 29
"[handwritten page number top right of scan - 22]
sfo: .=.+1
sctal: .=.+1
sctalp: .=.+1
char: .=.+1
fbuf: .=.+4 "not sure if this is fbuf, but
tbuf: .=.+64 "there is a write; tbuf; 64 call
line: .=.+64
nlist: .=.+50
"??? ?list: .=.+50, unable to determine label
compbuf: .=.+100
dskbuf: .=.+1 "[line crossed out - scan markup]
lnodes: .=.+1000