1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-26 10:12:37 +00:00

Reconstructed code for earlier TVEDIT.

The file SYS2; TS TVEDIT from 1977-08-27 was assembled from a file
very close to SYSEN2; TVEDIT 110 dated 1977-12-27.  This commit
removes the comment before the CENT label and changed .INSRTs to not
use an archive file.

The three insert files come from disassembling the binary.
This commit is contained in:
Lars Brinkhoff
2019-01-03 14:59:05 +01:00
parent f72474e445
commit e483d6e653
5 changed files with 372 additions and 4 deletions

View File

@@ -1116,6 +1116,10 @@ expect ":KILL"
respond "*" ":midas sys2; ts record_sysen2; record\r"
expect ":KILL"
# TV paint program.
respond "*" ":midas sys2; ts tvedit_sysen2; tvedit\r"
expect ":KILL"
# Maze War
respond "*" ":midas /t sysbin;_imsrc; maze\r"
respond "with ^C" "MOUSE==1\r\003"

127
src/sysen2/filext.1 Normal file
View File

@@ -0,0 +1,127 @@
;Reconstructed from SYS2; TS TVEDIT dated 1977-08-27.
filext: push p,a
push p,b
push p,e
setz e,
filoop: pushj p,sixin
cain c,":
jrst fildev
cain c,";
jrst fildir
skipe n
movem n,nam1(e)
movei e,1
cain c,"
jrst filoop
pop p,e
pop p,b
pop p,a
popj p,
fildev: skipe n
movem n,dev
jrst filoop
fildir: skipe n
movem n,snam
jrst filoop
sixin: move a,[440600,,n]
setz n,
sixin1: pushj p,getlin
cain c,^M
jrst sixin2+1
caige c,40
jrst sixin1
move b,[440700,,sixlst]
push p,c
sixin4: ildb c,b
jumpe c,sixin3
came c,(p)
jrst sixin4
sixin2: pop p,c
popj p,
sixin3: pop p,c
cail c,"a
caile c,"z
addi c,40
tlne a,770000
idpb c,a
jrst sixin1
sixlst: asciz \ /,;:î_\
getlin: skipl linflg'
jrst readln
ildb c,ptr
cain c,^M
setzm linflg
popj p,
readln: push p,a
push p,b
move a,[440700,,linbuf]
movem a,ptr
read2: .iot tti,c
cain c,177
jrst rubout
cain c,^D
jrst cntrld
idpb c,ptr
cain c,^M
jrst carg
jrst read2
carg: setom linflg
move a,[440700,,linbuf]
movem a,ptr
pop p,b
pop p,a
jrst getlin
cntrld: movei c,[asciz / XXX? /]
pushj p,outstr
jrst readln+1
rubout: ldb c,ptr
ldb a,[360600,,ptr]
addi a,7
caig a,44
jrst rubot2
movei a,1
dpb a,[360600,,ptr]
sos ptr
hrrz b,ptr
caige b,linbuf
jrst beglin
ldb c,ptr
movei a,10
rubot2: dpb a,[360600,,ptr]
skipe prtty'
jrst rubot3
.call [ setz
sixbit /cnsget/
1000,,a
2000,,a
2000,,a
setzm a ]
.value
setom prtty
skipe a
movem a,prtty
rubot3: skipl prtty
jrst rubot4
.iot tto,c
jrst read2
rubot4: .iot tto,[^H]
pushj p,ttcntp
.iot tto,["K]
jrst read2
beglin: movei c,7
move a,[440700,,linbuf]
movem a,ptr
jrst rubot2+1
linbuf: block 20.
ptr: 0

133
src/sysen2/plotpk.1 Normal file
View File

@@ -0,0 +1,133 @@
;Reconstructed from SYS2; TS TVEDIT dated 1977-08-27.
mword=14
pmode=15
bit=16
getco: push p,a
push p,b
setz bit,
hlre a,cent
add a,x
jumpl a,getcon
caile a,recent
jrst getcon
idivi a,40
hrre mword,cent
add mword,y
jumpl mword,getcon
caile mword,706
jrst getcon
imuli mword,22
add mword,a
movei bit,a
movn b,b
lsh bit,43(b)
getcon: pop p,b
pop p,a
popj p,
plotp: pushj p,setalu
pushj p,getco
skipe bit
movem bit,tv(mword)
popj p,
plotpl: pushj p,setalu
hlre x,(a)
hrre y,(a)
pushj p,plotp+1
aobjn a,plotpl+1
popj p,
plotv: pushj p,setalu
push p,b
push p,c
hlre x,(a)
movem x,pxi'
hrre y,(a)
movem y,pyi'
hlre x,1(a)
movem x,pxf'
hrre y,1(a)
movem y,pyf'
sub x,pxi
movem x,pdeltx'
sub y,pyi
movem y,pdelty'
movm x,x
movm y,y
camg x,y
jrst plotvy
plotvx: move x,pdeltx
jumpg x,plotv2
pushj p,pswitc
plotv2: setzm pdx'
ploopx: move b,pdelty
imul b,pdx
idiv b,pdeltx
move x,pxi
add x,pdx
move y,pyi
add y,b
pushj p,plotp+1
aos pdx
camge x,pxf
jrst ploopx
pop p,c
pop p,b
popj p,
plotvy: move y,pdelty
jumpg y,plotv3
pushj p,pswitc
plotv3: setzm pdy'
ploopy: move b,pdeltx
imul b,pdy
idiv b,pdelty
move y,pyi
add y,pdy
move x,pxi
add x,b
pushj p,plotp+1
aos pdy
camge y,pyf
jrst ploopy
pop p,c
pop p,b
popj p,
pswitc: move c,pxi
exch c,pxf
movem c,pxi
movn c,pdeltx
movem c,pdeltx
move c,pyi
exch c,pyf
movem c,pyi
movn c,pdelty
movem c,pdelty
popj p,
plotli: pushj p,setalu
pushj p,plotv+1
hlre x,a
cail x,-2
popj p,
hlre x,1(a)
hrre y,1(a)
pushj p,plotp+1
aobjn a,plotli+1
setalu: skipe palu'
jrst setal2
.suset [.rtvcreg,,palu]
movem a,oalu'
ldb a,[341000,,palu]
exch a,oalu
setal2: camn pmode,oalu
popj p,
movem pmode,oalu
dpb pmode,[341000,,palu]
.suset [.stvcreg,,palu]
popj p,

100
src/sysen2/ttpak.1 Normal file
View File

@@ -0,0 +1,100 @@
;Reconstructed from SYS2; TS TVEDIT dated 1977-08-27.
ttcntp: movei c,^P
.iot tto,c
popj p,
tthome: pushj p,ttcntp
movei c,"T
ttout: .iot tto,c
popj p,
ttspos: push p,b
hrre b,a
hlre a,a
pushj p,ttcntp
movei c,"H
.iot tto,c
addi a,10
.iot tto,a
pushj p,ttcntp
movei c,"V
.iot tto,c
addi b,10
.iot tto,b
pop p,b
popj p,
ttclea: pushj p,ttcntp
movei c,"C
jrst ttout
ttcleo: pushj p,ttcntp
movei c,"E
jrst ttout
ttclin: pushj p,ttcntp
movei c,"L
jrst ttout
ttcchr: push p,a
pushj p,ttcntp
movei c,"K
.iot tto,c
pushj p,ttcntp
movei c,"F
.iot tto,c
sojg a,ttcchr+1
pop p,a
ttchr2: pushj p,ttcntp
movei c,"B
.iot tto,c
sojg a,ttchr2
popj p,
tthpos: pushj p,ttcntp
movei c,"H
.iot tto,c
addi a,10
.iot tto,a
popj p,
ttvpos: pushj p,ttcntp
movei c,"V
.iot tto,c
addi a,10
.iot tto,a
popj p,
ttup: pushj p,ttcntp
movei c,"U
jrst ttout
tthomd: pushj p,ttcntp
movei c,"Z
jrst ttout
outstr: push p,b
hrli c,440700
outst1: ildb b,c
jumpe b,outst2
.iot tto,b
jrst outst1
outst2: pop p,b
popj p,
decout: idivi n,10.
push p,n2
skipe n
pushj p,decout
pop p,c
addi c,"0
jrst ttout
ttscrs: pushj p,ttcntp
movei c,"S
jrst ttout
ttrcrs: pushj p,ttcntp
movei c,"R
jrst ttout

12
src/sysen2/tvedit.110 → src/sysen2/tvedit.109 Executable file → Normal file
View File

@@ -1,4 +1,8 @@
title tvdraw v5.100 err dev. installed
;Reconstructed from SYSEN2; TVEDIT 110 dated 1977-12-27 and
;SYS2; TS TVEDIT dated 1977-08-27.
a=1
b=2
c=3
@@ -38,7 +42,7 @@ macro: block 20 ;used for both jcl and macro definitions
held: 0 ;used to store points (h and j commands)
held2: 0
new: 0 ;used to hold new points
;cent: 400,,343 ;used to hold current point
cent: 400,,343 ;used to hold current point
old: 400,,343 ;used to hold previous point
delta: 0 ;used to hold delta-x and delta-y
size: 40 ;size of circles and the eraser
@@ -753,7 +757,7 @@ ioerr1: .iot dskchn,c
.iot tto,c
jrst ioerr1
.insrt ar9:filext >
.insrt filext >
subttl neutral package
nstart: movei mode,neutral
@@ -1346,7 +1350,7 @@ rlcfin: .call [setz
pushj p,writec
popj p,
subttl the end
.insrt ar9:ttpak >
.insrt ar9:plotpk >
.insrt ttpak >
.insrt plotpk >
end tvdraw