PDInterpSysCallsDevelImpl.mesa
Michael Plass, November 30, 1983 10:21 am
DIRECTORY Environment, Space, PDInterpSysCalls, ProcessorFace;
PDInterpSysCallsDevelImpl: MONITOR
IMPORTS Space, ProcessorFace
EXPORTS PDInterpSysCalls
= BEGIN
SetDisplayLights: PUBLIC PROC [value: [0..9999]] = {ProcessorFace.SetMP[value]};
AllocateSpace: PUBLIC ENTRY PROC [words: INT] RETURNS [LONG POINTER] = {
ENABLE UNWIND => NULL;
pages: CARDINAL ← (words+Environment.wordsPerPage)/Environment.wordsPerPage;
RETURN [Space.ScratchMap[pages]]
};
FreeSpace: PUBLIC ENTRY PROC [pointer: LONG POINTER] = {
ENABLE UNWIND => NULL;
[] ← Space.Unmap[pointer];
};
BadFreeSpaceRequest: PUBLIC ERROR = CODE;
END.