DIRECTORY Basics USING [bitsPerByte, bitsPerWord, Byte, bytesPerWord, logBitsPerByte, logBitsPerWord, logBytesPerWord, LongNumber, Word], PrincOps USING [BitAddress, bytesPerPage, logBytesPerPage, logWordsPerPage, PageCount, PageNumber, wordsPerPage], VM USING [AddressForPageNumber, PageNumberForAddress]; Environment: DEFINITIONS IMPORTS VM = BEGIN bitsPerWord: CARDINAL = Basics.bitsPerWord; logBitsPerWord: CARDINAL = Basics.logBitsPerWord; -- logarithm of bitsPerWord bitsPerByte, bitsPerCharacter: CARDINAL = Basics.bitsPerByte; logBitsPerByte, logBitsPerChar: CARDINAL = Basics.logBitsPerByte; -- logarithm of bitsPerByte bytesPerWord, charsPerWord: CARDINAL = Basics.bytesPerWord; logBytesPerWord, logCharsPerWord: CARDINAL = Basics.logBytesPerWord; -- logarithm of bytesPerWord wordsPerPage: CARDINAL = PrincOps.wordsPerPage; bytesPerPage, charsPerPage: CARDINAL = PrincOps.bytesPerPage; logWordsPerPage: CARDINAL = PrincOps.logWordsPerPage; -- logarithm of wordsPerPage logBytesPerPage, logCharsPerPage: CARDINAL = PrincOps.logBytesPerPage; -- logarithm of bytesPerPage maxINTEGER: INTEGER = LAST[INTEGER]; -- 32767 minINTEGER: INTEGER = FIRST[INTEGER]; -- -32768 maxCARDINAL: CARDINAL = LAST[CARDINAL]; -- 177777B maxLONGINTEGER: LONG INTEGER = LAST[LONG INTEGER]; -- 2147483647 minLONGINTEGER: LONG INTEGER = FIRST[LONG INTEGER]; -- -2147483648 maxLONGCARDINAL: LONG CARDINAL = LAST[LONG CARDINAL]; -- 4294967295 Byte: TYPE = Basics.Byte; Word: TYPE = Basics.Word; Long, LongNumber: TYPE = Basics.LongNumber; BitAddress: TYPE = PrincOps.BitAddress; Block: TYPE = RECORD [ blockPointer: LONG POINTER TO PACKED ARRAY [0..0) OF Byte, startIndex, stopIndexPlusOne: CARDINAL]; nullBlock: Block = [NIL, 0, 0]; PageNumber: TYPE = PrincOps.PageNumber; firstPageNumber: PageNumber = 0; lastPageNumber: PageNumber = 16777214 --2**24-2--; PageOffset: TYPE = PageNumber; firstPageOffset: PageOffset = firstPageNumber; lastPageOffset: PageOffset = lastPageNumber; PageCount: TYPE = PrincOps.PageCount --[0..2**24-1]--; firstPageCount: PageCount = 0; lastPageCount: PageCount = lastPageNumber+1; LongPointerFromPage: PROCEDURE [page: PageNumber] RETURNS [LONG POINTER] = INLINE {RETURN[VM.AddressForPageNumber[page]]}; PageFromLongPointer: PROCEDURE [pointer: LONG POINTER] RETURNS [PageNumber] = INLINE { RETURN[VM.PageNumberForAddress[pointer]]}; END. LOG Time: April 26, 1978 4:34 PM McJones Created file Time: May 3, 1978 1:46 PM Lauer Merged contents of AltoDefs into file; changed name of file from "Processor". Time: June 21, 1978 10:03 AM Lauer Added maxINTEGER, minINTEGER, maxCARDINAL, maxLONGINTEGER, minLONGINTEGER Time: July 21, 1978 11:31 AM Lauer Moved type 'Block' from Stream to Environment Time: August 14, 1978 10:26 AM Horsley Used FIRST and LAST for number bounds Time: March 7, 1979 10:31 AM McJones Added Long; increased upper bound for PageNumber, PageOffset Time: July 16, 1979 6:26 PM Knutsen Added first64K, Base. Time: January 25, 1980 5:46 PM Forrest AR1607: nullBlock added, AR1740: logBitsPerByte, logBitsPerWord added; change any branch of LONG NUMBER to use UNSPECIFIEDs. Time: April 17, 1980 12:08 AM Forrest added BitAddress. Time: 13-Aug-81 15:19:31 Johnsson Block.blockPointer points to array of Byte. Time: 20-Oct-82 12:01:48 Luniewski Made PageCount, PageNumber, PageOffset be (logical) subranges of LONG CARDINALs. maxPagesInVM is now obsolete and defined in terms of lastPageCount. Time: 30-Mar-83 11:30:03 Johnsson Added LongPointerFromPage and PageFromLongPointer. Time: August 31, 1984 10:44:32 am PDT Plass Made Cedar PilotBridge version from version of 30-Mar-83 11:31:03 PST. Environment.mesa (last edited by: Plass on: August 31, 1984 10:47:05 am PDT) Cedar PilotBridge version Copyright (C) Xerox Corporation 1982. All rights reserved. Fundamental properties of the Mesa processor Not in PilotBridge version: first64K, Base, maxPagesInMDS, maxPagesInVM descriptor for arbitrary sequence of bytes Note that 2**24-2 is one less than the highest numbered VM page provided by the hardware; the highest numbered VM page, 2**24-1, is pre-empted for system purposes. PageNumber/LONG POINTER conversions Êî˜JšœL™LJ™J˜Jšœ:™:J˜šÏk ˜ Jšœœs˜Jšœ œc˜qJšœœ.˜6J˜—Jšœ œœœ˜%˜Jš˜J˜Jšœ,™,J˜Jšœ œ˜+JšœœÏc˜MJ˜Jšœœ˜=Jšœ œž˜]J˜Jšœœ˜;Jšœ"œž˜bJ˜Jšœœ˜/Jšœœ˜=Jšœœž˜RJšœ"œž˜dJ˜JšœG™GJ˜Jšœ œœœž˜-Jšœ œœœž ˜/Jšœ œœœž ˜2Jš œœœœœœž ˜@Jš œœœœœœž˜BJš œœœœœœž ˜CJ˜Jšœœ˜Jšœœ˜J˜šœœ˜+J˜—J˜šœ œ˜'J˜—šœœœ˜Jšœ*™*Jš œœœœœœœ˜:Jšœœ˜(—Jšœœ˜J˜šœ œ˜'Jšœ?™?JšœC™CJšœ™J˜ Jšœ&ž œ˜2—šœ œ˜J˜.J˜,—šœ œžœ˜6J˜J˜,J˜J˜—Jšœ#™#J˜šÏnœ œ˜1Jš œœœœœœ˜HJ˜—šŸœ œ œœ˜6Jšœœ˜Jšœœ!˜*J˜—Jšœ˜J˜J˜J˜J˜—Jš˜J˜šœœ˜%J˜ —šœœ˜ J˜M—šœœ˜#J˜I—šœœ˜$J˜-—šœœ˜'Jšœœœ˜%—šœœ˜%J˜<—šœœ˜$J˜—šœœ ˜)Jšœ\œœ˜|—šœœ ˜'J˜—˜!J˜+—˜"JšœAœP˜•—˜!J˜2—˜+JšœF˜FJ˜——…—RP