-- PDInterpSysCallsDevelImpl.mesa
-- Michael Plass, November 30, 1983 10:21 am
-- Tim Diebert, 5-Sep-86 13:06:58
 
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.