diff --git a/build/muddle.tcl b/build/muddle.tcl index b8ad0bdc..72c3bcd7 100644 --- a/build/muddle.tcl +++ b/build/muddle.tcl @@ -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" diff --git a/src/mudsys/mksvfl.1 b/src/mudsys/mksvfl.1 new file mode 100644 index 00000000..f6efd6ae --- /dev/null +++ b/src/mudsys/mksvfl.1 @@ -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,[-,,SFBEG] + .CLOSE OUTCH, + + MOVEI A,[SIXBIT /FIXUP/] ;write FIXUP FILE + MOVEM A,OPNNM1 + .CALL OPNBLK + .LOSE + .IOT OUTCH,[-,,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/ + \\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