mirror of
https://github.com/PDP-10/its.git
synced 2026-01-18 17:16:59 +00:00
Add MKSVFL, to generate SAV FILE and FIXUP FILE.
These two databases contain pure code routines that Muddle images can refer to. We don't currently have whatever tool was used to maintain them, so this is a MIDAS program that creates and populates them. SAV FILE includes some stubs for functions in the LSRTNS and MUDDLE libraries -- these are the functions that the existing Muddle 54 Zork images need. For the FIELD function in LSRTNS, returning FALSE is equivalent to the user not being found. I have no idea what C-FCN in MUDDLE is for, but very early Zork calls it after a command is entered, and seems happy enough with it doing nothing.
This commit is contained in:
parent
2b66dfce6e
commit
3758abedbd
@ -23,6 +23,12 @@ proc build_muddle {dir version} {
|
||||
build_muddle "muds54" "54"
|
||||
build_muddle "mudsys" "56"
|
||||
|
||||
# Generate SAV FILE and FIXUP FILE for Muddle pure code library
|
||||
respond "*" ":midas mudsys; ts mksvfl_mudsys;mksvfl\r"
|
||||
expect ":KILL"
|
||||
respond "*" ":mudsys;mksvfl\r"
|
||||
expect ":KILL"
|
||||
|
||||
respond "*" ":midas sys3; ts mudinq_sysen2; mudinq\r"
|
||||
expect ":KILL"
|
||||
respond "*" ":link sys3; ts purge, sys3; ts mudinq\r"
|
||||
|
||||
135
src/mudsys/mksvfl.1
Normal file
135
src/mudsys/mksvfl.1
Normal file
@ -0,0 +1,135 @@
|
||||
; -*-MIDAS-*-
|
||||
TITLE MKSVFL -- Make a new Muddle SAV FILE and FIXUP FILE
|
||||
|
||||
O=0
|
||||
A=1
|
||||
B=2
|
||||
C=3
|
||||
D=4
|
||||
E=5
|
||||
PVP=6
|
||||
TVP=7
|
||||
SP=10
|
||||
AB=11
|
||||
TB=12
|
||||
TP=13
|
||||
FRM=14
|
||||
M=15
|
||||
R=16
|
||||
P=17
|
||||
|
||||
TFALSE==21
|
||||
FINI54==703036 ;FINIS in TS MUD54
|
||||
|
||||
PGSIZE==2000
|
||||
PDLSIZE==1000
|
||||
OUTCH==1
|
||||
|
||||
LOC 100
|
||||
|
||||
START: MOVE P,[-PDLSIZE,PDL]
|
||||
|
||||
MOVEI A,[SIXBIT /SAV/] ;write SAV FILE
|
||||
MOVEM A,OPNNM1
|
||||
.CALL OPNBLK
|
||||
.LOSE
|
||||
.IOT OUTCH,[-<SFEND-SFBEG>,,SFBEG]
|
||||
.CLOSE OUTCH,
|
||||
|
||||
MOVEI A,[SIXBIT /FIXUP/] ;write FIXUP FILE
|
||||
MOVEM A,OPNNM1
|
||||
.CALL OPNBLK
|
||||
.LOSE
|
||||
.IOT OUTCH,[-<FFEND-FFBEG>,,FFBEG]
|
||||
.CLOSE OUTCH,
|
||||
|
||||
.LOGOUT 1,
|
||||
|
||||
PDL: BLOCK PDLSIZE
|
||||
|
||||
OPNBLK: SETZ
|
||||
SIXBIT /OPEN/
|
||||
[.BIO,,OUTCH]
|
||||
[SIXBIT /DSK/]
|
||||
OPNNM1: 0
|
||||
[SIXBIT /FILE/]
|
||||
SETZ [SIXBIT /MUDSAV/]
|
||||
|
||||
; PAGE...ENDPAGE pad the data between them to PGSIZE words.
|
||||
; PGLOC pads to a location within the page.
|
||||
DEFINE PAGE \PBEGIN
|
||||
PBEGIN!:
|
||||
OFFSET -. ;make labels relative to page start
|
||||
DEFINE PGLOC POS
|
||||
BLOCK POS-.
|
||||
TERMIN
|
||||
DEFINE ENDPAGE
|
||||
PGLOC PGSIZE
|
||||
OFFSET 0
|
||||
TERMIN
|
||||
TERMIN
|
||||
|
||||
; A directory entry - make sure these are sorted by name
|
||||
DEFINE DIRENT NAME,VER,LEN,FIRST
|
||||
SIXBIT /NAME/
|
||||
<LEN_28.>\<VER_18.>\FIRST
|
||||
TERMIN
|
||||
|
||||
DEFINE ENDPAGE
|
||||
TERMIN
|
||||
|
||||
; Contents of SAV FILE
|
||||
SFBEG:
|
||||
|
||||
PAGE
|
||||
1 ;number of directories
|
||||
1 ;directory 0 page
|
||||
ENDPAGE
|
||||
|
||||
PAGE
|
||||
SFDE-1 ;length of directory in words
|
||||
DIRENT 1LSRTN,54.,1,2
|
||||
DIRENT 1MUDDL,54.,1,3
|
||||
DIRENT 2LSRTN,54.,1,2
|
||||
SFDE:
|
||||
ENDPAGE
|
||||
|
||||
;Stub for Muddle 54 1LSRTN/2LSRTN
|
||||
PAGE
|
||||
PGLOC 0. ;LSR-INIT
|
||||
RFALSE: MOVSI A,TFALSE ;just return FALSE
|
||||
MOVEI B,0
|
||||
JRST FINI54
|
||||
PGLOC 103. ;LSR-FLUSH
|
||||
JRST RFALSE(M)
|
||||
PGLOC 131. ;FIELD
|
||||
JRST RFALSE(M) ;simulate user not found
|
||||
PGLOC 260. ;LAST-NAME
|
||||
JRST RFALSE(M)
|
||||
ENDPAGE
|
||||
|
||||
;Stub for Muddle 54 1MUDDL
|
||||
PAGE
|
||||
PGLOC 0. ;C-FCN
|
||||
CFCN: MOVSI A,TFALSE ;don't know what this is for - return FALSE
|
||||
MOVEI B,0
|
||||
JRST FINI54
|
||||
ENDPAGE
|
||||
|
||||
SFEND:
|
||||
|
||||
; Contents of FIXUP FILE
|
||||
FFBEG:
|
||||
|
||||
PAGE
|
||||
1 ;number of directories
|
||||
1 ;directory 0 page
|
||||
ENDPAGE
|
||||
|
||||
PAGE
|
||||
0 ;length of directory in words
|
||||
ENDPAGE
|
||||
|
||||
FFEND:
|
||||
|
||||
END START
|
||||
Loading…
x
Reference in New Issue
Block a user