PiDP8 (PDP8 replica) and FORTRAN: How suite it is :-)

Sorry for the pun, but I couldn’t resist. (the pun comes from program testing usually being done with a test framework and a “test suite”).

The past few days I have all of my smaller Engineering FORTRAN programs compiled and running on the PiDP8 – my PDP8 replica.  It was time to “work smarter” as they say. The basics of this involve replacing hand-typed commands with batch processes so that dozens of commands are stored in a file and invoked with one short command.

I began by reading all about the OS8 BATCH command and  batch files. I then created some smaller  test batch files to see how things worked, especially program input which usually requires keystrokes such as the following: “EXE RKB0:GAUSS.LD<esc>RKB0:GAUSS.DA/1<esc>” where <esc> means “press the escape key”. Batch files don’t typically allow control characters, so they rely on another mechanism. In the case of OS8, it’s the ‘$’ which tells BATCH that ‘the esc key was pressed’. In the end, the command line

EXE RKB0:GAUSS.LD<esc>RKB0:GAUSS.DA/1<esc>

becomes

.EXE RKB0:GAUSS.LD$

*RKB0:GAUSS.DA/1$

This works perfectly.

With such things resolved, I created two large batch files – one that compiles and loads all of my programs to date, and another which runs the programs. I no longer have to keep load files around as I can recreate them with one command:

SUB CMPALL

and likewise can run all but 3 programs with the command SUB RUNALL. It turns out one set of programs requires too much memory as the DIMENSION statements for some arrays consume 4000 bytes, just under the FORTRAN 4192 bytes allowed. However, this is enough to prevent the programs running under the BATCH system as it requires enough memory to prevent the programs from running (“INSUFFICIENT CORE”).

Still, pretty good stuff.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.