PDP-11 Absolute Loader

From Computer History Wiki
Jump to: navigation, search

The PDP-11 Absolute Loader is a short program designed to be loaded into the main memory of a PDP-11 by the PDP-11 Bootstrap Loader (most binary copies of the absolute loader are in the format expected by the bootstrap loader); it in turn is then run to load some other program into the machine.

The bootstrap loader is designed to be absolutely as short as possible (since it is manually toggled in via the switch register), and therefore has limitations, including how long a program can be loaded using it, and where in memory that program can be placed; the absolute loader relaxes both of those limitations.

The initial version of the absolute loader had three different operating modes, controlled by the contents of the switch register. If '0', it operated 'normally'. If '1', each block is loaded immediately following the previous block (i.e. the address in the block header is ignored). If 'xxxxx1' (in binary), the block is loaded at the address given in the high bits of the switch register. For later PDP-11's, which did not have a switch register, a modified version is required.

Absolute Loader format

The format of absolute loader input is that it consists of an arbitrary number of blocks, each of which has the following format:

  • Leader (all bytes 0)
  • Start marker (1 byte, value '1')
  • Pad (1 byte, value '0')
  • Low byte count (1 byte)
  • High byte count (1 byte)
  • Low load address (1 byte)
  • High load address (1 byte)
  • Program to be loaded
  • Checksum (1 byte)

The optional leader is because the absolute loader was originally for loading programs held on paper tape. The byte count includes the header starting with the 'start marker' (i.e. 6 bytes), but does not include the checksum byte.

The checksum is the low-order byte of the negation of the sum of all the bytes in a block; when all the bytes of a block, including the checksum, are added together, the low-order byte of the result should be zero (if the block has been read correctly).

A block of length 6 (i.e. only the header) marks the end of the input. If the address is odd, the absolute loader halts; if even, it jumps to the address given in the last block.

This format, denominated by the ending ".LDA" in file names, continued to be used with PDP-11's for the duration of their life.

Further reading

The Absolute Loader is documented in some detail in the "paper tape software programming handbook" (DEC-11-GGPB-D), pp. 6-8 to 6-12.