Text preview for : ControlDefs.mesa_Oct77.pdf part of xerox ControlDefs.mesa Oct77 xerox mesa 3.0_1977 listing ControlDefs.mesa_Oct77.pdf
Back to : ControlDefs.mesa_Oct77.pd | Home
CONTROLDEFS.MESA 26-0CT-77 16:00:16 Page 1
-- ControlOefs.Mesa Edited by Sandman on August 23, 1977 9:34 PM
DIRECTORY
Mopcodes: FROM "mopcodes",
AltoDefs: FROM "altodefs",
SegmentOefs: FROM "segmentdefs";
DEFINITIONS FROM AltoOefs;
ControlDefs: DEFINITIONS '"
BEGIN
-- control link definitions
ControlLinkTag: TYPE = [frametag .. unboundtag];
frametag: CARDINAL'" 0;
proedesctag: CARDINAL'" 1;
signaldesctag: CARDINAL = proedesctag;
indirecttag: CARDINAL'" 2;
unboundtag: CARDINAL'" 3;
ExtendedControlLinkTag: TYPE = {frame, procDesc, indirect, uninitialized, representation};
ControlLink: TYPE", MACHINE DEPENDENT RECORD [
SELECT COMPUTED ExtendedControlLinkTag FROM
frame =) [
frameLink: FrameHandle],
procDese =) [
procLink: UNSPECIFIED],
indirect =) [
indirectLink: POINTER TO ControlLink].
uninitialized =) [
info: UnboundDesc],
representation =) [
data: [0 .. 37777B],
type: ControlLinkTag],
ENDCASE] :
GetReturnLink: MACHINE CODE RETURNS [ControlLink] = INLINE [Mopcodes.zLLB, returnOffset];
GetReturnFrame: MACHINE CODE RETURNS [FrameHandle] = INLINE [Mopcodes.zLLB. returnOffset]:
FrameLink: TYPE = MACHINE DEPENDENT RECORD [
frame: FrameHandle];
ProcDesc: TYPE = MACHINE DEPENDENT RECORD [
gftindex: GFTIndex,
epoffset: [0 .. eprange).
tag: ControlLinkTag];
SignalDesc: TYPE = ProcDesc:
IndirectLink: TYPE = MACHINE DEPENDENT RECORD [
link: POINTER TO ControlLink]:
UnboundDese: TYPE ='MACHINE DEPENDENT RECORD [
gftindex: GFTIndex,
descindex: [0 .. eprange),
tag: ControlLinkTag];
TrapLink: ControlLink = ControlLink [
representation[data:O, type:frametag]]:
PortTag: TYPE = {clink, plink}:
PortHandle: TYPE = POINTER TO Port;
Port: TYPE = MACIITNE DEPENDENT RECORD
pendingFrame: ControlLink.
destPort: SELfCT COMPUTED PortTag FROM
clink =) [
link: ControlLink].
plink =) [
port: PortHandle].
fNOCASE] ;
CONTROlDEFS.MESA 25-0CT-77 15:00:16 Page 2
-- frame definitions
FrameClass: TYPE" {global. local. signal, catch}:
FrameBase: TYPE .. MACHINE DEPENDENT RECORD [
accesslink: GlobalFrameHandle,
pc: WordPC.
returnlink: Controllink.
extensions: SELECT COMPUTED FrameClass FROM
global .. ) [
codebase: POINTER.
gftindex: ProeDese.
ownerlink: GlobalFrameHandle.
bindentry, bindlink: GlobalFrameHandle,
codesegment: SegmentDef~.FileSe~meritHandle.
symbolsegment: SegmentOefs.FileSegmentHandle].
local =) [
unused: UNSPECIFIED].
signal .. ) [
mark: BOOLEAN.
unused: [0 .. 77777B]].
catch =) [
unused: UNSPECIFIED.
staticlink: FrameHandle].
ENDCASE] :
FrameHandle: TYPE = POINTER TO FrameBase:
NULLFrame: GlobalFrameHandle .. LOOPHOLE[O]:
GlobalFrameHandle: TYPE = POINTER TO global FrameBase:
Alloc: MACHINE CODE [CARDINAL] RETURNS [POINTER] .. INLINE[Mopcodes.zALLOC]:
Free: MACHINE CODE [POINTER] .. INLINE[Mopcodes.zFREE]:
-- The following offsets are used by the compiler and MUST
-- reflect the field offsets in the definition of FrameBase
accessOffset: CARDINAL = 0:
pcOffset: CARDINAL" 1;
returnOffset: CARDINAL" 2:
codebaseOffset: CARDINAL = 3;
gftiOffset: CARDINAL = 4;
ownerOffset: CARDINAL" 5;
bindentryOffset: CARDINAL .. 6;
bindlinkOffset: CARDINAL" 1;
codesegmentOffset: CARDINAL = 8:
symbolsegmentOffset: CARDINAL" 9;
-- efficiently addressable portion of frames
globalbase: CARDINAL = 10;
globalslots: CARDINAL = 8;
procbase: CARDINAL = globalbase + global slots:
localbase: CARDINAL" 4;
localslots: CARDINAL" 8:
framelink: CARDINAL" localbase:
lprocslots, procslots: CARDINAL .. 16:
-- code segments
WordPC: TYPE .. RECORD [INTEGER]:
BytePC: TYPE = RECORD [CARDINAL]:
InstWord: TYPE = MACIIINE DEPfNDENT RECORD
oddbyte, evenbyte: BYTE];
fielddescr iptor: TYPE = MAClllNE DEPENDENT RECORD [
posn. siLe: [0 .. 17B]];
epmin: CARDINAL = 1: -- lower bound (module dependent)
oprange: CARDINAL = 32;
CsegPrefix: TYPE = MACIIINE DfPENDfNT RfCORD
swapinfo: WORD,
ngfi: [1. .4],
1 inkbase: [global base .. globalbase+16).
~ I
CONTROLDEFS.MESA 25~OCT~77 15:00:16 Page 3
nlinks: [0 .