home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-10 | 4.0 KB | 162 lines | [TEXT/MPS ] |
- (*
- File: MachineExceptions.mod
-
- Contains: Processor Exception Handling Interfaces .
-
- Version: Technology: System 7.5
- Package: Universal Interfaces 2.0 in “MPW Latest” on ETO #17
-
- Copyright: © 1984-1995 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- stack. Include the file and version information (from above)
- in the problem description and send to:
- Internet: apple.bugs.applelink.apple.com
- AppleLink: APPLE.BUGS
-
- *)
-
- (*$TAGS-*)
- (*$CALLING PASCAL*)
- MODULE MachineExceptions;
-
- IMPORT SYSTEM, Types;
-
- (* $PUSH*)
- (* $ALIGN MAC68K*)
- (* $LibExport+*)
-
- TYPE
- AreaID* = Types.KernelID;
-
- (* Machine Dependent types for PowerPC*: *)
- MachineInformationPowerPC* = RECORD
- CTR*: Types.UnsignedWide;
- LR*: Types.UnsignedWide;
- PC*: Types.UnsignedWide;
- CR*: LONGINT;
- XER*: LONGINT;
- MSR*: LONGINT;
- END;
-
- RegisterInformationPowerPC* = RECORD
- R0*: Types.UnsignedWide;
- R1*: Types.UnsignedWide;
- R2*: Types.UnsignedWide;
- R3*: Types.UnsignedWide;
- R4*: Types.UnsignedWide;
- R5*: Types.UnsignedWide;
- R6*: Types.UnsignedWide;
- R7*: Types.UnsignedWide;
- R8*: Types.UnsignedWide;
- R9*: Types.UnsignedWide;
- R10*: Types.UnsignedWide;
- R11*: Types.UnsignedWide;
- R12*: Types.UnsignedWide;
- R13*: Types.UnsignedWide;
- R14*: Types.UnsignedWide;
- R15*: Types.UnsignedWide;
- R16*: Types.UnsignedWide;
- R17*: Types.UnsignedWide;
- R18*: Types.UnsignedWide;
- R19*: Types.UnsignedWide;
- R20*: Types.UnsignedWide;
- R21*: Types.UnsignedWide;
- R22*: Types.UnsignedWide;
- R23*: Types.UnsignedWide;
- R24*: Types.UnsignedWide;
- R25*: Types.UnsignedWide;
- R26*: Types.UnsignedWide;
- R27*: Types.UnsignedWide;
- R28*: Types.UnsignedWide;
- R29*: Types.UnsignedWide;
- R30*: Types.UnsignedWide;
- R31*: Types.UnsignedWide;
- END;
-
- FPUInformationPowerPC* = RECORD
- Registers*: ARRAY 32 (*ΔΔ[0..31]ΔΔ*) OF Types.UnsignedWide;
- FPSCR*: LONGINT;
- Reserved*: LONGINT;
- END;
-
-
- CONST
- writeReference* = 0;
- readReference* = 1;
- fetchReference* = 2;
-
-
- TYPE
- MemoryReferenceKind* = LONGINT;
-
- MemoryExceptionInformation* = RECORD
- theArea*: AreaID;
- theAddress*: Types.LogicalAddress;
- theError*: Types.OSStatus;
- theReference*: MemoryReferenceKind;
- END;
-
-
- CONST
- unknownException* = 0;
- illegalInstructionException* = 1;
- trapException* = 2;
- accessException* = 3;
- unmappedMemoryException* = 4;
- excludedMemoryException* = 5;
- readOnlyMemoryException* = 6;
- unresolvablePageFaultException* = 7;
- privilegeViolationException* = 8;
- traceException* = 9;
- instructionBreakpointException* = 10;
- dataBreakpointException* = 11;
- integerException* = 12;
- floatingPointException* = 13;
- stackOverflowException* = 14;
- terminationException* = 15;
-
-
- TYPE
- ExceptionKind* = LONGINT;
-
- ExceptionInfo* = RECORD
- (*ΔΔ CASE INTEGER OF
- 0: ( *)
- memoryInfo*: POINTER TO MemoryExceptionInformation;
- (*ΔΔ );*)
- END;
-
- ExceptionInformationPowerPC* = RECORD
- theKind*: ExceptionKind;
- machineState*: POINTER TO MachineInformationPowerPC;
- registerImage*: POINTER TO RegisterInformationPowerPC;
- FPUImage*: POINTER TO FPUInformationPowerPC;
- info*: ExceptionInfo;
- END;
-
- (*$IF GENERATINGPOWERPC *)
- ExceptionInformation* = ExceptionInformationPowerPC;
-
- MachineInformation* = MachineInformationPowerPC;
-
- RegisterInformation* = RegisterInformationPowerPC;
-
- FPUInformation* = FPUInformationPowerPC;
-
- (*$END*)
- (* Note*: An ExceptionHandler is NOT a UniversalProcPtr.
- It must be a native function pointer with NO routine descriptor. *)
- ExceptionHandler* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (VAR theException: ExceptionInformationPowerPC): Types.OSStatus;
-
- (* Routine for installing per-process exception handlers *)
-
- PROCEDURE InstallExceptionHandler*(theHandler: ExceptionHandler): ExceptionHandler;
- EXTERNAL PASCAL;
-
- (* $ALIGN RESET*)
- (* $POP*)
-
- END MachineExceptions.
-