<> <> <> DIRECTORY BootFile USING [Location], Commander USING [CommandProc, Register], DeviceCleanup USING [Perform], GermSwap USING [InLoad, Switches], PrincOpsUtils USING [DisableInterrupts], SystemVersion USING [machineType], VMBacking USING [RecoverRealMemory]; PupEtherBoot: CEDAR PROGRAM IMPORTS Commander, DeviceCleanup, GermSwap, PrincOpsUtils, SystemVersion, VMBacking = { Create: Commander.CommandProc = { bootFileNumber: CARDINAL _ GetBootFileNumber[]; switches: GermSwap.Switches; -- defaults location: BootFile.Location _ [ deviceType: ethernet, deviceOrdinal: 0, vp: ethernet [bootFileNumber: bootFileNumber, net: 0, host: 0] ]; switches[l] _ TRUE; switches[f] _ TRUE; TRUSTED { PrincOpsUtils.DisableInterrupts[]; -- make it hold still first VMBacking.RecoverRealMemory[]; -- so that the germ can find it for the next guy. DeviceCleanup.Perform[turnOff]; GermSwap.InLoad[NIL, NIL, 0, @location, switches]; }; }; DontKnowAboutThisTypeOfMachine: ERROR = CODE; GetBootFileNumber: PROC RETURNS [CARDINAL] = { <> SELECT SystemVersion.machineType FROM dorado => RETURN[45103B]; -- BasicCedarDorado.boot dandelion => RETURN[5200B];-- BasicCedarDLion20.pb ENDCASE => ERROR DontKnowAboutThisTypeOfMachine; }; Commander.Register["PupEtherBoot", Create, "Pup Etherboot this machine."]; }.