DIRECTORY SmallCards; RCMap: DEFINITIONS = { OPEN SmallCards; Base: TYPE = LONG BASE POINTER; Object: TYPE = MACHINE DEPENDENT RECORD [ map: SELECT type: ObjectKind FROM null => [pad1: Card12 ¬ 0, pad2: Card16 ¬ 0], ref => [pad1: Card12 ¬ 0, pad2: Card16 ¬ 0], controlLink => [pad1: Card12 ¬ 0, pad2: Card16 ¬ 0], oneRef => [pad1: Card12 ¬ 0, offset: Card16 ¬ 0], simple => [ length: Card12 ¬ 0, refs: PACKED ARRAY [0..simpleLength) OF BOOL ¬ ALL[FALSE]], linked => [pad1: Card12 ¬ 0, pad2: Card16 ¬ 0, first: INT, -- offset (in AUs) of first simple REF rest: Index], -- map for the rest of the REFs (starts at offset + SIZE[REF]) nonVariant => [ pad: Card11 ¬ 0, complete: BOOL ¬ FALSE, components: SEQUENCE nComponents: Card16 OF RCField], variant => [ complete: BOOL ¬ FALSE, pad1: Card11 ¬ 0, pad2: Card16 ¬ 0, fdTag: FieldDescriptor ¬ [], pad3: Card16 ¬ 0, variants: SEQUENCE nVariants: Card16 OF Index -- indexed by tag value ], array => [ pad1: Card12 ¬ 0, offset: Card16 ¬ 0, unitsPerElement: INT ¬ 0, nElements: INT ¬ 0, rcmi: Index ¬ nullIndex ], sequence => [ pad1: Card12 ¬ 0, offset: Card16 ¬ 0, unitsPerElement: INT ¬ 0, fdLength: FieldDescriptor ¬ [], -- actual number of elements is stored here commonPart: Index ¬ nullIndex, dataOffset: INT ¬ 0, -- actual data begins here rcmi: Index ¬ nullIndex ], ENDCASE]; ObjectKind: TYPE = MACHINE DEPENDENT { null (0), ref, controlLink, oneRef, simple, linked, nonVariant, variant, array, sequence }; RCField: TYPE = MACHINE DEPENDENT RECORD [ unitOffset: INT ¬ 0, rcmi: Index ¬ nullIndex ]; FieldDescriptor: TYPE = MACHINE DEPENDENT RECORD [ bitOffset: INT ¬ 0, -- bit offset of the field bitCount: INT ¬ 0 -- bits in the field ]; Index: TYPE = Base RELATIVE LONG POINTER TO Object; VIndex: TYPE = Base RELATIVE LONG POINTER TO Object.variant; NVIndex: TYPE = Base RELATIVE LONG POINTER TO Object.nonVariant; AIndex: TYPE = Base RELATIVE LONG POINTER TO Object.array; SeqIndex: TYPE = Base RELATIVE LONG POINTER TO Object.sequence; SimpIndex: TYPE = Base RELATIVE LONG POINTER TO Object.simple; OneRefIndex: TYPE = Base RELATIVE LONG POINTER TO Object.oneRef; LinkedIndex: TYPE = Base RELATIVE LONG POINTER TO Object.linked; NullIndex: TYPE = Base RELATIVE LONG POINTER TO Object.null; RefIndex: TYPE = Base RELATIVE LONG POINTER TO Object.ref; ControlLinkIndex: TYPE = Base RELATIVE LONG POINTER TO Object.controlLink; componentMaxIndex: CARDINAL = Card16.LAST-1; componentLength: CARDINAL = componentMaxIndex+1; simpleMaxIndex: CARDINAL = 15; -- 4 bits for Object.type, 12 for length, 16 BOOLEANs simpleLength: CARDINAL = simpleMaxIndex+1; invalidIndex: Index = Index.LAST; -- guaranteed to be an invalid Index nullIndex: NullIndex = LOOPHOLE[Index.FIRST]; -- always at index 0 in the Base refIndex: RefIndex = LOOPHOLE[nullIndex+Object.null.SIZE]; controlLinkIndex: ControlLinkIndex = LOOPHOLE[refIndex+Object.ref.SIZE]; }. ° RCMap.mesa Copyright Σ 1985, 1986, 1988, 1991 by Xerox Corporation. All rights reserved. Russ Atkinson (RRA) March 1, 1988 6:19:17 pm PST Satterthwaite June 16, 1986 12:09:17 pm PDT TYPES Note: the null, ref, controlLink, oneRef, and simple variants must be 1 word long NOTE the specified RCMap for each variant includes all common parts describes an RC field in a record CONSTANTS leave room for Object.type in length word ΚH–(cedarcode) style•NewlineDelimiter ™headšœ ™ Icodešœ ΟeœC™NJ™0LšΟy+™+L˜šΟk œ ˜L˜——šΟnœŸ œ˜LšŸœ ˜—L˜šœ™L˜Lš œŸœŸœŸœŸœ˜L˜š œŸœŸœŸ œŸœ˜)šœŸœŸ˜!LšœQ™QLšœ-˜-Lšœ,˜,Lšœ4˜4Lšœ1˜1šœ ˜ Lšœ˜Lš œŸœŸœŸœŸœŸœŸœ˜;—šœ.˜.LšœŸœΟc&˜2Lšœ‘>˜L—šœ˜L˜Lšœ ŸœŸœ˜Lšœ ŸœŸœ ˜5—šœ ˜ LšŸœ?™CLšœ ŸœŸœ˜L˜L˜L˜Lšœ˜Lšœ ŸœŸœ‘˜EL˜—˜ Lšœ%˜%LšœŸœ˜Lšœ Ÿœ˜L˜L˜—˜ Lšœ%˜%LšœŸœ˜Lšœ!‘+˜LL˜Lšœ Ÿœ‘˜0L˜L˜—LšŸœ˜ —šœ ŸœŸœŸ œ˜&LšœX˜XL˜—L˜—š œ ŸœŸœŸ œŸœ˜*Lšœ!™!Lšœ Ÿœ˜Lšœ˜L˜L˜—š œŸœŸœŸ œŸœ˜2Lšœ Ÿœ‘˜.Lšœ Ÿœ‘˜&L˜L˜—Lš œŸœŸœŸ œŸœ˜3Lš œŸœŸœŸ œŸœ˜Lš œ ŸœŸœŸ œŸœ˜@Lš œ ŸœŸœŸ œŸœ˜@Lš œ ŸœŸœŸ œŸœ ˜