MachineParms:
DEFINITIONS = {
These definitions cover the variant of PrincOps used by Cedar/Mesa, which is not the same as the PrincOps used in product land.
BitOrder:
TYPE = {msBit, lsBit};
msBit => bit N is more significant than bit N+1 in a word
(PrincOps, Dragon, Motorola 680x0, IBM 360, Sparc)
lsBit => bit N+1 is more significant than bit N in a word
(PDP-11, VAX, Intel 80x86)
WordOrder:
TYPE = {msWord, lsWord};
msWord => word N is more significant than word N+1 in multi-word arithmetic
lsWord => word N+1 is more significant than word N in multi-word arithmetic
bitOrder: BitOrder = msBit;
wordOrder: WordOrder = lsWord;
bitsPerAU:
NAT = 16;
-- AU = "addressing unit"
logBitsPerAU: NAT = BITS[[0..bitsPerAU)];
bitsPerByte:
NAT = 8;
maxByte: NAT = 0FFh;
logBitsPerByte: NAT = BITS[[0..bitsPerByte)];
bitsPerChar:
NAT = 8;
maxChar: CARD = 0FFh;
logBitsPerChar: NAT = BITS[[0..bitsPerChar)];
newLineChar: CHAR = 015C;
bitsPerWord:
NAT = 16;
-- bits per word (native arithmetic)
maxWord: CARD = 0FFFFh;
logBitsPerWord: NAT = BITS[[0..bitsPerWord)];
bitsPerLongWord:
NAT = 32;
maxLongWord: CARD = 0FFFFFFFFh;
logBitsPerLongWord: NAT = BITS[[0..bitsPerLongWord)];
bitsPerReal: NAT = 32;
bitsPerPtr:
NAT = 16;
For pointers into local and global frames.
bitsPerLongPtr:
NAT = 32;
For all other pointers.
bitsPerPort: NAT = bitsPerWord;
bitsPerProc: NAT = bitsPerWord;
bitsPerProcess: NAT = bitsPerWord;
bitsPerProgram: NAT = bitsPerWord;
bitsPerRef: NAT = bitsPerLongWord;
bitsPerSignal: NAT = bitsPerProc;
wordsPerProcess:
NAT = 1;
processNil: ARRAY [0..wordsPerProcess) OF CARD16 = ALL[0];
wordsPerCondVar: NAT = 1;
bitsPerCondVar:
NAT = bitsPerWord;
condVarInit: CARD16 = 0;
wordsPerMonLock: NAT = 1;
bitsPerMonLock:
NAT = bitsPerWord;
monLockInit: ARRAY [0..wordsPerMonLock) OF CARD16 = ALL[100000b];
bitsPerStringBound:
NAT = 16;
StringBody has fields length & maxlength which must be unsigned[bitsPerStringBound]. STRING = POINTER TO StringBody.
TEXT has fields length & maxlength which must be of type [0..2**bitsPerStringBound-1), and the fields must occupy bitsPerStringBound bits each.
bitsPerLink:
NAT = bitsPerPtr;
This length is used for imports/exports links.
fastBytes:
BOOL =
FALSE;
TRUE iff there is fast random access to bytes
packedFields: BOOL = TRUE;
PackedBitCount: TYPE = [1..bitsPerLongWord];
packedFieldSize:
ARRAY PackedBitCount
OF
NAT = [
01, 02, 04, 04, 08, 08, 08, 08,
16, 16, 16, 16, 16, 16, 16, 16,
32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32];
Alignments:
ARRAY AlignmentIndex
OF
NAT = [16];
AlignmentIndex: TYPE = [0..0];
}.