Standard Software

  • Home
  • The standard papertape software of the Honeywell Series 16 machines includes two assemblers, various loaders, a Fortran 4 compiler (including its runtime library), some utility programs and libraries with device driver routines. Operating system and disk software was also available; however not at this moment anymore. This page will illustrate the use of one of the assemblers and the Fortran system on the simulator. Files used in these examples are collected in makefrtnp.zip. The simulator GUI is not used to show these examples; the examples are just executed from the simulator command line.

    The Assembler

    The DAP-16 assembler is used to assemble the source of the Fortran 4 compiler. Normally the Fortran 4 compiler is available as a selfloading papertape in a preconfigured configuration, which means that only the device drivers selected, when the Fortran compiler was linked, are available for use during a program compilation. Devices not linked in, can not be used. So in case one wants to use a device not available in the selfloading tape, another selfloading tape of the compiler must be made, which supports the desired device. A prerequisite to produce such a selfloading tape, is to have the object of the Fortran 4 compiler available.

    Console input and output is shown; comments are included in brackets [] (for more detail, see: DDP516 User Guide).

    The assembly of the Fortran 4 compiler

    linux # ./h316-370t [start the simulator; working under Linux!]

    H316t simulator V3.7-0
    sim> set cpu 16k
    sim> show cpu
    CPU, DMA channels = 4, 16KW, extend, HSA, DMC [available cpu options]
    sim> attach -b ptr dap16slst.ptp ["put" the selfloading tape of the assembler in the high speed papertape reader]
    sim> boot ptr [and boot the machine from the high speed papertape reader]

    HALT instruction, P: 17633 (STA 24) [the assembler is loaded now]
    sim> reset all [MASTER CLEAR]
    sim> do lptpatch [patch the lineprinter driver of the assembler; devaddr 0 => devaddr 3]
    sim> attach ptr frtn4.src ["put" the Fortran compiler source in the high speed papertape reader]
    sim> attach ptp frtn4.obj [the high speed papertape puncher will be use for the object output]
    PTP: creating new file
    sim> attach -a lpt frtn4.lst [and the lineprinter will be used to get the compiled listing]
    LPT: creating new file
    sim> deposit a 120402 [select a 2-pass assembly and for IO: in=ptr binout=ptp list=lpt]
    sim> deposit p 400 [set the assembler start address in the program counter]
    sim> go [and start the assembly]


    DDP-516 WITH 16K STORAGE

    HALT instruction, P: 06352 (JMP* 6337) [1st assembly pass is ready]
    sim> detach ptr
    sim> attach ptr -b frtn4.src ["put" the papertape with the compiler source in the high speed reader again]
    sim> cont [and start the 2nd assembly pass]

    AC [assembly ready; no errors]

    HALT instruction, P: 06352 (JMP* 6337)
    sim> quit [stop and exit the simulator]
    Goodbye
    linux #

    The punched object is now in file frtn4.obj and the listing, including all symbol definitions is in frtn4.lst.

    In case of errors, the source tape must be corrected and the process above must be repeated again until the assembly is error free.The repetition of all steps again and again can be quit annoying. And really it was when a big program had to be developed. Fortunately modern tools make this process much easier. To make the assembly today of programs on the simulator easier a script can be used f.i. dap16.pl, a small Perl script, which hides the execution of the simulator and all the subsequent steps to have the assembly executed on the simulator. The same assembly as above looks then as follows:

    linux # ./dap16.pl frtn4.src [execute script to assemble the Fortran 4 source papertape]
    Current directory: /usr/local/src/makefrtn4p/
    Working directory: /usr/local/src/makefrtn4p/
    The following files will be processed by a 2-pass assembly:
    frtn4.src is the source file to be assembled
    frtn4.obj will be the assembled object file
    frtn4.lst will contain the listing of the assembled source file
    ./h316-370t proc
    Assembly of frtn4.src is ready
    NO ERRORS in ASSEMBLY [end of script execution; the messages above show where the results can be found]
    linux #

    This hardly has anything to do with the execution of "old" software on "old" computers, but in case the objective is to reestablish an old piece of software it saves a lot of time (something similar can be done with the execution of a do-script directly in the simulator, as will be explained below). Another script which helps the development of software on the simulator is: txt2src.pl. Source text today is prepared in a text editor on the PC and text lines (on Unix) just end with a NewLine code (octal 12). Source records for the DDP516 assemblers/compiler request a bit more complicated layout and the txt2scr.pl script converts unix text to DDP516 source records (it also converts lower case characters to upper case and expands tabs to the assembler requested columns).

    The Linking Loader

    Several papertape linking loaders are available; the extended loader will be used in this example. The extended loader is relocating loader, able to link the object output of one pass and two pass assemblies, as well as the output of the Fortran compiler. So it is a rather universal linker at the cost of using more memory space than the standard loader. The result of all these loaders (a linked program) is always in memory and at the fixed location provided as parameter to the loader. This in contrast with the later more common linkage editors, which were able to output (for instance on papertape) a partial or complete linked program in relocatable form, ready for subsequential further linking or for loading/execution.

    The absolute program in memory (= the program at a fixed location), as result of the linking loader, can be used in two ways:
    1 - start its execution;
    2 - punch it on papertape in absolute form (= core image) as a Self Loading System Tape (SLST).

    The second option is useful in particular for programs that have repeatedly to be executed. The program is quickly loaded for execution with a simple load process by the boot loader at the same location as where it was linked. However in case the program had to be executed at another core location, it first must be linked/loaded again with the linking loader.

    As example the object tape of the Fortran 4 compiler, as result of the assembly above, will be link/loaded in order to obtain a executable Fortran 4 compiler. After that the linked Fortran compiler will be punched as a selfloading papertape ready for repeatedly execution. The objective is to obtain a compiler which only uses the teletype for printed output, papertape for source input (tty or ptr) and papertape for object output (tty or ptp).

    The link/load of the Fortran 4 compiler

    linux # ./h316-370t [start simulator]

    H316t simulator V3.7-0
    sim> attach -b ptr ldre16kslst.ptp ["put" the selfloading tape of the extended loader in the high speed papertape reader]
    sim> boot ptr [and boot the machine]

    HALT instruction, P: 37633 (STA 24) [loader loaded in the top of the 1st 16kwords of memory]
    sim> reset all [MASTER CLEAR]
    sim> attach -b ptr frtn4.obj ["put" the compiler object tape in the high speed papertape reader]
    sim> go 37000 [and start the linking loader at its start address]

    HALT instruction, P: 37445 (STA 37661)
    sim> con [and start reading/loading the compiler object in memory]

    MR [1st module is loaded now]

    HALT instruction, P: 34306 (JMP* 34272) [the "MR" message shows that more modules are required to resolve defined externals]
    sim> go 37002 [to show the status of the loading process, a memory map is requested]

    *LOW 00001 [addresses in octal]
    *START 01003
    *HIGH 15036
    *NAMES 33776
    *COMN 37700
    *BASE 00473
    F4$INT 01003** [** means 1st occurrence of this unresolved external is at the specified address]
    F4$IN 01077**
    F4$END 04452**
    F4$SYM 14565**
    F4$OUT 14602**

    MR [the shown externals are the entry points of the IO-selector module]
       [the IO-selector calls drivers for devices which can be used for source input, object output and for printing the listing]
    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr f4$ios-b-v1.obj ["put" the object tape of the IO-selector in the high speed papertape reader]
    sim> con [and load it]

    MR [still unresolved externals of course: those of the called device drivers]

    HALT instruction, P: 34306 (JMP* 34272)
    sim> go 37002 [investigate the memory map to understand which drivers are called by the IO-selector]

    *LOW 00001
    *START 01003
    *HIGH 15676
    *NAMES 33622
    *COMN 37700
    *BASE 00501
    F4$INT 15036 [entry point of the F$INT routine]
    F4$INI 15041** [initializer routine, called by the IO-selector]
    F4$IN 15046
    F4$DUI 15067
    I$AA 15074** [tty source input routine, called by the IO-selector]
    I$CA 15100** [punched card source input routine, called by the IO-selector]
    I$PA 15104** [high speed papertape source input routine, called by the IO-selector]
    I$MA 15110** [magtape source input routine, called by the IO-selector]
    C$6TO8 15117** [magtape code conversion routine, called by the IO-selector]
    F4$OUT 15130
    F4$DUO 15156
    O$PB 15164** [high speed papertape punch object output routine, called by the IO-selector]
    O$AB 15167** [tty papertape punch object output routine, called by the IO-selector]
    O$MB 15172** [magtape object output routine, called by the IO-selector]
    F4$SYM 15200
    O$LH 15231** [initiate lineprinter routine, called by the IO-selector]
    F4$DUS 15262
    O$LA 15310** [lineprinter print line routine, called by the IO-selector]
    C$8TO6 15313** [magtape code conversion routine, called by the IO-selector]
    O$MA 15316** [magtape listing output routine, called by the IO-selector]
    F4$END 15370
    O$ME 15406** [magtape control routine, called by the IO-selector]
    O$PLDR 15452** [high speed papertape punch routine for punching tape leader/trailer, called by the IO-selector]

    MR [note: support of the tty as listing device is part of the Fortran 4 compiler object module, so is always available]
       [conform the objective, only the tty and high speed papertape source input and object output drivers will be loaded now]
       [for other requested drivers (magtape and lineprinter) dummy drivers will be loaded as part of the module f4dum-v1.obj]
       [the module f4dum-v1.obj must always be the last module being loaded!]
       [this way externals to not loaded device drivers are resolved by replacing these by dummy device drivers]
       [the module f4dum-v1.obj also provides the initialization routine, which sets the size of memory space available for tables]
    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr o$pldr ["put" the punch leader/trailer routine in the high speed papertape reader]
    sim> con [and load]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr i$aa ["put" the tty input source routine in the high speed papertape reader]
    sim> con [and load]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr i$pa ["put" the high speed papertape source input routine in the high speed papertape reader]
    sim> con [and load]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr o$pb ["put" the high speed papertape binary output routine in the high speed papertape reader]
    sim> con [and load]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr o$ab [ "put" the tty papertape binary output routine in the high speed papertape reader]
    sim> con [and load]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr f4$dum-v1.obj [and, as last one, "put" the module with the dummy drivers in the high speed papertape reader]
    sim> con [and load]

    LC [loading is complete now; so all externals are resolved ]

    HALT instruction, P: 34306 (JMP* 34272)
    sim> go 37002 [show the memory map]

    *LOW 00001
    *START 01003
    *HIGH 16670
    *NAMES 33534
    *COMN 37700
    *BASE 00541
    F4$INT 15036
    F4$IN 15046
    F4$DUI 15067
    F4$OUT 15130
    F4$DUO 15156
    F4$SYM 15200
    F4$DUS 15262
    F4$END 15370
    O$PLDR 15676
    I$AI 15714
    I$GA 15731
    I$AA 15731
    C$ASR 16056
    I$PI 16132
    I$PA 16147
    O$PB 16320
    O$PS 16425
    OUPT 16450
    O$AB 16450
    O$AS 16557
    EOM 16557
    F4$DUM 16610
    O$ME 16612 <<== dummy drivers
    O$LH 16612
    C$6TO8 16615
    I$MA 16615
    I$CA 16615
    O$MB 16617
    O$MA 16621
    C$8TO6 16621
    O$LA 16621
    F4$INI 16626 <<== init routine

    LC

    HALT instruction, P: 34306 (JMP* 34272)
    [the Fortran 4 compiler is ready now in memory for use or for punching it on a selfloading papertape]

    Punching a Self Loading System Tape

    The program PAL-AP is used to create a Self Loading System Tape on papertape. As mentioned above, such a tape contains a fresh copy of a memory region, which can be reloaded into memory by the bootstrap loader. The first part of the tape contains a small loader which is able to load the second part of the tape. The load proces is as follows: the bootstrap reads the first part of the tape partly in low memory (locations '20 - '57) and partly in high memory (place dependent on the PAL-AP which punched the tape). When the high memory part is loaded (this part is in fact a real loader) control is transfered to that part and it loads the second part of the papertape: the program/memory region to load. PAL-AP punches the two parts on the papertape. To make a Self Loading System Tape of the Fortran compiler, as linked/loaded above and which still is in memory, the following steps must be performed:

    Making a Self Loading System Tape of the linked/loaded Fortran 4 compiler

    sim> reset all [MASTER CLEAR]
    sim> attach -b ptr pal-ap16k.ptp ["put" the PAL-AP system tape in the high speed papertape reader]
    sim> boot ptr [and boot]

    HALT instruction, P: 37633 (STA 24) [PAL-AP in high memory: uses the last sector of 1st 16KW memory block]
    sim> reset all [MASTER CLEAR]
    sim> attach -b ptp frtn4p.ptp [high speed papertape punch will receive the punched output]
    sim> go 37000 [start PAL-AP: address 0 of last sector of 1st 16KW memory block]

    HALT instruction, P: 37004 (STA 37444)
    sim> deposit a 40 [A-reg is set to 1st address of the memory area to punch (octal)]
    sim> continue

    HALT instruction, P: 37007 (STA 37445)
    sim> deposit a 16677 [A-reg is set to last address of the memory area to punch (octal)]
    sim> continue

    HALT instruction, P: 37004 (STA 37444) [punching of the papertape frtn4p.ptp is ready]
    sim> quit [stop/exit the simulator]
    Goodbye

    Putting Link/Loading and Punching a SLST together in a "do-script"

    In case the whole process of linkloading and punching of a system tape has to be repeated several times, time can be saved by putting all steps to be executed on the simulator together in a socalled "do-script". The effect is similar as with the Perl script dap16.pl above, which was used to execute an assembly by means of a single command. The do-script mechanism is different however. The do-script is used to pack all simulator commands to be executed together in a single file. The script even can have parameters. The script then is executed by the simulator program directly. This can be done in two ways:

    a) simulator-program-name <do-script> [the do-script file is provided as parameter to the simulator request]

    b) simulator-program-name [request the simulator to execute]
        simulator prompt [start message printed on the console by the simulator]
        sim> do <do-script name> [execute a do command with the script name to execute as parameter]

    As example, all link/load and punch steps, as executed above, are collected in the do-script "lnkf4p". The script is executed by:

    linux # ./h316-370t

    H316t simulator V3.7-0
    sim> do lnkf4p

    or by: linux # ./h316-370t lnkf4p

    The content of the do-script and the console output it generates, is shown in lnkfrtn4p

    Test the compiler by compiling/linking/running a Fortran program

    Finally the new compiler is to be checked. The Mandelbrot fractal program of Philipp Hachmann is used to test whether the compile/link/run cycle is properly working. As a side effect this also shows how the Fortran system can be used on the simulator. The various steps will be introduced shortly; at the end a link is provided to the text file with the complete log of this session.

    Compile a Fortran program

    linux-74ag:/usr/local/src/ddp516 # ./h316-370t

    H316t simulator V3.7-0
    sim> set console log=frtn4p.log [set the console logger on]
    Logging to file "frtn4p.log"
    sim> attach -b ptr frtn4p.ptp [the compiler to test into the papertape reader]
    sim> boot ptr [boot the compiler into memory]

    HALT instruction, P: 37633 (STA 24)
    sim> reset all [MASTER CLEAR]
    sim> attach -a ptr apfel3.src [source program into the high speed papertape reader ptr]
    sim> attach -b ptp apfel3.obj [object program on the high speed papertape puncher ptp]
    sim> deposit ss1 0 [no expanded listing]
    sim> deposit ss2 1 [no expanded listing]
    sim> deposit a 311 [device selection into A-register: source=ptr, list=tty, object=ptp]
    sim> run 1000 [start the compilation; listing on the tty]

    While the compilation is running, the listing is printed on the console and the translated object file is punched on the simulated high speed papertape puncher. The complete session, including the printout of the listing is available in the log file (see below) .After the compilation is ready, the program must be linked.

    Link the compiled program

    sim> attach -b ptr ldre16kslst.ptp [boot the loader in order to link/load the program]
    sim> boot ptr

    HALT instruction, P: 37633 (STA 24)
    sim> reset all
    sim> attach ptr apfel3.obj [the just translated main program => high speed papertape reader]
    sim> go 37000

    HALT instruction, P: 37445 (STA 37661)
    sim> cont [load the main program]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr pchar.obj [subroutine => high speed papertape reader]
    sim> cont [ and load ]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr libfor1.ptp [fortran runtimelib tape 1 => high speed papertape reader]
    sim> cont [ and load ]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr libfor2.ptp [fortran runtimelib tape 2 => high speed papertape reader]
    sim> cont [ and load ]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr libfor3.ptp [fortran runtimelib tape 3 => high speed papertape reader]
    sim> cont [ and load ]

    MR

    HALT instruction, P: 34306 (JMP* 34272)
    sim> attach -b ptr libasr.ptp [io library tape => high speed papertape reader]
    sim> con [ and load ]

    LC [.... loading complete ...., program ready to run]

    HALT instruction, P: 34306 (JMP* 34272)

    First the compiled main module must be load followed by own developed subroutines. The last part of the loading process is to add the Fortran runtime library (three tapes: libfor1.ptp, libfor2.ptp, libfor3.ptp) and the IO-library. The loader picks only those routines from the library with entry points for which externals exist in the loader table. The message "LC" indicates that the loading is complete: all externals are resolved. A memory map can be printed to understand how the program is loaded in memory, which library routines are loaded and at which location they are loaded. The map also shows the start address of the program. Pls. see for details the log file.

    And run the program

    Running the program is easy now; its is in memory so enter the start address of the program in the program counter and start the machine is enough to get the program running. This is done by providing to the simulator the run-command with the start address. The run-command implicitly does a MASTER CLEAR.

    sim> run 1000 [run the program, print output to console]

    Program output is printed on the console. The complete printout of the compile/link/run session is presented in the log file.

     

    Note

    For the execution of these examples, program files are used which originate from other people:

    a) The H316 emulator is derived from the SIMH project, version 3.70 and adapted with a few patches.
    b) The source frtn4.txt is derived from the Fortran-4 compiler source as recovered by Adrian Wise and Philipp Hachmann.
    c) The standard DDP516/H316 software is coming from the published software of either Adrian Wise or Philipp Hachmann.
        (dap16slst.ptp, ldre16kslst.ptp, libfor1.ptp, libfor2.ptp, libfor3.ptp, libasr.ptp and pal-ap16k.ptp)
    d) The Fortran-4 example used as test (apfel3.txt and pchar.txt) is coming from Philipp Hachmann.
    e) All other files are coming from myself.

    References/Credits:
    Adrian Wise Honeywell Series 16 website: http://www.series16.adrianwise.co.uk/
    Philipp Hachmann's H316 Home website: http://h316.hachti.de/
    SIMH, The Computer History Simulation Project: http://simh.trailing-edge.com/

     

     

    Page last updated on: December 1 2008 | Contact: Info@theoengel.nl