From 7dd86fd5ff311a9f41091c316ca7e21deb03ba52 Mon Sep 17 00:00:00 2001 From: Eric Swenson Date: Wed, 22 Feb 2023 13:07:44 +0100 Subject: [PATCH] Build Muddle compiler and assembler. --- build/muddle.tcl | 16 +++++ build/timestamps.txt | 1 + src/mudsys/subsys.maker | 130 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+) create mode 100644 src/mudsys/subsys.maker diff --git a/build/muddle.tcl b/build/muddle.tcl index e5b771d7..981a475d 100644 --- a/build/muddle.tcl +++ b/build/muddle.tcl @@ -55,6 +55,22 @@ expect ":KILL" respond "*" ":link sys1;ts mud55,mudsav;ts mud55\r" +#Build Muddle PCOMP compiler. +respond "*" ":midas sys1;ts pcomp_mudsys;subsys maker\r" +respond "Type in Subsystem (Save File) name:" "pcomp\r" +respond "Type Y if you wish to have Save File directly restored:" "y\r" +respond "Type Second Name of Save File:" "55save\r" +respond "Type Sname of Save File:" "mudsav\r" +expect ":KILL" + +#Build Muddle ASSEM assembler. +respond "*" ":midas sys1;ts assem_mudsys;subsys maker\r" +respond "Type in Subsystem (Save File) name:" "assem\r" +respond "Type Y if you wish to have Save File directly restored:" "y\r" +respond "Type Second Name of Save File:" "55save\r" +respond "Type Sname of Save File:" "mudsav\r" +expect ":KILL" + # Zork startup respond "*" ":midas sys2; ts zork_taa; zork\r" expect ":KILL" diff --git a/build/timestamps.txt b/build/timestamps.txt index ee8a7a08..7bf4222e 100644 --- a/build/timestamps.txt +++ b/build/timestamps.txt @@ -1582,6 +1582,7 @@ mudsys/second.cmd 198101201156.10 mudsys/specs.111 198107181125.19 mudsys/stbuil.15 198101092348.30 mudsys/stenex.11 198011211308.05 +mudsys/subsys.maker 197905092122.57 mudsys/symbol.cmd 198011211731.08 mudsys/txpure.3 198008221459.29 mudsys/user.ok 197801110914.32 diff --git a/src/mudsys/subsys.maker b/src/mudsys/subsys.maker new file mode 100644 index 00000000..42db4524 --- /dev/null +++ b/src/mudsys/subsys.maker @@ -0,0 +1,130 @@ +TITLE Muddle Subsystem Bootstrap + +IF1,[ DR==0 + PRINTC /Type in Subsystem (Save File) name: / + .TTYMAC A + SAVNAM=SIXBIT /A/ + TERMIN + + PRINTC /Type Y if you wish to have Save File directly restored: / + .TTYMAC A + IFSE A,Y,[ + PRINTC /Type Second Name of Save File: / + .TTYMAC B + SAVNM2==SIXBIT /B/ + TERMIN + + PRINTC /Type Sname of Save File: / + .TTYMAC B + SAVSNM==SIXBIT /B/ + TERMIN + + DR==1 + MUDSNM=SIXBIT /SYS1/ + TERMIN +] + +IFE DR,[ + PRINTC /Type in MUDDLE, MUDnm or NMUDDL: / + .TTYMAC A + MUDNM2=SIXBIT /A/ + TERMIN + + PRINTC /Type in SYS or SYS1: / + .TTYMAC A + MUDSNM=SIXBIT /A/ + TERMIN + + SAVNM2=0 + SAVSNM=0 +] +] + +A=1 +B=2 +C=3 +IN==1 ;muddle channel +SV==2 ;save file channel + +; six-word area varies from boot to boot + +ZERO: IFE DR, SAVNAM ; arg to muddle in ac 0 + IFN DR, SV + +MDLNM2: IFE DR, MUDNM2 ; nm2 of ts muddle file + IFN DR, 0 +MDLSNM: MUDSNM ; sname of muddle file + +SVFNAM: SAVNAM ; nm1 of save file +SVFNM2: SAVNM2 ; nm2 of save file +SVFSNM: SAVSNM ; snm of save file + +MUD: + +IFN DR,[.CALL SAVOPN + .VALUE [ASCIZ /: No SAVE file? + +/] + .IOT 2,[-1,,B] + .ACCES 2,[0] + MOVSI C,'MUD + ILDB 0,NUMPTR + SUBI 0,40 + IDPB 0,NAMPTR + ILDB 0,NUMPTR + SUBI 0,40 + IDPB 0,NAMPTR + MOVEM C,MDLNM2 +] + .CALL MUDOPN + .VALUE [ASCIZ /: No TS MUDDLE ? + +/] + .SUSET [.ROPTION,,A] + TLNE A,OPTBRK + SETOM STUFF+BRKFLG + MOVSI 17,STUFF + BLT 17,17 + MOVE ZERO + JRST 1 + +IFN DR,[ +SAVOPN: SETZ + SIXBIT /OPEN/ + [6,,SV] + [SIXBIT /DSK/] + SVFNAM + SVFNM2 + SETZ SVFSNM +] +MUDOPN: SETZ + SIXBIT /OPEN/ + [4,,IN] + [SIXBIT /DSK/] + [SIXBIT /TS/] + MDLNM2 + SETZ MDLSNM + +NUMPTR: 440700,,B +NAMPTR: 220600,,C + +STUFF: OFFSET -. + 0 + .CALL LOAD + .VALUE + .IOT IN,A + .CLOSE IN, + SKIPE BRKFLG + .BREAK 12,SSTART + ADDI A,1 + JRST @A + +LOAD: SETZ + SIXBIT /LOAD/ + 1000,,-1 + SETZI IN +BRKFLG: 0 +SSTART: ..SSTA,,A + OFFSET 0 + + END MUD