PDP-10 / its

Incompatible Timesharing System
Other
858 stars 81 forks source link

COMBAT ZONE #2149

Closed eswenson1 closed 1 year ago

eswenson1 commented 1 year ago

COMBAT ZONE is the MUDDLE batch compiler. It's source is in COMBAT;MASTER >. It isn't clear, yet, how to create the COMBAT ZONE daemon from MASTER NBIN. I've had some success loading up a saved image of a compiler (e.g. PCOMP 55SAVE) and then loading in COMBAT; MASTER NBIN. This allows me to call BATCH-COMPIL, which, if a PLAN (or similar) file is found in the COMBAT directory, will execute the plan (e.g. compile what is specified in the PLAN file). However, once it is done, the job simply returns to the MUDDLE REPL, which can't be the way this is supposed to have worked.

As far as I know, COMBAT ZONE was supposed to be launched by a .DEMSIG ZONE (found in SYSEN2;DEMSTR >). DEMSTR is loaded by ITS at startup time, and daemons in this file are launched periodically (based on schedule found in DEMSTR). ZONE, therefore, is supposed to be found in SYS;ATSIGN ZONE (as all of these daemons are). However, how to create SYS;ATSIGN ZONE is not (yet) known to me. I can certainly create this file by running MUDSYS:SUBSYS MAKER, which will start up a MUDDLE interpreter and restore a SAVE file into it. However, I don't know how to create this SAVE file yet. In other words, I haven't found any source file that creates the right SAVE file.

What I think should happen is this: There should be a MUDDLE source file that either loads in the MUDDLE compiler SAVE file, or perhaps the NBINs for it, and then loads in MASTER NBIN, which in turn loads in PRIVAT NBIN, and then saves to a new SAVE file, such that on startup, BATCH-COMPIL is run. After it is run, I would expect that it should exit (job should terminate). This would allow it to be launched at the next cycle by ITS/DEMSTR/DEMSIG.

However, I haven't matched to find anything that calls BATCH-COMPIL, and then exits.

larsbrinkhoff commented 1 year ago

Revvin' up your mainframe Listen to her howlin' roar

Metal under tension Beggin' you to type and go

Highway to the COMBAT ZONE Ride into the COMBAT ZONE

eswenson1 commented 1 year ago

I now have COMBAT ZONE working on ES. I'll integrate (soon) into this repo.

COMBAT ZONE is actually the same as a MDL compiler -- the scripts to generate PCOMP SAVE (NPCOMP SAVE, ECOMP SAVE, etc) all include COMBAT;MASTER NBIN, which does the work of the daemon. COMBAT ZONE lives in the file SYS;ATSIGN ZONE. It is started multiple ways. The first is that upon ITS startup, SYS;ATSIGN DEMSTR is run by ITS (one time). This establishes the set of DM-style daemons that are to run, and on what schedule. ZONE is one of those daemons and it runs periodically. In addition, when you run the user program COMBAT (NCOMBA), if it writes out a PLAN (or WASTE) FILE to the COMBAT directory, and the FN2 of the file is 1 -- meaning the first PLAN/WASTE file, then COMBAT does a "DEMSIG" system call on the "ZONE" daemon, launching it (if it isn't already running).

ZONE looks in the COMBAT directory for PLAN (and WASTE and other) files to "executed". It processes the one with the lowest FN2 first. PLAN files look something like this:

<SNAME "EJS">
<SETG COMBAT!- "DSK:EJS;hello2 >">
<FCOMP %.INCHAN "DSK:EJS;hello2 >" "DSK:EJS;hello2 NBIN">

(They can be much more complicated that this, having arbitrary MDL forms before the call to FCOMP to load libraries or perform other initialization). The FCOMP call actually does the compilation.

Note: none of this will work without assembling ITS with DM daemon support:

DEFOPT DEMON==1         ;HAS DEMON ROUTINES

This enables DEMSIG, and other system calls, which NCOMBA and ZONE use.

eswenson1 commented 1 year ago

Closing this ticket as COMBAT ZONE is now part of DB.