GermPrivate.mesa
(last edited by: Forrest on: March 21, 1980 6:31 PM)
Andrew Birrell October 31, 1983 2:13 pm
DIRECTORY
MPCodes USING [Code],
PrincOps USING [aASSOC, aGETF, aSETF, flagsClean, flagsVacant, InterimPageState, PageFlags, PageCount, PageNumber, zMISC];
GermPrivate: DEFINITIONS =
BEGIN
TeleDebug:
PROC [
scratchPage: PrincOps.PageNumber,
dFirst64KStorage: LONG DESCRIPTOR FOR ARRAY OF WORD];
AllocateMDS:
PROC [pages:
CARDINAL]
RETURNS [p:
POINTER
TO
UNSPECIFIED];
Guaranteed not to do an ALLOC from the frame heap (!). AllocateMDS may be called only during module initialization!
Error: SIGNAL[code: MPCodes.Code]; -- sets "code" in MP and loops
countVM: PrincOps.PageCount; -- VM map has pages [ 0 .. 0+countVM )
Map primitives: 5.0 PrincOpsUtils pretends we're using Trinity map primitives, but BootFile format is still Rubicon, so Germ uses these ones. Change to calls on PrincOpsUtils someday.
Flags: TYPE = PrincOps.PageFlags;
Value: TYPE = PrincOps.InterimPageState;
flagsVacant: Flags = PrincOps.flagsVacant;
flagsClean: Flags = PrincOps.flagsClean;
valueVacant: Value = [logSingleError: FALSE, flags: flagsVacant, realPage: 0];
RealPageNumber: TYPE = [0..7777B];
Assoc:
PROC[virtual:
CARDINAL, state: Value] =
MACHINE CODE {PrincOps.zMISC, PrincOps.aASSOC};
GetF:
PROC[virtual:
CARDINAL]
RETURNS[Value] =
MACHINE CODE {PrincOps.zMISC, PrincOps.aGETF};
SetF:
PROC[virtual:
CARDINAL, flagsNew: Value]
RETURNS[valueOld: Value] =
MACHINE CODE {PrincOps.zMISC, PrincOps.aSETF};
IsVacant:
PROC[virtual: PrincOps.PageNumber]
RETURNS[
BOOL ] =
INLINE
{ RETURN[virtual < 0 OR virtual >= countVM OR GetF[virtual].flags = flagsVacant] };
END.
LOG
Time: October 31, 1983 11:01 am By: Andrew Birrell Action: Create from Rubicon Teledebug.mesa