At 02:39 AM 8/27/2010, Dave McGuire wrote:
On 8/26/10 8:59 PM, Rick Murphy wrote:
I seem to
remember that it was possible to save a FORTRAN IV program
together with the FRTS runtime system as a runnable .SV core image
file. It seems that ADVENT does so...
Any idea?
That's the older version of OS/8 Adventure - it initialized then exited
to OS/8.
Unfortunately, the source for that has been lost, and I don't remember
how it worked.
I thought that was found a couple of years ago? Or was that
something else?
What you found was the source to the original DECUS version of OS/8
Adventure, which when you loaded it just started running. No SAVE
command, etc.
I think it
repeated the "PDPXIT" entry point in FRTS, didn't close
units, then exited. Upon restore, it re-enabled interrupts and continued.
Is it not possible to load a loader image (.LD) into FRTS, then
exit FRTS and save the whole shebang with SAVE SYS <filename> or
something along those lines? Not specific to ADVENT, but just in
general. These are very dusty neurons but I could swear I've done
this before, 25 years ago.
Yes. If I remember correctly, there's a FRTS switch that tells it to do
that.
Looking in the OS/8 handbook, it's "/H". However, that causes FRTS to
HLT after loading the program. Not what's wanted here.
However, that's probably the hint necessary to figure out how to do
this. Probably have to write an PDP-8 mode subroutine that's called
after program initialization that constructs the CCB and exits, then
jumps back to reinit the FPP and continue. That's label HLTNOP in FRTS.
I played with it for a while tonight and got
nowhere. Eventually I
figured out that one must likely do "RUN SYS FRTS" rather than just
"R FRTS" in order to load the CCB (and thus avoid the dreaded "CORE
IMAGE ERR" when executing the SAVE). Then I load my compiled .LD
file into FRTS, exit, and do SAVE SYS <filename>, but my resultant
.SV files just hang. This is just a simple "hello world" program.
Just trying a SAVE after it exits won't work as FRTS does some rather
interesting mucking about with memory when running. You've got to
re-initialize stuff. A normal exit (STOP in Fortran, Control-C) will
restore things, close files, etc. then exit to OS/8. If you try to
continue from there, it'll force a "USER ERROR 2".
-Rick