Initialization Programs

Content by Peter H. Wendt (original HERE). Edited by Tomáš Slavotínek.


An initialization program is a memory image program that is loaded onto track 0, head 0 of drive hex 80. The master boot record executes the initialization program before booting the operating system from the fixed disk (the initialization program is bypassed if the operating system is booted from the diskette drive). It is an alternative method of initializing an adapter that does not require the use of ROM or jumpers and switches on the adapter.

The Set Configuration program, selected from the Main Menu of the Reference Diskette, installs the initialization program onto drive C. (Automatic Configuration does not install these programs). The Set Configuration program determines that an adapter has an initialization program by checking the adapter ADF. An adapter with a corresponding initialization program has the statement InitProg {attribute} in its ADF. The InitProg statement is placed after the FixedResources statement and before the NamedItem statement.

The attribute is a value from 0 to 127 that selects the order in which the initialization programs are run; the lowest value is run first. Attributes from 30 to 80 are available; attributes outside this range are reserved. An example of the use of this attribute is to ensure that a specific adapter is initialized before another if both are installed in the same system.

The following rules apply to all initialization programs:

  • The initialization program is always loaded beginning at offset hex 7C00. Any data variables referenced in the code may need their offsets adjusted to hex 7C00.
  • The initialization program must begin with a 20 byte header. Execution of the initialization program begins on the 21st byte.
  • The 16th byte of the program header is the revision level of the initialization program. The value in this byte should be incremented if a new version of the program is released. When the Set Configuration is run, the installation process checks this byte to ensure that the program with the latest revision level is installed. The other bytes in the header are set by the Set Configuration program.
  • The initialization program cannot be more than 1024 bytes in size, including the 20 byte header.
  • While executing, the initialization program should not assume that memory is available beyond its own programming size.
  • The initialization program is shipped as a DOS file so that it can be merged onto the Reference Diskette in the same way as the ADFs. The name of the file is based on the ID of the adapter, and is in the form Ixxxx.ADF where xxxx is Adapter ID.
  • When an initialization program finishes execution, it performs a Near Return to pass control back to the calling program. The stack will then be in the same state it was when the initialization program was called.

A revision to an initialization program is installed the same way as the original is installed. The revision of the program has a higher value in the revision level byte than the previous versions. The Set Configuration program compares the revision level of initialization programs installed on the fixed disk drive with those on the Reference Disk. If the program on the Reference Disk has a greater level than the one on the fixed disk, it updates the program on the fixed disk drive.

Content created and/or collected by:
Louis F. Ohland, Peter H. Wendt, David L. Beem, William R. Walsh, Tatsuo Sunagawa, Tomáš Slavotínek, Jim Shorney, Tim N. Clarke, Kevin Bowling, and many others.

Ardent Tool of Capitalism is maintained by Tomáš Slavotínek.
Last update: 02 Nov 2024 - Changelog | About | Legal & Contact