home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-29 | 53.8 KB | 1,705 lines |
- (*************************************************************************
-
- $RCSfile: Exec.mod $
- Description: Interface to exec.library
-
- Created by: fjc (Frank Copeland)
- $Revision: 3.8 $
- $Author: fjc $
- $Date: 1995/06/04 23:13:14 $
-
- Includes Release 40.15
-
- (C) Copyright 1985-1993 Commodore-Amiga, Inc.
- All Rights Reserved
-
- Oberon-A interface Copyright © 1994-1995, Frank Copeland.
- This file is part of the Oberon-A Interface.
- See Oberon-A.doc for conditions of use and distribution.
-
- *************************************************************************)
-
- <* STANDARD- *>
-
- MODULE [2] Exec;
-
- IMPORT SYS := SYSTEM, s := Sets;
-
- (**-- Pointer declarations ---------------------------------------------*)
-
- TYPE
-
- MinNodePtr* = POINTER TO MinNode;
- NodePtr* = POINTER TO Node;
- MinListPtr* = POINTER TO MinList;
- ListPtr* = POINTER TO List;
- ResidentPtr* = POINTER TO Resident;
- MemChunkPtr* = POINTER TO MemChunk;
- MemHeaderPtr* = POINTER TO MemHeader;
- MemEntryPtr* = POINTER TO MemEntry;
- MemListPtr* = POINTER TO MemList;
- TaskPtr* = POINTER TO Task;
- StackSwapStructPtr* = POINTER TO StackSwapStruct;
- MsgPortPtr* = POINTER TO MsgPort;
- MsgPortSoftIntPtr* = POINTER TO MsgPortSoftInt;
- MessagePtr* = POINTER TO Message;
- InterruptPtr* = POINTER TO Interrupt;
- IntVectorPtr = POINTER TO IntVector;
- SoftIntListPtr = POINTER TO SoftIntList;
- SemaphoreRequestPtr = POINTER TO SemaphoreRequest;
- SignalSemaphorePtr* = POINTER TO SignalSemaphore;
- SemaphorePtr* = POINTER TO Semaphore;
- LibraryPtr* = POINTER TO Library;
- DevicePtr* = POINTER TO Device;
- UnitPtr* = POINTER TO Unit;
- IORequestPtr* = POINTER TO IORequest;
- IOStdReqPtr* = POINTER TO IOStdReq;
- ExecBasePtr* = POINTER TO ExecBase;
- MemHandlerDataPtr * = POINTER TO MemHandlerData;
- MemPoolPtr * = POINTER TO RECORD END;
-
-
- (**-- Library definitions ----------------------------------------------*)
-
- (*
- ** $VER: initializers.h 39.0 (15.10.91)
- **
- ** Macros for use with the InitStruct() function.
- **
- ** Not ported.
- *)
-
- (*
- ** $VER: types.h 40.1 (10.8.93)
- **
- ** Data typing.
- *)
-
- CONST
-
- includeVersion* = 40; (* Version of the include files in use. (Do not
- use this label for OpenLibrary() calls!) *)
-
- TYPE
-
- (* WARNING: APTR was redefined for the V36 Includes! APTR is a *)
- (* 32-Bit Absolute Memory Pointer. C pointer math will not *)
- (* operate on APTR -- use "ULONG *" instead. *)
-
- ADDRESS * = SYS.ADDRESS;
- APTR * = SYS.ADDRESS; (* 32-bit untyped pointer *)
- BPTR * = SYS.BPTR;
-
- LONG * = LONGINT; (* signed 32-bit quantity *)
- ULONG * = LONGINT; (* unsigned 32-bit quantity *)
- LONGBITS* = s.SET32; (* 32 bits manipulated individually *)
- WORD * = INTEGER; (* signed 16-bit quantity *)
- UWORD * = INTEGER; (* unsigned 16-bit quantity *)
- WORDBITS* = s.SET16; (* 16 bits manipulated individually *)
- BYTE * = SYS.BYTE; (* signed 8-bit quantity *)
- UBYTE * = SYS.BYTE; (* unsigned 8-bit quantity *)
- BYTEBITS* = s.SET8; (* 8 bits manipulated individually *)
- RPTR * = INTEGER; (* signed relative pointer *)
- STRING * = ARRAY 256 OF CHAR;
- STRPTR * = POINTER TO STRING; (* string pointer (NULL terminated) *)
- LSTRPTR * = POINTER TO ARRAY MAX(INTEGER)-1 OF CHAR;
-
-
- (* For compatibility only: (don't use in new code) *)
- SHORT * = INTEGER; (* signed 16-bit quantity (use WORD) *)
- USHORT * = INTEGER; (* unsigned 16-bit quantity (use UWORD) *)
- COUNT * = INTEGER;
- UCOUNT * = INTEGER;
- CPTR * = ULONG;
-
-
- (* Types with specific semantics *)
- FLOAT * = REAL;
- DOUBLE * = ARRAY 2 OF SYS.LONGWORD;
- SINGLE * = SYS.LONGWORD;
- BOOL * = INTEGER;
- TEXT * = CHAR;
-
- CONST
-
- null * = NIL;
- byteMask * = 0FFH;
-
- (* Types convenient for Oberon-A programmers *)
-
- TYPE
-
- PROC * = PROCEDURE;
- LBOOL * = LONGINT;
- LONGBOOL * = LBOOL;
-
- (* Legal values for LBOOL types *)
-
- CONST
-
- true * = 1;
- false * = 0;
- LTRUE * = -1;
- LFALSE * = 0;
-
- (* Use these constants instead of the corresponding literals when passing
- ** parameters to Amiga library functions. This will result in clearer
- ** code, and will also assist when porting code to and from AmigaOberon.
- *)
-
- CONST
-
- NILSTR * = ""; (* Use when a NULL would be passed in C *)
- EMPTYSTR * = "\o"; (* Use when an empty string would be passed in C *)
-
- (* libraryVersion is now obsolete. Please use libraryMinimum *)
- (* or code the specific minimum library version you require. *)
-
- libraryMinimum* = 33; (* Lowest version supported by Commodore-Amiga *)
-
- (*
- ** $VER: nodes.h 39.0 (15.10.91)
- **
- ** Nodes & Node type identifiers.
- *)
-
- TYPE
-
- (*
- * Type compatible to MinNode and Node:
- *)
- CommonNode * = RECORD END;
- CommonNodePtr * = POINTER TO CommonNode;
-
- (*
- * List Node Structure. Each member in a list starts with a Node
- *)
-
- NodeBase *= RECORD (CommonNode) END;
- Node * = RECORD (NodeBase)
- succ* : NodePtr; (* Pointer to next (successor) *)
- pred* : NodePtr; (* Pointer to previous (predecessor) *)
- type* : SHORTINT;
- pri* : SHORTINT; (* Priority, for sorting *)
- name* : LSTRPTR; (* ID string, null terminated *)
- END; (* Node *) (* Note: word aligned *)
-
- (* minimal node -- no type checking possible *)
-
- MinNodeBase *= RECORD (CommonNode) END;
- MinNode * = RECORD (MinNodeBase)
- succ* : MinNodePtr; (* Pointer to next (successor) *)
- pred* : MinNodePtr; (* Pointer to previous (predecessor) *)
- END; (* MinNode *)
-
-
- CONST
-
- (*
- ** Note: Newly initialized IORequests, and software interrupt structures
- ** used with Cause(), should have type ntUNKNOWN. The OS will assign a type
- ** when they are first used.
- *)
- (* ----- Node Types for Node.type -----*)
- unknown * = 0;
- task * = 1; (* Exec task *)
- interrupt * = 2;
- device * = 3;
- msgPort * = 4;
- message * = 5; (* Indicates message currently pending *)
- freeMsg * = 6;
- replyMsg * = 7; (* Message has been replied *)
- resource * = 8;
- library * = 9;
- memory * = 10;
- softInt * = 11; (* Internal flag used by SoftInits *)
- font * = 12;
- process * = 13; (* AmigaDOS Process *)
- semaphore * = 14;
- signalSem * = 15; (* signal semaphores *)
- bootNode * = 16;
- kickMem * = 17;
- graphics * = 18;
- deathMessage* = 19;
- user * = 254; (* User node types work down from here *)
- extended * = 255;
-
- (*
- ** $VER: lists.h 39.0 (15.10.91)
- **
- ** Definitions and macros for use with Exec lists
- *)
-
- TYPE
-
- (*
- * Type compatible to MinList and List:
- *)
- CommonList * = RECORD END;
- CommonListPtr * = POINTER TO CommonList;
-
- (*
- * Full featured list header.
- *)
- List* = RECORD (CommonList)
- head* : NodePtr;
- tail* : NodePtr;
- tailPred* : NodePtr;
- type* : SHORTINT;
- pad* : BYTE;
- END; (* List *) (* word aligned *)
-
- (*
- * Minimal List Header - no type checking
- *)
- MinList* = RECORD (CommonList)
- head* : MinNodePtr;
- tail* : MinNodePtr;
- tailPred* : MinNodePtr;
- END; (* MinList *) (* longword aligned *)
-
-
- (*
- ** $VER: alerts.h 39.3 (12.5.92)
- **
- ** Alert numbers, as displayed by system crashes.
- *)
-
- (*********************************************************************
- *
- * Format of the alert error number:
- *
- * +-+-------------+----------------+--------------------------------+
- * |D| SubSysId | General Error | SubSystem Specific Error |
- * +-+-------------+----------------+--------------------------------+
- * 1 7 bits 8 bits 16 bits
- *
- * D: DeadEnd alert
- * SubSysId: indicates ROM subsystem number.
- * General Error: roughly indicates what the error was
- * Specific Error: indicates more detail
- **********************************************************************)
-
- (**********************************************************************
- *
- * Hardware/CPU specific alerts: They may show without the 8 at the
- * front of the number. These are CPU/68000 specific. See 680x0
- * programmer's manuals for more details.
- *
- **********************************************************************)
-
- CONST
-
- acpuBusErr * = 080000002H; (* Hardware bus fault/access error *)
- acpuAddressErr * = 080000003H; (* Illegal address access (ie: odd) *)
- acpuInstErr * = 080000004H; (* Illegal instruction *)
- acpuDivZero * = 080000005H; (* Divide by zero *)
- acpuCHK * = 080000006H; (* Check instruction error *)
- acpuTRAPV * = 080000007H; (* TrapV instruction error *)
- acpuPrivErr * = 080000008H; (* Privilege violation error *)
- acpuTrace * = 080000009H; (* Trace error *)
- acpuLineA * = 08000000AH; (* Line 1010 Emulator error *)
- acpuLineF * = 08000000BH; (* Line 1111 Emulator error *)
- acpuFormat * = 08000000EH; (* Stack frame format error *)
- acpuSpurious * = 080000018H; (* Spurious interrupt error *)
- acpuAutoVec1 * = 080000019H; (* AutoVector Level 1 interrupt error *)
- acpuAutoVec2 * = 08000001AH; (* AutoVector Level 2 interrupt error *)
- acpuAutoVec3 * = 08000001BH; (* AutoVector Level 3 interrupt error *)
- acpuAutoVec4 * = 08000001CH; (* AutoVector Level 4 interrupt error *)
- acpuAutoVec5 * = 08000001DH; (* AutoVector Level 5 interrupt error *)
- acpuAutoVec6 * = 08000001EH; (* AutoVector Level 6 interrupt error *)
- acpuAutoVec7 * = 08000001FH; (* AutoVector Level 7 interrupt error *)
-
- (*********************************************************************
- *
- * General Alerts
- *
- * For example: timer.device cannot open math.library would be 05038015H
- *
- * alert(an_timerdev|ag_openlib|ao_MathLib);
- *
- *********************************************************************)
-
- CONST
-
- (* ------ alert types *)
- deadEnd * = 80000000H;
- recovery * = 00000000H;
-
-
- (* ------ general purpose alert codes *)
- noMemory * = 00010000H;
- makeLib * = 00020000H;
- openLib * = 00030000H;
- openDev * = 00040000H;
- openRes * = 00050000H;
- ioError * = 00060000H;
- noSignal * = 00070000H;
- badParm * = 00080000H;
- closeLib * = 00090000H; (* usually too many closes *)
- closeDev * = 000A0000H; (* or a mismatched close *)
- procCreate * = 000B0000H; (* Process creation failed *)
-
-
- (* ------ alert objects: *)
- execLib * = 00008001H;
- graphicsLib * = 00008002H;
- layersLib * = 00008003H;
- intuition * = 00008004H;
- mathLib * = 00008005H;
- dosLib * = 00008007H;
- ramLib * = 00008008H;
- iconLib * = 00008009H;
- expansionLib* = 0000800AH;
- diskfontLib * = 0000800BH;
- utilityLib * = 0000800CH;
- keyMapLib * = 0000800DH;
-
- audioDev * = 00008010H;
- consoleDev * = 00008011H;
- gamePortDev * = 00008012H;
- keyboardDev * = 00008013H;
- trackDiskDev* = 00008014H;
- timerDev * = 00008015H;
-
- ciaRsrc * = 00008020H;
- diskRsrc * = 00008021H;
- miscRsrc * = 00008022H;
-
- bootStrap * = 00008030H;
- workbench * = 00008031H;
- diskCopy * = 00008032H;
- gadTools * = 00008033H;
- atUnknown * = 00008035H;
-
-
-
- (*********************************************************************
- *
- * Specific Alerts:
- *
- *********************************************************************)
-
- (* ------ exec.library *)
- anExecLib * = 01000000H;
- excptVect * = 01000001H; (* 68000 exception vector checksum (obs.) *)
- baseChkSum * = 01000002H; (* Execbase checksum (obs.) *)
- libChkSum * = 01000003H; (* Library checksum failure *)
-
- memCorrupt * = 81000005H; (* Corrupt memory list detected in FreeMem *)
- intrMem * = 81000006H; (* No memory for interrupt servers *)
- initAPtr * = 01000007H; (* InitStruct() of an APTR source (obs.) *)
- semCorrupt * = 01000008H; (* A semaphore is in an illegal state
- at ReleaseSempahore() *)
- freeTwice * = 01000009H; (* Freeing memory already freed *)
- bogusExcpt * = 8100000AH; (* illegal 68k exception taken (obs.) *)
- ioUsedTwice * = 0100000BH; (* Attempt to reuse active IORequest *)
- memoryInsane * = 0100000CH; (* Sanity check on memory list failed
- during availmem(memfLARGEST) *)
- ioAfterClose* = 0100000DH; (* IO attempted on closed IORequest *)
- stackProbe * = 0100000EH; (* Stack appears to extend out of range *)
- badFreeAddr * = 0100000FH; (* Memory header not located. [ Usually an
- invalid address passed to FreeMem() ] *)
- badSemaphore* = 01000010H; (* An attempt was made to use the old
- message semaphores. *)
-
- (* ------ graphics.library *)
- anGraphicsLib * = 02000000H;
- gfxNoMem * = 82010000H; (* graphics out of memory *)
- gfxNoMemMspc * = 82010001H; (* MonitorSpec alloc, no memory *)
- longFrame * = 82010006H; (* long frame, no memory *)
- shortFrame * = 82010007H; (* short frame, no memory *)
- textTmpRas * = 02010009H; (* text, no memory for TmpRas *)
- bltBitMap * = 8201000AH; (* BltBitMap, no memory *)
- regionMemory * = 8201000BH; (* regions, memory not available *)
- makeVPort * = 82010030H; (* MakeVPort, no memory *)
- gfxNewError * = 0200000CH;
- gfxFreeError * = 0200000DH;
-
- gfxNoLCM * = 82011234H; (* emergency memory not available *)
-
- obsoleteFont * = 02000401H; (* unsupported font description used *)
-
- (* ------ layers.library *)
- anLayersLib * = 03000000H;
- layersNoMem * = 83010000H; (* layers out of memory *)
-
- (* ------ intuition.library *)
- anIntuition * = 04000000H;
- gadgetType * = 84000001H; (* unknown gadget type *)
- badGadget * = 04000001H; (* Recovery form of GadgetType *)
- createPort * = 84010002H; (* create port, no memory *)
- itemAlloc * = 04010003H; (* item plane alloc, no memory *)
- subAlloc * = 04010004H; (* sub alloc, no memory *)
- planeAlloc * = 84010005H; (* plane alloc, no memory *)
- itemBoxTop * = 84000006H; (* item box top < RelZero *)
- openScreen * = 84010007H; (* open screen, no memory *)
- openScrnRast * = 84010008H; (* open screen, raster alloc, no memory *)
- sysScrnType * = 84000009H; (* open sys screen, unknown type *)
- addSWGadget * = 8401000AH; (* add SW gadgets, no memory *)
- openWindow * = 8401000BH; (* open window, no memory *)
- badState * = 8400000CH; (* Bad State Return entering Intuition *)
- badMessage * = 8400000DH; (* Bad Message received by IDCMP *)
- weirdEcho * = 8400000EH; (* Weird echo causing incomprehension *)
- noConsole * = 8400000FH; (* couldn't open the Console Device *)
- noISem * = 004000010H; (* Intuition skipped obtaining a sem *)
- iSemOrder * = 004000011H; (* Intuition obtained a sem in bad order *)
-
- (* ------ math.library *)
- anMathLib * = 05000000H;
-
- (* ------ dos.library *)
- anDosLib * = 07000000H;
- startMem * = 07010001H; (* no memory at startup *)
- endTask * = 07000002H; (* EndTask didn't *)
- qPktFail * = 07000003H; (* Qpkt failure *)
- asyncPkt * = 07000004H; (* Unexpected packet received *)
- freeVec * = 07000005H; (* Freevec failed *)
- diskBlkSeq * = 07000006H; (* Disk block sequence error *)
- bitMap * = 07000007H; (* Bitmap corrupt *)
- keyFree * = 07000008H; (* Key already free *)
- badChkSum * = 07000009H; (* Invalid checksum *)
- diskError * = 0700000AH; (* Disk Error *)
- keyRange * = 0700000BH; (* Key out of range *)
- badOverlay * = 0700000CH; (* Bad overlay *)
- badInitFunc * = 0700000DH; (* Invalid init packet for cli/shell *)
- fileReclosed * = 0700000EH; (* A filehandle was closed more than once *)
-
- (* ------ ramlib.library *)
- anRAMLib * = 08000000H;
- badSegList * = 08000001H; (* no overlays in library seglists *)
-
- (* ------ icon.library *)
- anIconLib * = 09000000H;
-
- (* ------ expansion.library *)
- anExpansionLib * = 0A000000H;
- badExpansionFree * = 0A000001H; (* freeed free region *)
-
- (* ------ diskfont.library *)
- anDiskfontLib * = 0B000000H;
-
- (* ------ audio.device *)
- anAudioDev * = 10000000H;
-
- (* ------ console.device *)
- anConsoleDev * = 11000000H;
- noWindow * = 11000001H; (* Console can't open initial window *)
-
- (* ------ gameport.device *)
- anGamePortDev * = 12000000H;
-
- (* ------ keyboard.device *)
- anKeyboardDev * = 13000000H;
-
- (* ------ trackdisk.device *)
- anTrackDiskDev * = 14000000H;
- tdCalibSeek * = 14000001H; (* calibrate: seek error *)
- tdDelay * = 14000002H; (* delay: error on timer wait *)
-
- (* ------ timer.device *)
- anTimerDev * = 15000000H;
- tmBadReq * = 15000001H; (* bad request *)
- tmBadSupply * = 15000002H; (* power supply -- no 50/60Hz ticks *)
-
- (* ------ cia.resource *)
- anCIARsrc * = 20000000H;
-
- (* ------ disk.resource *)
- anDiskRsrc * = 21000000H;
- drHasDisk * = 21000001H; (* get unit: already has disk *)
- drIntNoAct * = 21000002H; (* interrupt: no active unit *)
-
- (* ------ misc.resource *)
- anMiscRsrc * = 22000000H;
-
- (* ------ bootstrap *)
- anBootStrap * = 30000000H;
- bootError * = 30000001H; (* boot code returned an error *)
-
- (* ------ Workbench *)
- anWorkbench * = 31000000H;
- noFonts * = 0B1000001H;
- wbBadStartupMsg1 * = 31000001H;
- wbBadStartupMsg2 * = 31000002H;
- wbBadIOMsg * = 31000003H;
- wbReLayoutToolMenu * = 0B1010009H;
-
- (* The following are in the V37 includes, but not the V40 *)
-
- wbInitPotionAllocDrawer * = 0B1010004H;
- wbCreateWBMenusCreateMenus1 * = 0B1010005H;
- wbCreateWBMenusCreateMenus2 * = 0B1010006H;
- wbLayoutWBMenusLayoutMenus * = 0B1010007H;
- wbAddToolMenuItem * = 0B1010008H;
- wbinitTimer * = 0B101000AH;
- wbInitLayerDemon * = 0B101000BH;
- wbinitWbGels * = 0B101000CH;
- wbInitScreenAndWindows1 * = 0B101000DH;
- wbInitScreenAndWindows2 * = 0B101000EH;
- wbInitScreenAndWindows3 * = 0B101000FH;
- wbMAlloc * = 0B1010010H;
-
- (* ------ DiskCopy *)
- anDiskCopy * = 32000000H;
-
- (* ------ toolkit for Intuition *)
- anGadTools * = 33000000H;
-
- (* ------ System utility library *)
- anUtilityLib * = 34000000H;
-
- (* ------ For use by any application that needs it *)
- anUnknown * = 35000000H;
-
- (*
- ** $VER: errors.h 39.0 (15.10.91)
- **
- ** Standard Device IO Errors (returned in ioError)
- *)
-
- openFail * = -1; (* device/unit failed to open *)
- aborted * = -2; (* request terminated early [after AbortIO()] *)
- noCmd * = -3; (* command not supported by device *)
- badLength * = -4; (* not a valid length (usually ioLENGTH) *)
- badAddress* = -5; (* invalid address (misaligned or bad range) *)
- unitBusy * = -6; (* device opens ok, but requested unit is busy *)
- selfTest * = -7; (* hardware failed self-test *)
-
-
- (*
- ** $VER: resident.h 39.0 (15.10.91)
- **
- ** Resident/ROMTag stuff. Used to identify and initialize code modules.
- *)
-
-
- TYPE
-
- Resident* = RECORD
- matchWord* : UWORD; (* word to match on (ILLEGAL) *)
- matchTag* : ResidentPtr; (* pointer to the above *)
- endSkip* : APTR; (* address to continue scan *)
- flags* : s.SET8; (* various tag flags *)
- version* : SHORTINT; (* release version number *)
- type* : SHORTINT; (* type of module (ntXXXXXX) *)
- pri* : SHORTINT; (* initialization priority *)
- name* : LSTRPTR; (* pointer to node name *)
- idString* : LSTRPTR; (* pointer to identification string *)
- init* : APTR; (* pointer to init code *)
- END; (* Resident *)
-
- CONST
-
- matchWord * = 4AFCH; (* The 68000 "ILLEGAL" instruction *)
-
- autoInit * = 7; (* Resident.init points to data structure *)
- afterDos * = 2;
- singleTask * = 1;
- coldStart * = 0;
-
- never * = {};
-
- (*
- ** $VER: memory.h 39.3 (21.5.92)
- **
- ** Definitions and structures used by the memory allocation system
- *)
-
- TYPE
-
- (****** MemChunk ****************************************************)
-
- MemChunk* = RECORD
- next* : MemChunkPtr; (* pointer to next chunk *)
- bytes* : ULONG; (* chunk byte size *)
- END; (* MemChunk *)
-
-
- (****** MemHeader ***************************************************)
-
- MemHeader* = RECORD (NodeBase)
- node* : Node;
- attributes* : s.SET16; (* characteristics of this region *)
- first* : MemChunkPtr; (* first free region *)
- lower* : APTR; (* lower memory bound *)
- upper* : APTR; (* upper memory bound+1 *)
- free* : ULONG; (* total number of free bytes *)
- END; (* MemHeader *)
-
-
- (****** MemEntry ****************************************************)
-
- MemEntry* = RECORD
- addr * : APTR; (* the address of this memory region *)
- (** reqs * : s.SET32; (* the AllocMem requirements *)
- *
- * This occupies the same space as addr (a C union). Access via:
- * SYS.VAL (s.SET32, MemEntry.addr)
- *)
- length * : ULONG; (* the length of this memory region *)
- END; (* MemEntry *)
-
- (****** MemList *****************************************************)
-
- (* Note: SIZE (MemList) includes the size of the first MemEntry!
- No it doesn't !! This is *Oberon*, not C !! *)
-
- MemList* = RECORD (NodeBase)
- node * : Node;
- numEntries * : UWORD; (* number of entries in this struct *)
- (*me * : ARRAY OF MemEntry; (* the first entry *)*)
- END; (* MemList *)
-
- CONST
-
- (* ----- Memory Requirement Types ---------------------------*)
- (* ----- See the AllocMem() documentation for details--------*)
-
- any * = {}; (* Any type of memory will do *)
- public * = 0;
- chip * = 1;
- fast * = 2;
- local * = 8; (* Memory that does not go away at RESET *)
- mem24BitDMA * = 9; (* DMAable memory within 24 bits of address *)
- kick * = 10; (* Memory that can be used for KickTags *)
-
- memClear * = 16; (* AllocMem: NULL out area before return *)
- largest * = 17; (* AvailMem: return the largest chunk size *)
- reverse * = 18; (* AllocMem: allocate from the top down *)
- total * = 19; (* AvailMem: return total size of memory *)
-
- noExpunge* = 31; (*AllocMem: Do not cause expunge on failure *)
-
- (* ----- Current alignment rules for memory blocks (may increase) -----*)
- blockSize * = 8;
- blockMask * = (blockSize-1);
-
- TYPE
-
- (****** MemHandlerData **********************************************)
- (* Note: This structure is *READ ONLY* and only EXEC can create it!*)
- MemHandlerData * = RECORD
- requestSize - : ULONG; (* Requested allocation size *)
- requestFlags - : s.SET32;(* Requested allocation flags *)
- flags - : s.SET32;(* Flags (see below) *)
- END;
-
- CONST
-
- recycle * = 0; (* 0==First time, 1==recycle *)
-
- (****** Low Memory handler return values ***************************)
- didNothing * = 0; (* Nothing we could do... *)
- allDone * = -1; (* We did all we could do *)
- tryAgain * = 1; (* We did some, try the allocation again *)
-
- (*
- ** $VER: tasks.h 39.3 (18.9.92)
- **
- ** Task Control Block, Singals, and Task flags.
- *)
-
- TYPE
-
- TaskBase *= RECORD (NodeBase) END;
- TaskBasePtr *= POINTER TO TaskBase;
-
- (* Please use Exec functions to modify task structure fields, where available.
- *)
- Task * = RECORD (TaskBase)
- node* : Node;
- flags* : s.SET8;
- state* : s.SET8;
- idNestCnt* : SHORTINT; (* intr disabled nesting*)
- tdNestCnt* : SHORTINT; (* task disabled nesting*)
- sigAlloc* : s.SET32; (* sigs allocated *)
- sigWait* : s.SET32; (* sigs we are waiting for *)
- sigRecvd* : s.SET32; (* sigs we have received *)
- sigExcept* : s.SET32; (* sigs we will take excepts for *)
- trapAlloc* : s.SET16; (* traps allocated *)
- trapAble* : s.SET16; (* traps enabled *)
- exceptData* : APTR; (* points to except data *)
- exceptCode* : PROC; (* points to except code *)
- trapData* : APTR; (* points to trap code *)
- trapCode* : PROC; (* points to trap data *)
- spReg* : APTR; (* stack pointer *)
- spLower* : APTR; (* stack lower bound *)
- spUpper* : APTR; (* stack upper bound + 2*)
- switch* : PROC; (* task losing CPU *)
- launch* : PROC; (* task getting CPU *)
- memEntry* : List; (* Allocated memory. Freed by RemTask() *)
- userData* : APTR; (* For use by the task; no restrictions! *)
- END; (* Task *)
-
- (*
- * Stack swap structure as passed to StackSwap()
- *)
- StackSwapStruct* = RECORD
- lower* : APTR; (* Lowest byte of stack *)
- upper* : ULONG; (* Upper end of stack (size + Lowest) *)
- pointer* : APTR; (* Stack pointer at switch point *)
- END; (* StackSwapStruct *)
-
- CONST
-
- (* ----- Flag Bits ------------------------------------------*)
- procTime * = 0;
- eTask * = 3;
- stackChk * = 4;
- exception * = 5;
- switch * = 6;
- launch * = 7;
-
- (* ----- Task States ----------------------------------------*)
- inval * = 0;
- added * = 1;
- run * = 2;
- ready * = 3;
- wait * = 4;
- except * = 5;
- removed * = 6;
-
- (* ----- Predefined Signals -------------------------------------*)
- sigAbort * = 0;
- sigChild * = 1;
- sigBlit * = 4; (* Note: same as SINGLE *)
- sigSingle * = 4; (* Note: same as BLIT *)
- sigIntuition * = 5;
- sigNet * = 7;
- sigDos * = 8;
-
- (*
- ** $VER: ports.h 39.0 (15.10.91)
- **
- ** Message ports and Messages.
- *)
-
- TYPE
-
- MsgPortBase *= RECORD (NodeBase) END;
- MsgPortBasePtr *= POINTER TO MsgPortBase;
-
- (****** MsgPort *****************************************************)
-
- MsgPort * = RECORD (MsgPortBase)
- node* : Node;
- flags* : SHORTINT;
- sigBit* : SHORTINT;(* signal bit number *)
- sigTask* : TaskPtr; (* object to be signalled *)
- msgList* : List; (* message linked list *)
- END; (* MsgPort *)
-
- MsgPortSoftInt* = RECORD (MsgPortBase)
- node* : Node;
- flags* : SHORTINT;
- sigBit* : SHORTINT; (* signal bit number *)
- softInt* : InterruptPtr; (* object to be signalled *)
- msgList* : List; (* message linked list *)
- END; (* MsgPortSoftInt *)
-
- CONST
-
- (* MsgPort.flags: Port arrival actions (PutMsg) *)
- signal * = 0; (* Signal task in mpSigTask *)
- softint * = 1; (* Signal SoftInt in mpsoftint/mpSigTask *)
- ignore * = 2; (* Ignore arrival *)
-
-
- TYPE
-
- MessageBase *= RECORD (NodeBase) END;
- MessageBasePtr *= POINTER TO MessageBase;
-
- (****** Message *****************************************************)
-
- Message * = RECORD (MessageBase)
- node* : Node;
- replyPort* : MsgPortPtr; (* message reply port *)
- length* : UWORD; (* total message length, in bytes *)
- (* (include the size of the Message *)
- (* structure in the length) *)
- END; (* Message *)
-
- (*
- ** $VER: interrupts.h 39.1 (18.9.92)
- **
- ** Callback structures used by hardware & software interrupts
- *)
-
- TYPE
-
- Interrupt * = RECORD (NodeBase)
- node* : Node;
- data* : APTR; (* server data segment *)
- code* : PROC; (* server code entry *)
- END; (* Interrupt *)
-
-
- IntVector * = RECORD (* For EXEC use ONLY! *)
- data* : APTR;
- code* : PROC;
- node* : NodePtr;
- END; (* IntVector *)
-
-
- SoftIntList * = RECORD (CommonList) (* For EXEC use ONLY! *)
- list* : List;
- pad* : UWORD;
- END; (* SoftIntList *)
-
- CONST
-
- (* this is a fake INT definition, used only for AddIntServer and the like *)
- nmi * = 15;
-
- (*
- ** $VER: semaphores.h 39.1 (7.2.92)
- **
- ** Definitions for locking functions.
- *)
-
- TYPE
-
- (****** SignalSemaphore *********************************************)
-
- (* Private structure used by ObtainSemaphore() *)
- SemaphoreRequest = RECORD (MinNodeBase)
- link - : MinNode;
- waiter - : TaskPtr;
- END; (* SemaphoreRequest *)
-
- (* Signal Semaphore data structure *)
- SignalSemaphoreBase *= RECORD (NodeBase) END;
- SignalSemaphoreBasePtr *= POINTER TO SignalSemaphoreBase;
-
- SignalSemaphore * = RECORD (SignalSemaphoreBase)
- link* : Node;
- nestCount* : INTEGER;
- waitQueue* : MinList;
- multipleLink- : SemaphoreRequest;
- owner* : TaskPtr;
- queueCount* : INTEGER;
- END; (* SignalSemaphore *)
-
- (****** Semaphore procure message (for use in V39 Procure/Vacate ****)
- SemaphoreMessageBase *= RECORD (MessageBase) END;
- SemaphoreMessageBasePtr *= POINTER TO SemaphoreMessageBase;
-
- SemaphoreMessage * = RECORD (SemaphoreMessageBase)
- semaphore * : SignalSemaphorePtr;
- END;
-
- CONST
-
- shared * = 1;
- exclusive * = 0;
-
- TYPE
-
- MsgPortLockMsg * = RECORD (MsgPortBase)
- node * : Node;
- flags * : SHORTINT;
- sigBit * : SHORTINT; (* signal bit number *)
- lockMsg* : MessagePtr; (* object to be signalled *) (* may be other type [hG] *)
- msgList* : List; (* message linked list *)
- END;
-
- TYPE
-
- (****** Semaphore (Old Procure/Vacate type, not reliable) ***********)
-
- Semaphore* = RECORD (MsgPortBase) (* Do not use these semaphores! *)
- msgPort* : MsgPort;
- bids* : INTEGER;
- END; (* Semaphore *)
-
-
- (*
- ** $VER: libraries.h 39.2 (10.4.92)
- **
- ** Definitions for use when creating or using Exec libraries
- *)
-
-
- CONST
-
- (* ------ Special Constants ---------------------------------------*)
- vectSize * = 6; (* Each library entry takes 6 bytes *)
- reserved * = 4; (* Exec reserves the first 4 vectors *)
- base * = -vectSize;
- userDef * = base-reserved*vectSize;
- nonStd * = userDef;
-
- (* ------ Standard Functions --------------------------------------*)
- open * = -6;
- close * = -12;
- expunge * = -18;
- extFunc * = -24; (* for future expansion *)
-
- TYPE
-
- (* ------ Library Base Structure ----------------------------------*)
- (* Also used for Devices and some Resources *)
- LibraryBase *= RECORD (NodeBase) END;
- LibraryBasePtr *= POINTER TO LibraryBase;
-
- Library * = RECORD (LibraryBase)
- node* : Node;
- flags* : s.SET8;
- pad* : SHORTINT;
- negSize* : UWORD; (* number of bytes before library *)
- posSize* : UWORD; (* number of bytes after library *)
- version* : UWORD; (* major *)
- revision* : UWORD; (* minor *)
- idString* : LSTRPTR; (* ASCII identification *)
- sum* : ULONG; (* the checksum itself *)
- openCnt* : UWORD; (* number of current opens *)
- END; (* Library *) (* Warning: size is not a longword multiple! *)
-
- CONST
-
- (* Flags bit definitions (all others are system reserved) *)
- summing * = 0; (* we are currently checksumming *)
- changed * = 1; (* we have just changed the lib *)
- sumUsed * = 2; (* set if we should bother to sum *)
- delExp * = 3; (* delayed expunge *)
-
-
- (*
- ** $VER: io.h 39.0 (15.10.91)
- **
- ** Message structures used for device communication
- *)
-
-
- TYPE
-
- IORequestBase *= RECORD (MessageBase) END;
- IORequestBasePtr *= POINTER TO IORequestBase;
-
- IORequest * = RECORD (IORequestBase)
- message* : Message;
- device* : DevicePtr; (* device node pointer *)
- unit* : UnitPtr; (* unit (driver private)*)
- command* : UWORD; (* device command *)
- flags* : s.SET8;
- error* : SHORTINT; (* error or warning num *)
- END; (* IORequest *)
-
- IOStdReq * = RECORD (IORequestBase)
- message* : Message;
- device* : DevicePtr; (* device node pointer *)
- unit* : UnitPtr; (* unit (driver private)*)
- command* : UWORD; (* device command *)
- flags* : s.SET8;
- error* : SHORTINT; (* error or warning num *)
- actual* : ULONG; (* actual number of bytes transferred *)
- length* : ULONG; (* requested number bytes transferred*)
- data* : APTR; (* points to data area *)
- offset* : ULONG; (* offset for block structured devices *)
- END; (* IOStdReq *)
-
- CONST
-
- (* library vector offsets for device reserved vectors *)
- beginIO * = -30;
- abortIO * = -36;
-
- (* ioFlags defined bits *)
- quick * = 0;
-
-
- invalid * = 0;
- reset * = 1;
- read * = 2;
- write * = 3;
- update * = 4;
- clear * = 5;
- stop * = 6;
- start * = 7;
- flush * = 8;
-
- nonstd * = 9;
-
- (*
- ** $VER: devices.h 39.0 (15.10.91)
- **
- ** Include file for use by Exec device drivers
- *)
-
- TYPE
-
- (****** Device ******************************************************)
-
- DeviceBase *= RECORD (LibraryBase) END;
- DeviceBasePtr *= POINTER TO DeviceBase;
-
- Device * = RECORD (DeviceBase) library * : Library END;
-
-
- (****** Unit ********************************************************)
-
- UnitBase *= RECORD (MsgPortBase) END;
- UnitBasePtr *= POINTER TO UnitBase;
-
- Unit * = RECORD (UnitBase)
- msgPort* : MsgPort; (* queue for unprocessed messages *)
- (* instance of msgport is recommended *)
- flags* : s.SET8;
- pad* : BYTE;
- openCnt* : UWORD; (* number of active opens *)
- END; (* Unit *)
-
-
- CONST
-
- active * = 0;
- inTask * = 1;
-
-
- (*
- ** $VER: execbase.h 39.6 (18.1.93)
- **
- ** Definition of the exec.library base structure.
- *)
-
- TYPE
-
- (* Definition of the Exec library base structure (pointed to by location 4).
- ** Most fields are not to be viewed or modified by user programs. Use
- ** extreme caution.
- *)
- ExecBase* = RECORD (LibraryBase)
- libNode* : Library; (* Standard library node *)
-
- (******** Static System Variables ********)
-
- softVer* : UWORD; (* kickstart release number (obs.) *)
- lowMemChkSum* : INTEGER; (* checksum of 68000 trap vectors *)
- chkBase* : ULONG; (* system base pointer complement *)
- coldCapture* : APTR; (* coldstart soft capture vector *)
- coolCapture* : APTR; (* coolstart soft capture vector *)
- warmCapture* : APTR; (* warmstart soft capture vector *)
- sysStkUpper* : APTR; (* system stack base (upper bound) *)
- sysStkLower* : APTR; (* top of system stack (lower bound) *)
- maxLocMem* : APTR; (* top of chip memory *)
- debugEntry* : APTR; (* global debugger entry point *)
- debugData* : APTR; (* global debugger data segment *)
- alertData* : APTR; (* alert data segment *)
- maxExtMem* : APTR; (* top of extended mem, or null if none *)
-
- chkSum* : UWORD; (* for all of the above (minus 2) *)
-
- (****** Interrupt Related ***************************************)
-
- intVects : ARRAY 16 OF IntVector;
-
- (****** Dynamic System Variables *************************************)
-
- thisTask* : TaskPtr; (* pointer to current task (readable) *)
-
- idleCount* : ULONG; (* idle counter *)
- dispCount* : ULONG; (* dispatch counter *)
- quantum* : UWORD; (* time slice quantum *)
- elapsed* : UWORD; (* current quantum ticks *)
- sysFlags* : s.SET16; (* misc internal system flags *)
- idNestCnt* : SHORTINT; (* interrupt disable nesting count *)
- tdNestCnt* : SHORTINT; (* task disable nesting count *)
-
- attnFlags* : s.SET16; (* special attention flags (readable) *)
-
- attnResched* : UWORD; (* rescheduling attention *)
- resModules* : APTR; (* resident module array pointer *)
- taskTrapCode* : PROC;
- taskExceptCode* : PROC;
- taskExitCode* : PROC;
- taskSigAlloc* : s.SET32;
- taskTrapAlloc* : s.SET16;
-
-
- (****** System Lists (private!) ********************************)
-
- memList- : List;
- resourceList- : List;
- deviceList- : List;
- intrList- : List;
- libList- : List;
- portList- : List;
- taskReady- : List;
- taskWait- : List;
-
- softInts : ARRAY 5 OF SoftIntList;
-
- (****** Other Globals *******************************************)
-
- lastAlert- : ARRAY 4 OF LONGINT;
-
- (* these next two variables are provided to allow
- ** system developers to have a rough idea of the
- ** period of two externally controlled signals --
- ** the time between vertical blank interrupts and the
- ** external line rate (which is counted by CIA A's
- ** "time of day" clock). In general these values
- ** will be 50 or 60, and may or may not track each
- ** other. These values replace the obsolete afbPAL
- ** and afb50HZ flags.
- *)
- vblankFrequency- : SHORTINT; (* (readable) *)
- powerSupplyFrequency- : SHORTINT; (* (readable) *)
-
- semaphoreList- : List;
-
- (* these next two are to be able to kickstart into user ram.
- ** KickMemPtr holds a singly linked list of MemLists which
- ** will be removed from the memory list via AllocAbs. If
- ** all the AllocAbs's succeeded, then the KickTagPtr will
- ** be added to the rom tag list.
- *)
- kickMemPtr* : APTR; (* ptr to queue of mem lists *)
- kickTagPtr* : APTR; (* ptr to rom tag queue *)
- kickCheckSum* : APTR; (* checksum for mem and tags *)
-
- (****** V36 Exec additions start here **************************************)
-
- pad0 : UWORD;
- launchPoint : ULONG; (* Private to Launch/Switch *)
- ramLibPrivate : APTR;
- (* The next ULONG contains the system "E" clock frequency,
- ** expressed in Hertz. The E clock is used as a timebase for
- ** the Amiga's 8520 I/O chips. (E is connected to "02").
- ** Typical values are 715909 for NTSC, or 709379 for PAL.
- *)
- eClockFrequency- : ULONG; (* (readable) *)
- cacheControl : APTR; (* Private to CacheControl calls *)
- taskID* : ULONG; (* Next available task ID *)
-
- reserved1* : ARRAY 5 OF ULONG;
-
- mmuLock : APTR; (* private *)
-
- reserved2* : ARRAY 3 OF ULONG;
-
- (****** V39 Exec additions start here **************************************)
-
- (* The following list and data element are used
- * for V39 exec's low memory handler...
- *)
- memHandlers* : MinList; (* The handler list *)
- memHandler : APTR; (* Private! handler pointer *)
- END; (* ExecBase *)
-
-
- CONST
-
- (****** Bit defines for AttnFlags (see above) ******************************)
-
- (* Processors and Co-processors: *)
- m68010 * = 0; (* also set for 68020 *)
- m68020 * = 1; (* also set for 68030 *)
- m68030 * = 2; (* also set for 68040 *)
- m68040 * = 3;
- m68881 * = 4; (* also set for 68882 *)
- m68882 * = 5;
- mFPU40 * = 6; (* Set if 68040 FPU *)
- (*
- * The mFPU40 bit is set when a working 68040 FPU
- * is in the system. If this bit is set and both the
- * m68881 and m68882 bits are not set, then the 68040
- * math emulation code has not been loaded and only 68040
- * FPU instructions are available. This bit is valid *ONLY*
- * if the m68040 bit is set.
- *)
-
- (****** Selected flag definitions for Cache manipulation calls **********)
-
- enableI * = 0; (* Enable instruction cache *)
- freezeI * = 1; (* Freeze instruction cache *)
- clearI * = 3; (* Clear instruction cache *)
- ibe * = 4; (* Instruction burst enable *)
- enableD * = 8; (* 68030 Enable data cache *)
- freezeD * = 9; (* 68030 Freeze data cache *)
- clearD * = 11; (* 68030 Clear data cache *)
- dbe * = 12; (* 68030 Data burst enable *)
- writeAllocate* = 13; (* 68030 Write-Allocate mode
- (must always be set!) *)
- enableE * = 30; (* Master enable for external caches *)
- (* External caches should track the *)
- (* state of the internal caches *)
- (* such that they do not cache anything *)
- (* that the internal cache turned off *)
- (* for. *)
- copyBack * = 31; (* Master enable for copyback caches *)
-
- dmaContinue * = 1; (* Continuation flag for CachePreDMA *)
- dmaNoModify * = 2; (* Set if DMA does not update memory *)
- dmaReadFromRAM * = 3; (* Set if DMA goes *FROM* RAM to device *)
-
- (**-- Library base pointer ---------------------------------------------*)
-
- CONST
-
- absExecBase = 4;
-
- VAR
-
- exec*, SysBase* : ExecBasePtr;
-
-
- (**-- Library functions ------------------------------------------------*)
-
- (* ------misc --------------------------------------------------------- *)
-
- PROCEDURE Supervisor* [SysBase,-30]
- ( userFunction [13] : PROC )
- : APTR;
-
- (* ------special patchable hooks to internal exec activity ------------ *)
-
- (* ------module creation ---------------------------------------------- *)
-
- PROCEDURE InitCode* [SysBase,-72]
- ( startClass [0] : s.SET8;
- version [1] : ULONG );
- PROCEDURE InitStruct* [SysBase,-78]
- ( initTable [9] : APTR;
- memory [10] : APTR;
- size [0] : ULONG );
- PROCEDURE MakeLibrary* [SysBase,-84]
- ( funcInit [8] : APTR;
- structInit [9] : APTR;
- libInit [10] : PROC;
- dataSize [0] : ULONG;
- segList [1] : BPTR )
- : LibraryPtr;
- PROCEDURE MakeFunctions* [SysBase,-90]
- ( target [8] : APTR;
- functionArray [9] : APTR;
- funcDispBase [10] : APTR );
- PROCEDURE FindResident* [SysBase,-96]
- ( name [9] : ARRAY OF CHAR )
- : ResidentPtr;
- PROCEDURE InitResident* [SysBase,-102]
- ( resident [9] : ResidentPtr;
- segList [1] : BPTR );
-
- (* ------diagnostics -------------------------------------------------- *)
-
- PROCEDURE Alert* [SysBase,-108]
- ( alertNum [7] : ULONG );
- PROCEDURE Debug* [SysBase,-114]
- ( flags [0] : s.SET32 );
-
- (* ------interrupts --------------------------------------------------- *)
-
- PROCEDURE Disable* [SysBase,-120] ();
- PROCEDURE Enable* [SysBase,-126] ();
- PROCEDURE Forbid* [SysBase,-132] ();
- PROCEDURE Permit* [SysBase,-138] ();
- PROCEDURE SetSR* [SysBase,-144]
- ( newSR [0] : s.SET16;
- mask [1] : s.SET16 )
- : s.SET16;
- PROCEDURE SuperState* [SysBase,-150] ();
- PROCEDURE UserState* [SysBase,-156]
- ( sysStack [0] : APTR );
- PROCEDURE SetIntVector* [SysBase,-162]
- ( intNumber [0] : ULONG;
- interrupt [9] : InterruptPtr )
- : InterruptPtr;
- PROCEDURE AddIntServer* [SysBase,-168]
- ( intNumber [0] : ULONG;
- interrupt [9] : InterruptPtr );
- PROCEDURE RemIntServer* [SysBase,-174]
- ( intNumber [0] : ULONG;
- interrupt [9] : InterruptPtr );
- PROCEDURE Cause* [SysBase,-180]
- ( interrupt [9] : InterruptPtr );
-
- (* ------memory allocation -------------------------------------------- *)
-
- PROCEDURE Allocate* [SysBase,-186]
- ( freeList [8] : MemHeaderPtr;
- byteSize [0] : ULONG )
- : APTR;
- PROCEDURE Deallocate* [SysBase,-192]
- ( freeList [8] : MemHeaderPtr;
- memoryBlock [9] : APTR;
- byteSize [0] : ULONG );
- PROCEDURE AllocMem* [SysBase,-198]
- ( byteSize [0] : ULONG;
- requirements [1] : s.SET32 )
- : APTR;
- PROCEDURE AllocAbs* [SysBase,-204]
- ( byteSize [0] : ULONG;
- location [1] : APTR )
- : APTR;
- PROCEDURE FreeMem* [SysBase,-210]
- ( memoryBlock [9] : APTR;
- byteSize [0] : ULONG );
- PROCEDURE AvailMem* [SysBase,-216]
- ( requirements [1] : s.SET32 )
- : ULONG;
- PROCEDURE AllocEntry* [SysBase,-222]
- ( entry [8] : APTR )
- : APTR;
- PROCEDURE FreeEntry* [SysBase,-228]
- ( entry [8] : APTR );
-
- (* ------lists -------------------------------------------------------- *)
-
- PROCEDURE Insert* [SysBase,-234]
- ( VAR list [8] : CommonList;
- node [9] : CommonNodePtr;
- pred [10] : CommonNodePtr );
- PROCEDURE AddHead* [SysBase,-240]
- ( VAR list [8] : CommonList;
- node [9] : CommonNodePtr );
- PROCEDURE AddTail* [SysBase,-246]
- ( VAR list [8] : CommonList;
- node [9] : CommonNodePtr );
- PROCEDURE Remove* [SysBase,-252]
- ( node [9] : CommonNodePtr );
- PROCEDURE RemHead* [SysBase,-258]
- ( VAR list [8] : CommonList )
- : CommonNodePtr;
- PROCEDURE RemTail* [SysBase,-264]
- ( VAR list [8] : CommonList )
- : CommonNodePtr;
- PROCEDURE Enqueue* [SysBase,-270]
- ( VAR list [8] : CommonList;
- node [9] : CommonNodePtr );
- PROCEDURE FindName* [SysBase,-276]
- ( VAR list [8] : CommonList;
- name [9] : ARRAY OF CHAR )
- : CommonNodePtr;
-
- (* ------tasks -------------------------------------------------------- *)
-
- PROCEDURE AddTask* [SysBase,-282]
- ( task [9] : TaskBasePtr;
- initPC [10] : PROC;
- finalPC [11] : APTR );
- PROCEDURE RemTask* [SysBase,-288]
- ( task [9] : TaskBasePtr );
- PROCEDURE FindTask* [SysBase,-294]
- ( name [9] : ARRAY OF CHAR )
- : TaskPtr;
- PROCEDURE SetTaskPri* [SysBase,-300]
- ( task [9] : TaskBasePtr;
- priority [0] : LONGINT )
- : SHORTINT;
- PROCEDURE SetSignal* [SysBase,-306]
- ( newSignals [0] : s.SET32;
- signalSet [1] : s.SET32 )
- : s.SET32;
- PROCEDURE SetExcept* [SysBase,-312]
- ( newSignals [0] : s.SET32;
- signalSet [1] : s.SET32 )
- : s.SET32;
- PROCEDURE Wait* [SysBase,-318]
- ( signalSet [0] : s.SET32 )
- : s.SET32;
- PROCEDURE Signal* [SysBase,-324]
- ( task [9] : TaskBasePtr;
- signalSet [0] : s.SET32 );
- PROCEDURE AllocSignal* [SysBase,-330]
- ( signalNum [0] : LONGINT )
- : SHORTINT;
- PROCEDURE FreeSignal* [SysBase,-336]
- ( signalNum [0] : LONGINT );
- PROCEDURE AllocTrap* [SysBase,-342]
- ( trapNum [0] : LONGINT )
- : SHORTINT;
- PROCEDURE FreeTrap* [SysBase,-348]
- ( trapNum [0] : LONGINT );
-
- (* ------messages ----------------------------------------------------- *)
-
- PROCEDURE AddPort* [SysBase,-354]
- ( port [9] : MsgPortBasePtr );
- PROCEDURE RemPort* [SysBase,-360]
- ( port [9] : MsgPortBasePtr );
- PROCEDURE PutMsg* [SysBase,-366]
- ( port [8] : MsgPortBasePtr;
- message [9] : MessageBasePtr );
- PROCEDURE GetMsg* [SysBase,-372]
- ( port [8] : MsgPortBasePtr )
- : MessagePtr;
- PROCEDURE ReplyMsg* [SysBase,-378]
- ( message [9] : MessageBasePtr );
- PROCEDURE WaitPort* [SysBase,-384]
- ( port [8] : MsgPortBasePtr );
- PROCEDURE FindPort* [SysBase,-390]
- ( name [9] : ARRAY OF CHAR )
- : MsgPortPtr;
-
- (* ------libraries ---------------------------------------------------- *)
-
- PROCEDURE AddLibrary* [SysBase,-396]
- ( library [9] : LibraryBasePtr );
- PROCEDURE RemLibrary* [SysBase,-402]
- ( library [9] : LibraryBasePtr );
- PROCEDURE OldOpenLibrary* [SysBase,-408]
- ( libName [9] : ARRAY OF CHAR )
- : LibraryPtr;
- PROCEDURE CloseLibrary* [SysBase,-414]
- ( library [9] : LibraryBasePtr );
- PROCEDURE SetFunction* [SysBase,-420]
- ( library [9] : LibraryBasePtr;
- funcOffset [8] : LONGINT;
- newFunction [0] : PROC )
- : PROC;
- PROCEDURE SumLibrary* [SysBase,-426]
- ( library [9] : LibraryBasePtr );
-
- (* ------devices ------------------------------------------------------ *)
-
- PROCEDURE AddDevice* [SysBase,-432]
- ( device [9] : DeviceBasePtr );
- PROCEDURE RemDevice* [SysBase,-438]
- ( device [9] : DeviceBasePtr );
- PROCEDURE OpenDevice* [SysBase,-444]
- ( devName [8] : ARRAY OF CHAR;
- unit [0] : ULONG;
- ioRequest [9] : MessageBasePtr;
- flags [1] : s.SET32 )
- : SHORTINT;
- PROCEDURE CloseDevice* [SysBase,-450]
- ( ioRequest [9] : MessageBasePtr );
- PROCEDURE DoIO* [SysBase,-456]
- ( ioRequest [9] : MessageBasePtr )
- : SHORTINT;
- PROCEDURE OldDoIO* [SysBase,-456]
- ( ioRequest [9] : MessageBasePtr );
- PROCEDURE SendIO* [SysBase,-462]
- ( ioRequest [9] : MessageBasePtr );
- PROCEDURE CheckIO* [SysBase,-468]
- ( ioRequest [9] : MessageBasePtr )
- : IORequestPtr;
- PROCEDURE WaitIO* [SysBase,-474]
- ( ioRequest [9] : MessageBasePtr )
- : SHORTINT;
- PROCEDURE OldWaitIO* [SysBase,-474]
- ( ioRequest [9] : MessageBasePtr );
- PROCEDURE AbortIO* [SysBase,-480]
- ( ioRequest [9] : MessageBasePtr );
-
- (* ------resources ---------------------------------------------------- *)
-
- PROCEDURE AddResource* [SysBase,-486]
- ( resource [9] : APTR );
- PROCEDURE RemResource* [SysBase,-492]
- ( resource [9] : APTR );
- PROCEDURE OpenResource* [SysBase,-498]
- ( resName [9] : ARRAY OF CHAR )
- : APTR;
-
- (* ------private diagnostic support ----------------------------------- *)
-
- (* ------misc --------------------------------------------------------- *)
-
- PROCEDURE RawDoFmt* [SysBase,-522]
- ( formatString [8] : ARRAY OF CHAR;
- dataStream [9] : APTR;
- putChProc [10] : PROC;
- putChData [11] : APTR )
- : APTR;
- PROCEDURE RawDoFmtL* [SysBase,-522]
- ( formatString [8] : ARRAY OF CHAR;
- dataStream [9] : ARRAY OF SYS.BYTE;
- putChProc [10] : PROC;
- putChData [11] : APTR )
- : APTR;
- PROCEDURE OldRawDoFmt* [SysBase,-522]
- ( formatString [8] : ARRAY OF CHAR;
- dataStream [9] : APTR;
- putChProc [10] : PROC;
- putChData [11] : APTR );
- PROCEDURE OldRawDoFmtL* [SysBase,-522]
- ( formatString [8] : ARRAY OF CHAR;
- dataStream [9] : ARRAY OF SYS.BYTE;
- putChProc [10] : PROC;
- putChData [11] : APTR );
- PROCEDURE GetCC* [SysBase,-528] ()
- : s.SET16;
- PROCEDURE TypeOfMem* [SysBase,-534]
- ( address [9] : APTR )
- : s.SET32;
- PROCEDURE Procure* [SysBase,-540]
- ( VAR semaphore [8] : Semaphore;
- bidMsg [9] : SemaphoreMessageBasePtr )
- : BOOLEAN;
- PROCEDURE Vacate* [SysBase,-546]
- ( VAR semaport [8] : Semaphore );
- PROCEDURE OpenLibrary* [SysBase,-552]
- ( libName [9] : ARRAY OF CHAR;
- version [0] : ULONG )
- : LibraryPtr;
-
- (* ---functions in V33 or higher (distributed as Release 1.2) --- *)
-
- (* ------signal semaphores (note funny registers)---------------------- *)
-
- PROCEDURE InitSemaphore* [SysBase,-558]
- ( VAR sigSem [8] : SignalSemaphoreBase );
- PROCEDURE ObtainSemaphore* [SysBase,-564]
- ( VAR sigSem [8] : SignalSemaphoreBase );
- PROCEDURE ReleaseSemaphore* [SysBase,-570]
- ( VAR sigSem [8] : SignalSemaphoreBase );
- PROCEDURE AttemptSemaphore* [SysBase,-576]
- ( VAR sigSem [8] : SignalSemaphoreBase )
- : BOOLEAN;
- PROCEDURE ObtainSemaphoreList* [SysBase,-582]
- ( VAR sigSem [8] : List );
- PROCEDURE ReleaseSemaphoreList* [SysBase,-588]
- ( VAR sigSem [8] : List );
- PROCEDURE FindSemaphore* [SysBase,-594]
- ( sigSem [9] : ARRAY OF CHAR )
- : SignalSemaphorePtr;
- PROCEDURE AddSemaphore* [SysBase,-600]
- ( VAR sigSem [9] : SignalSemaphoreBase );
- PROCEDURE RemSemaphore* [SysBase,-606]
- ( VAR sigSem [9] : SignalSemaphoreBase );
-
- (* ------kickmem support ---------------------------------------------- *)
-
- PROCEDURE SumKickData* [SysBase,-612] ()
- : ULONG;
-
- (* ------more memory support ------------------------------------------ *)
-
- PROCEDURE AddMemList* [SysBase,-618]
- ( size [0] : ULONG;
- attributes [1] : s.SET32;
- pri [2] : LONGINT;
- memBase [8] : APTR;
- name [9] : ARRAY OF CHAR );
- PROCEDURE CopyMem* [SysBase,-624]
- ( source [8] : ARRAY OF SYS.BYTE;
- dest [9] : ARRAY OF SYS.BYTE;
- size [0] : ULONG );
- PROCEDURE CopyMemAPTR* [SysBase,-624]
- ( source [8] : APTR;
- dest [9] : APTR;
- size [0] : ULONG );
- PROCEDURE CopyMemQuick* [SysBase,-630]
- ( source [8] : ARRAY OF SYS.BYTE;
- dest [9] : ARRAY OF SYS.BYTE;
- size [0] : ULONG );
- PROCEDURE CopyMemQuickAPTR* [SysBase,-630]
- ( source [8] : APTR;
- dest [9] : APTR;
- size [0] : ULONG );
-
- (* ------cache -------------------------------------------------------- *)
-
- (* ---functions in V36 or higher (distributed as Release 2.0) --- *)
-
- PROCEDURE CacheClearU* [SysBase,-636] ();
- PROCEDURE CacheClearE* [SysBase,-642]
- ( address [8] : APTR;
- length [0] : ULONG;
- caches [1] : s.SET32 );
- PROCEDURE CacheControl* [SysBase,-648]
- ( cacheBits [0] : s.SET32;
- cacheMask [1] : s.SET32 )
- : s.SET32;
-
- (* ------misc --------------------------------------------------------- *)
-
- PROCEDURE CreateIORequest* [SysBase,-654]
- ( port [8] : MsgPortBasePtr;
- size [0] : ULONG )
- : MessagePtr;
- PROCEDURE DeleteIORequest* [SysBase,-660]
- ( iorequest [8] : MessageBasePtr );
- PROCEDURE CreateMsgPort* [SysBase,-666] ()
- : MsgPortPtr;
- PROCEDURE DeleteMsgPort* [SysBase,-672]
- ( port [8] : MsgPortBasePtr );
- PROCEDURE ObtainSemaphoreShared* [SysBase,-678]
- ( VAR sigSem [8] : SignalSemaphoreBase );
-
- (* ------even more memory support ------------------------------------- *)
-
- PROCEDURE AllocVec* [SysBase,-684]
- ( byteSize [0] : ULONG;
- requirements [1] : s.SET32 )
- : APTR;
- PROCEDURE FreeVec* [SysBase,-690]
- ( memoryBlock [9] : APTR );
- PROCEDURE CreatePool* [SysBase,-696]
- ( requirements [0] : s.SET32;
- puddleSize [1] : ULONG;
- puddleThresh [2] : ULONG )
- : MemPoolPtr;
- PROCEDURE DeletePool* [SysBase,-702]
- ( poolHeader [8] : MemPoolPtr );
- PROCEDURE AllocPooled* [SysBase,-708]
- ( poolHeader [8] : MemPoolPtr;
- memSize [0] : ULONG )
- : APTR;
- PROCEDURE FreePooled* [SysBase,-714]
- ( poolHeader [8] : MemPoolPtr;
- memory [9] : APTR;
- memSize [0] : ULONG );
-
- (* ------misc --------------------------------------------------------- *)
-
- PROCEDURE AttemptSemaphoreShared* [SysBase,-720]
- ( VAR sigSem [8] : SignalSemaphoreBase )
- : BOOLEAN;
- PROCEDURE ColdReboot* [SysBase,-726] ();
- PROCEDURE StackSwap* [SysBase,-732]
- ( VAR newStack [8] : StackSwapStruct );
-
- (* ------task trees --------------------------------------------------- *)
-
- PROCEDURE ChildFree* [SysBase,-738]
- ( tid [0] : APTR );
- PROCEDURE ChildOrphan* [SysBase,-744]
- ( tid [0] : APTR );
- PROCEDURE ChildStatus* [SysBase,-750]
- ( tid [0] : APTR );
- PROCEDURE ChildWait* [SysBase,-756]
- ( tid [0] : APTR );
-
- (* ------future expansion --------------------------------------------- *)
-
- PROCEDURE CachePreDMA* [SysBase,-762]
- ( address [8] : APTR;
- VAR length [9] : ULONG;
- flags [0] : ULONG )
- : APTR;
- PROCEDURE CachePostDMA* [SysBase,-768]
- ( address [8] : APTR;
- VAR length [9] : ULONG;
- flags [0] : ULONG );
-
- (*------New, for V39 *)
-
- (*---functions in V39 or higher (Release 3) --- *)
-
- (*------Low memory handler functions *)
-
- PROCEDURE AddMemHandler* [SysBase,-774]
- ( memhand [9] : InterruptPtr );
- PROCEDURE RemMemHandler* [SysBase,-780]
- ( memhand [9] : InterruptPtr );
-
- (*------Function to attempt to obtain a Quick Interrupt Vector... *)
-
- PROCEDURE ObtainQuickVector* [SysBase,-786]
- ( interruptCode [8] : PROC )
- : ULONG;
-
-
- (**-----Module initialisation ---------------------------------------- *)
-
- <*$LongVars-*>
-
- BEGIN
- SYS.GET (absExecBase, SysBase); exec := SysBase
- END Exec.
-