-- SDOps.mesa   Edited by Sandman on June 30, 1980  5:03 PM
-- Copyright  Xerox Corporation 1979, 1980

DIRECTORY
  ControlDefs USING [ControlModule, FrameHandle, GlobalFrameHandle],
  InlineDefs USING [LongNumber];

SDOps: DEFINITIONS =
  BEGIN OPEN ControlDefs;

  -- Resident Trap Handlers


  AllocTrap: PROCEDURE [FrameHandle] RETURNS [FrameHandle];
  UnboundProcedureTrap: PROCEDURE;
  CodeTrap: PROCEDURE;
  Break: PROCEDURE;
  WorryBreaker: PROCEDURE RETURNS [FrameHandle];
  WorryCallDebugger: PROCEDURE RETURNS [FrameHandle];

  -- Non-Resident Trap Handlers


  StackErrorTrap: PROCEDURE;
  PointerFaultTrap: PROCEDURE;
  BoundsFaultTrap: PROCEDURE;
  ControlFaultTrap: PROCEDURE;
  ZeroDivisorTrap: PROCEDURE;
  DivideCheckTrap: PROCEDURE;
  UnimplementedInstTrap: PROCEDURE;
  WakeupErrorTrap: PROCEDURE;
  PageFaultTrap: PROCEDURE;
  WriteProtectFaultTrap: PROCEDURE;
  HardwareErrorTrap: PROCEDURE;

  -- Signaller Operations


  Signal: PROCEDURE [signal: SIGNAL, message: UNSPECIFIED];
  SignalList: PROCEDURE [signal: SIGNAL, message: POINTER TO UNSPECIFIED];
  Error: PROCEDURE [signal: SIGNAL, message: UNSPECIFIED];
  ErrorList: PROCEDURE [signal: SIGNAL, message: POINTER TO UNSPECIFIED];
  ReturnError: PROCEDURE [signal: SIGNAL, message: UNSPECIFIED];
  ReturnErrorList: PROCEDURE [signal: SIGNAL, message: POINTER TO UNSPECIFIED];
  UnnamedError: PROCEDURE;

  -- System Operations


  Start: PROCEDURE [ControlModule];
  Restart: PROCEDURE [GlobalFrameHandle];

  -- Unimplemented Instructions


  BlockEqual: PROCEDURE [p1: POINTER, n: CARDINAL, p2: POINTER] RETURNS [BOOLEAN];
  BlockEqualCode: PROCEDURE [p1: POINTER, n: CARDINAL, offset: CARDINAL]
    RETURNS [BOOLEAN];
  BlockEqualLong: PROCEDURE [p1: LONG POINTER, n: CARDINAL, p2: LONG POINTER]
    RETURNS [BOOLEAN];
  ByteBlockEqual: PROCEDURE [p1: POINTER, n: CARDINAL, p2: POINTER]
    RETURNS [BOOLEAN];
  ByteBlockEqualCode: PROCEDURE [p1: POINTER, n: CARDINAL, offset: CARDINAL]
    RETURNS [BOOLEAN];
  ByteBlockEqualLong: PROCEDURE [p1: LONG POINTER, n: CARDINAL, p2: LONG POINTER]
    RETURNS [BOOLEAN];
  BlockEqualCodeLong: PROCEDURE [p1: LONG POINTER, n: CARDINAL, offset: CARDINAL]
    RETURNS [BOOLEAN];
  ByteBlockEqualCodeLong: PROCEDURE [
    p1: LONG POINTER, n: CARDINAL, offset: CARDINAL] RETURNS [BOOLEAN];

  StringInit: PROCEDURE [coffset, n: CARDINAL, reloc, dest: POINTER];
  LongStringCheck: PROCEDURE;

  SignDivide: PROCEDURE;

  Number: TYPE = InlineDefs.LongNumber;

  DDivMod: PROCEDURE [num, den: Number] RETURNS [quotient, remainder: Number];
  DDiv: PROCEDURE [a, b: Number] RETURNS [Number];
  DMod: PROCEDURE [a, b: Number] RETURNS [r: Number];
  DMultiply: PROCEDURE [a, b: Number] RETURNS [product: Number];
  DUnsignedDivMod: PROCEDURE [num, den: Number]
    RETURNS [quotient, remainder: Number];
  DUnsignedDiv: PROCEDURE [a, b: Number] RETURNS [Number];
  DUnsignedMod: PROCEDURE [a, b: Number] RETURNS [r: Number];

  END...