1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-02 18:04:38 +00:00

GETSYM and 20XCSV - KCC support programs.

This commit is contained in:
Lars Brinkhoff
2017-01-27 11:50:35 +01:00
parent 8218e0368a
commit 77ca595bd8
5 changed files with 205 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ NETMASK=255,255,255,248
SRC = system syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \
midas _teco_ emacs emacs1 rms klh syshst sra mrc ksc eak gren \
bawden _mail_ l lisp libdoc comlap lspsrc nilcom rwk \
inquir acount gz sys decsys ecc alan sail
inquir acount gz sys decsys ecc alan sail kcc
DOC = info _info_ sysdoc sysnet kshack _teco_ emacs emacs1
BIN = sys2 device emacs _teco_ lisp liblsp alan inquir sail comlap

View File

@@ -97,6 +97,7 @@ A list of [known ITS machines](doc/machines.md).
5. Remaining programs are rebuilt:
- 11SIM, PDP-11 emulator.
- 20XCVT, convert TOPS-20 CSAVE file to PDUMP.
- @, cross reference generation tool.
- ACCLNK, sets com-link accept bit for specified TTY.
- ACOUNT, dummy account program used for users from safe sites.
@@ -145,6 +146,7 @@ A list of [known ITS machines](doc/machines.md).
- FRETTY, display list of free TTYs.
- FTPS, FTP Server.
- FTPU, FTP Client.
- GETSYM, copy all symbols from running ITS to a file.
- GMSGS, copy system messages to mail file.
- H3MAKE, a job that requests DRAGON to build host table.
- HEXIFY, convert COM file into Intel HEX format.

View File

@@ -1271,8 +1271,12 @@ respond "*" ":link dragon;hourly tmpkil,sys2;ts tmpkil\r"
respond "*" ":midas sys2;ts what_syseng;what\r"
expect ":KILL"
# EXECVT
respond "*" ":midas sys2;ts execvt_sysen3;execvt\r"
# Build KCC support programs: EXECVT, GETSYM, and 20XCSV.
respond "*" ":midas sys2;ts execvt_sysen3;execvt\r"
expect ":KILL"
respond "*" ":midas kcc;ts getsym_getsym\r"
expect ":KILL"
respond "*" ":midas kcc;ts 20xcsv_20xcsv\r"
expect ":KILL"
# UP

73
src/kcc/20xcsv.1 Executable file
View File

@@ -0,0 +1,73 @@
TITLE 20XCSV
;Reads a 20X CSAVE file and writes an ITS bin file.
A=1
B=2
C=3
D=4
E=5
T=6
TT=7
P=17
DKIC=10
DKOC=11
PDL: -20,,.
BLOCK 21
JCL: BLOCK 10
GO: MOVE P,PDL
.BREAK 12,[5,,JCL]
MOVE A,[440700,,JCL]
MOVE D,[440600,,B]
MOVEI B,0
FNR: ILDB C,A
CAIG C,40
JRST FNR2
CAIGE C,140
SUBI C,40
TLNE D,770000
IDPB C,D
JRST FNR
FNR2: .CALL [ SETZ ? SIXBIT/OPEN/ ? [.BII,,DKIC] ? [SIXBIT/DSK/] ? B ? SETZ ['20XBIN] ]
.LOSE %LSFIL
.CALL [ SETZ ? SIXBIT/OPEN/ ? [.BIO,,DKOC] ? [SIXBIT/DSK/] ? B ? SETZ ['BIN,,] ]
.LOSE %LSFIL
HRROI T,[JRST 1] ;F A D?
.IOT DKOC,T
LP: HRROI T,TT
.IOT DKIC,T ;Get IOWD
JUMPL T,EOFERR
JUMPGE TT,SADR
ADDI TT,1 ;AOBJN pointer
MOVE B,TT
MOVE D,TT ;Accumulate checksum in D
HRROI T,TT
.IOT DKOC,T
LP1: HRROI T,TT
.IOT DKIC,T
JUMPL T,EOFERR
ROT D,1
ADD D,TT
HRROI T,TT
.IOT DKOC,T
AOBJN B,LP1
HRROI T,D
.IOT DKOC,T
JRST LP
EOFERR: .VALUE
SADR: HRROI T,TT ;Output start address twice, no symbols
.IOT DKOC,T
HRROI T,TT
.IOT DKOC,T
.CLOSE DKOC,
.LOGOUT 1,
END GO

123
src/kcc/getsym.8 Executable file
View File

@@ -0,0 +1,123 @@
; -*- Midas -*-
title GETSYM - Extract ITS system symbol definitions
a=:1
b=:2
c=:3
d=:4
e=:5
t=:6
tt=:7
p=:17
chdsko=:16
call=:pushj p,
return=:popj p,
save==:push p,
rest==:pop p,
flose=:.lose %lsfil
slose=:.lose %lssys
pause=:.break 16,100000
quit=:.logout 1,
define syscall name,args
.call [setz ? .1stwd sixbit /name/ ? args(400000)]
termin
.insrt dsk:syseng;format >
outstr: syscall siot,[movei chdsko ? a ? b]
slose
return
define format &string&,args
call [
call $format
.zzz.==-1
irp arg,,[args]
save arg
.zzz.==.irpcnt
termin
hrroi a,[ascii string]
movei b,.length string
movni c,.zzz.+1
jrst format"format]
termin
$forma: save a
save b
save c
call @-3(p)
rest c
rest b
rest a
rest (p)
return
.vector pdl(lpdl==:100.)
usrvar: sixbit /OPTION/ ? tlo %opint\%opopc
sixbit /MASK/ ? move [%pipdl]
sixbit /XUNAME/ ? movem xuname
lusrvar==:.-usrvar
.scalar xuname,itsnam,itsvrs
go: move p,[-lpdl,,pdl-1]
move tt,[-lusrvar,,usrvar]
syscall usrvar,[movei %jself ? tt]
slose
syscall sstatu,[repeat 5,[ movem tt ? ] movem itsnam ? movem itsvrs]
slose
.vector syms(lsyms==:4000)
move t,[-lsyms,,syms]
move tt,[sixbit /CALLS/]
.getsys t,
.lose ; Just assemble with a larger LSYMS...
hrloi a,-1-syms(t)
eqvi a,syms ; A: aobjn to symbols
syscall open,[movsi .uao ? movei chdsko ? [sixbit /DSK/]
[sixbit /ITSSYM/] ? move itsvrs]
flose
.rdatim t,
format "; System symbols for ~S ITS ~S (dumped by ~S ~S-~S).~@
UNIVERSAL ITSSYM~@
ASUPPRESS~@
",[itsnam,itsvrs,xuname,t,tt]
loop: skipge 0(a)
jrst hkiled
move t,1(a)
tlne t,777000
jrst opdfed
format "~U=<~:H>~%",[0(a),1(a)]
jrst next
opdfed: format "OPDEF ~U [~:H]~%",[0(a),1(a)]
jrst next
hkiled: format "~U==<~:H>~%",[0(a),1(a)]
next: aobjn a,.+2
.lose ; Can't happen
aobjn a,loop
format "END~%"
quit
tsint:
loc 42
-ltsint,,tsint
loc tsint
400000,,p
ltsint==:.-tsint
cnstnts:
constants
variables
patch::
pat: block 100.
epatch: -1 ; Make memory exist, end of patch area
end go