-- file: OpCodeParams.mesa, edited by Sweet on Feb 15, 1979 12:46 PM

DIRECTORY
  AltoDefs: FROM "altodefs" USING [BYTE],
  ControlDefs: FROM "controldefs" USING [globalbase, localbase],
  Mopcodes: FROM "mopcodes" USING [zEFC0, zJ2, zJEQ2, zJNE2, zLFC1, zLG0, zLI0, zLL0, zPL0, zR0, zRIL0, zSG0, zSL0, zW0];

OpCodeParams: DEFINITIONS =
  BEGIN OPEN Mopcodes;

  BYTE: TYPE = AltoDefs.BYTE;

  GlobalBase: CARDINAL = ControlDefs.globalbase;
  GlobalHB: TYPE = [GlobalBase..GlobalBase+16);
  GlobalLoadSlots: TYPE = [GlobalBase..GlobalBase+8);
  GlobalStoreSlots: TYPE = [GlobalBase..GlobalBase+4);

  LocalBase: CARDINAL = ControlDefs.localbase;
  LocalHB: TYPE = [LocalBase..LocalBase+16);
  LocalLoadSlots: TYPE = [LocalBase..LocalBase+8);
  LocalStoreSlots: TYPE = [LocalBase..LocalBase+8);
  LocalPutSlots: TYPE = [LocalBase..LocalBase+4);

  HB: TYPE = [0..16);
  LoadImmediateSlots: TYPE = [0..7);
  ReadSlots: TYPE = [0..5);
  WriteSlots: TYPE = [0..3);
  RILSlots: TYPE = [0..1);
  MaxFIAJumps: INTEGER = 8;
  MaxFICJumps: INTEGER = 8;
  MaxFBJumps: INTEGER = 121;
  MaxBBJumps: INTEGER = 127;
  
  ExternalProcBase: CARDINAL = 0;
  LocalProcBase: CARDINAL = 1;
  ExternalProcSlots: TYPE = [ExternalProcBase..ExternalProcBase+16);
  LocalProcSlots: TYPE = [LocalProcBase..LocalProcBase+8);
  DstarLocalProcSlots: TYPE = [LocalProcBase..LocalProcBase+16);

  zRILn: BYTE = zRIL0;
  zEFCn: BYTE = zEFC0;
  zLFCn: BYTE = zLFC1;
  zLIn: BYTE = zLI0;
  zLLn: BYTE = zLL0;
  zSLn: BYTE = zSL0;
  zLGn: BYTE = zLG0;
  zSGn: BYTE = zSG0;
  zPLn: BYTE = zPL0;
  zRn: BYTE = zR0;
  zWn: BYTE = zW0;
  zJn: BYTE = zJ2;
  zJEQn: BYTE = zJEQ2;
  zJNEn: BYTE = zJNE2;

  END...