-- Snapshot.mesa (last edited by: McJones on: January 24, 1980 5:33 PM)
DIRECTORY
Environment: FROM "Environment" USING [PageCount],
File: FROM "File" USING [Capability, PageNumber],
TemporaryBooting: FROM "TemporaryBooting" USING [defaultSwitches, Switches];
Snapshot: DEFINITIONS =
BEGIN
Switches: TYPE = TemporaryBooting.Switches;
defaultSwitches: Switches = TemporaryBooting.defaultSwitches;
-- The files passed to OutLoad and InLoad must be bootable (see SpecialFile.MakeBootable)
OutLoad: PROCEDURE [file: File.Capability, firstPage: File.PageNumber ← 0] RETURNS [inLoaded: BOOLEAN];
-- Save machine state on file, then return FALSE; later returns TRUE when machine state is inLoaded
InLoad: PROCEDURE [pMicrocode, pGerm: LONG POINTER, countGerm: Environment.PageCount,
file:
File.Capability, firstPage: File.PageNumber ← 0, switches: Switches ← defaultSwitches];
-- Load new microcode and germ (if pMicrocode~=NIL and pGerm~=NIL, respectively), put switches in communication area, and restore machine state from file
-- Note: if pMicrocode~=NIL, it must point to resident memory (e.g. use SpecialSpace.MakeResident)
-- Errors (e.g. wrong file type, MakeBootable not performed, or contents wrong) will result in crash and possibly a MP code
END.
LOG
Time: August 9, 1979 8:51 AMBy: McJonesAction: Create file
Time: September 18, 1979 4:30 PMBy: McJonesAction: Add firstPage to InLoad
Time: January 24, 1980 5:33 PMBy: McJonesAction: Add switches to InLoad