Hardware manual
If a program that generates an event has destroyed the event communication region, it is still possible to
pass the event to the operating system. For example, if the memory diagnostic is running and an Ethernet
connection request arrives, the mechanism can be used to load the operating system and pass the
eventRFC message to it. The mechanism is described in the next section.
3.15. OutLd, InLd, BootFrom
Three functions are provided for dealing with "OutLd" files that record the entire state of the Alto
machine. When the operating system is loaded with the "boot" button, such a file restores the machine
state exactly as it was at the time of the Installation of the operating system. The Swat debugger also uses
these facilities, saving the entire machine state on the file "Swatee" when a break is encountered, and
restoring the Swat debugger state from the file "Swat."
In the discussion that follows, an FPRD structure is like a file pointer (FP), but the disk address is the Real
disk address of the first page of Data in the file.
OutLd(FPRD, OutLdMessage) Saves the state of the machine on the file described by FPRD,
which must exist and be at least 255 data pages long. Note that
the state saved includes a PC inside OutLd. OutLd returns 0
after writing the file. Unless you know what you are doing,
interrupts should be off when calling OutLd (otherwise, OutLd
may save some parts of the machine state, such as the
ActiveInterrupts word, that was pertinent to an interrupt in
progress!).
Programmers should be warned to think carefully about the state
that is being saved in an OutLd. For example, the operating
system normally saves in memory some state associated with the
default disk, sysDisk. If OutLd saves this state on a file, and the
program is later resumed with InLd, the state will be incorrect.
To be safe, state should be written out before calling OutLd (i.e.,
WriteDiskDescriptor()), and restored when OutLd returns (i.e.,
ReadDiskDescriptor()).
InLd(FPRD, InLdMessage) Copies the InLdMessage (length lInLdMessage) to a
momentarily safe place and restores the machine state from the
file described by FPRD, which must have been created by
OutLd. Because the PC was in OutLd, OutLd again "returns,"
but this time with the value 1, and the InLdMessage has been
copied into the OutLdMessage. Note: OutLd returns with
interrupts disabled in this case.
If the operating system boot file is InLd’ed, the message is
assumed to be a legal data structure for the EventVector, and is
copied there.
BootFrom(FPRD) This function "boots" the Alto from the specified file. If it is
applied to a file written by OutLd, the state of the machine is
restored and OutLd "returns" 2 with interrupts disabled. (Note:
The effect of this function differs from the effect of depressing
the "boot" button. Unlike the boot button, the function in no
way initializes the internal state of the Alto processor.)
Some programs (e.g., DMT) will need to know how to simulate InLd or BootFrom:
1. Turn off the display and disable interrupts.
2. Read the first data page of the boot file into memory locations 1, 2, ...#400. If you are loading
the installed operating system, the first data page of the boot file is at real disk address 0.
3. Store the label block for the page just read into locations #402, #403, ...#411.
Alto Operating System May 5, 1980 21
For Xerox Internal Use Only -- December 15, 1980










