|##########|
|#MAGIC   #|CLABLILL
|#PROJECT #|"IMPORTMath"
|#PATHS   #|"StdProject"
|#FLAGS   #|xx-x-x-xx-x-x-x-----------------
|#USERSW  #|--------------------------------
|#USERMASK#|x-------------------------------
|#SWITCHES#|xx----xxxx-xx---
|##########|
DEFINITION MODULE Exec;

|   WARNING
|
| autodocs and fdfiles sometimes differ. search for "WARNING"
|

|=========================================================================
|
|  Produkt           :  Cluster
|  Projekt           :  Version 2.0
|  Paket             :  Amiga Bibliotheken V2.04
|  Komponente        :  Exec
|  Baustein          :  Definitionsmodul
|
|  Datum        Version Autor           Kommentar
|  ------------ ------- ----- ------------------------------------------------
|   7 Jul 1992   01:13   WB    rem Resources.def from Exec for the hierarchy
|   1 Jul 1992   01:12   WB    cleaning up etc. 11:07:59 AM
|  18 Feb 1992   01:11   WB    added new functions Cache(Pre|Post)DMA
|  27 Jan 1992   01:10   WB    start to change interface to pointers for OO
|                              compatibility. added StackSwap*, changed
|                              variablenames to lowercase.
|  17 Nov 1991   01:09         added ConstGrp
|  16 Nov 1991   01:08   WB    completed *Res Handles, FuncGrp,
|                              PtrGrp and RecordGrp for T_Exec
|  11 Nov 1991   01:07   WB    added IntFunc support
|   8 Nov 1991   01:06   WB    added support for Resource tracking
|   1 Oct 1991   01:05   WB    problem with NodeType fixed.
|  19 Sep 1991   01:04   WB    last check
|  30 Aug 1991   01:00   WB    filecreation
|=========================================================================

| $Header: O:usr/Cluster/Modules/Port2.0/txt/RCS/Exec.def,v 1.4 91/09/20
|          20:25:52 baron Exp Locker: baron $

| Groups in this module ( in this order ):
|
| Const,      Node,       List,       Int,        Mem,        Task,
| MsgPort,    oldMsgPort, Lib,        DeviceIO,   Semaphore,  Resident,
| ExecBase,   Special,    Signal,     Trap,       Resource,   Kick,
| Private,    Cache,      Child,      Func,       Ptr,        Record
|

| No structures are based on ResHandles due to multiple inheritance. Look
| in T_Exec for ResHandles.
|
| MinNode, MinList, List, IntVector, MemChunk, MemEntry, Resident
|

(* $A- *)


FROM System    IMPORT
	  (* T *) BITSET,             BPTR,               LONGSET,
		  PROC,               Regs,               SysStringPtr;

FROM Hardware  IMPORT
	  (* T *) CustomPtr,          IntFlags,           IntFlagSet
		  (*,LIntFlags *);

|
| sometimes you need ...
|
TYPE

  LONGPTR = POINTER TO LONGINT;

|
| ExecBase forward for Library calls ( found in ExecBaseGrp )
|

TYPE ExecBasePtr  = POINTER TO ExecBaseType;

VAR  ExecBase : ExecBasePtr;



|-------------------------------------------------------------------------
| types
|-------------------------------------------------------------------------

| most of CBM types are superfluous, as Cluster has its own definitions
| This group is not included in All, as the members are not very important.

CONST

  includeVersion = 36;    | version of the includes used.
  byteMask       = 255;   | For the fumblers.
  libraryMinimum = 33;    | Lowest version supported by Commodore-Amiga.

GROUP

  ConstGrp = includeVersion, byteMask, libraryMinimum;



|-------------------------------------------------------------------------
| nodes
|-------------------------------------------------------------------------

TYPE

  | User node types work down from "user"
  NodeType    = ( unknown,            task,               interrupt,
		  device,             msgPort,            message,
		  freeMsg,            replyMsg,           resoucre,
		  library,            memory,             softInt,
		  font,               process,            semaphore,
		  signalSem,          bootNode,           (* v36 *)
		  kickMem,            graphics,           deathMessage,
		  user = 254,         extended );

  NodePri       = [-128..127]; | SHORTINT;

  MinNodePtr    = POINTER TO MinNode;
  MinNode       = RECORD                                | 8 Bytes
		    succ,
		    pred  : SAMEPTR;
		  END;

  NodePtr       = POINTER TO Node;
  Node          = RECORD OF MinNode                     | 14 Bytes
		    type  : NodeType;
		    pri   : NodePri;
		    name  : SysStringPtr;
		  END;

GROUP

  NodeGrp =
	  (* I *) SysStringPtr,
	  (* T *) MinNode,            MinNodePtr,         Node,
		  NodePtr,            NodeType;



|-------------------------------------------------------------------------
| lists
|-------------------------------------------------------------------------

TYPE

  MinListPtr    = POINTER TO MinList;
  MinList       = RECORD                                | 12 Bytes
		    head,
		    tail,
		    tailPred : MinNodePtr
		  END;

  ListPtr       = POINTER TO List;
  List          = RECORD                                | 14 Bytes
		    head,
		    tail,
		    tailPred : NodePtr;
		    type     : NodeType;
		    pad      : SHORTCARD
		  END;

|
| As List cannot be made a successor of MinList, we have to define seperate
| functions for listfunctions, which can be used both for Nodes/Lists and
| MinNodes/MinLists. The Min* variant will have an 'M' before the object.
|

LIBRARY ExecBase BY -240
  PROCEDURE AddHead( list IN A0 : ListPtr;
		     node IN A1 : NodePtr );

LIBRARY ExecBase BY -240
  PROCEDURE AddMHead( minList IN A0 : MinListPtr;
		      minNode IN A1 : MinNodePtr );

LIBRARY ExecBase BY -246
  PROCEDURE AddTail( list IN A0 : ListPtr;
		     node IN A1 : NodePtr );

LIBRARY ExecBase BY -246
  PROCEDURE AddMTail( minList IN A0 : MinListPtr;
		      minNode IN A1 : MinNodePtr );

| initialize a piece of memory pointed to by "list" to be an empty list.
PROCEDURE NewList( VAR list : List;
		       type : NodeType );

PROCEDURE NewMList( VAR minList : MinList );

| no MinNodes allowed.
LIBRARY ExecBase BY -270
  PROCEDURE Enqueue( list IN A0 : ListPtr;
		     node IN A1 : NodePtr );

LIBRARY ExecBase BY -276
  PROCEDURE FindName( list IN A0 : ListPtr;
		      name IN A1 : SysStringPtr ): NodePtr;

LIBRARY ExecBase BY -234
  PROCEDURE Insert( list     IN A0 : ListPtr;
		    node     IN A1,
		    listNode IN A2 : NodePtr );

LIBRARY ExecBase BY -234
  PROCEDURE MInsert( minList     IN A0 : MinListPtr;
		     minNode     IN A1,
		     minListNode IN A2 : MinNodePtr );

LIBRARY ExecBase BY -258
  PROCEDURE RemHead( list IN A0 : ListPtr ): NodePtr;

LIBRARY ExecBase BY -258
  PROCEDURE RemMHead( minList IN A0 : MinListPtr ): MinNodePtr;

| works for Nodes just as well
LIBRARY ExecBase BY -252
  PROCEDURE Remove( minNode IN A1 : MinNodePtr );

LIBRARY ExecBase BY -264
  PROCEDURE RemTail( list IN A0 : ListPtr ): NodePtr;

LIBRARY ExecBase BY -264
  PROCEDURE RemMTail( minList IN A0 : MinListPtr ): MinNodePtr;

GROUP

  ListGrp =
	  (* I *) NodeGrp,
	  (* T *) List,               ListPtr,            MinList,
		  MinListPtr,
	  (* P *) AddHead,            AddTail,            NewList,
		  Enqueue,            FindName,           Insert,
		  RemHead,            Remove,             RemTail;



|-------------------------------------------------------------------------
| interrupts
|-------------------------------------------------------------------------

TYPE

  InterruptPtr    = POINTER TO Interrupt;

  | Functions which can be used as interupt code.
  IntFuncPtr      = POINTER TO IntFunc;
  IntFunc         = PROCEDURE( data IN A1 : ANYPTR;       | Interrupt.data
			       custom IN A0 : CustomPtr;
			       int    IN D1 : IntFlagSet; | intenar AND
							  | intreqr
			       mycode IN A5 : IntFuncPtr;
			       exec   IN A6 : ExecBasePtr ) : LONGINT;

  Interrupt       = RECORD OF Node                      | 22 Bytes
		      data : ANYPTR;
		      code : PROC;                      | IntFunc
		    END;

  | For ExecBase use only
  IntVectorPtr    = POINTER TO IntVector;
  IntVector       = RECORD                              | 12 Bytes
		      data : ANYPTR;
		      code : PROC;
		      node : NodePtr
		    END;

  | For ExecBase use only
  SoftIntListPtr  = POINTER TO SoftIntList;
  SoftIntList     = RECORD OF List                | 16 Bytes
		      pad  : CARDINAL             | keep longword alignment
		    END;

PROCEDURE AddIntServer( intNumber : IntFlags;      | Autodocs are wrong
			interrupt : InterruptPtr );

|LIBRARY ExecBase BY -168
  |PROCEDURE AddIntServer( intNumber IN D0 : IntFlags; | Autodocs are wrong
  |                        interrupt IN A1 : InterruptPtr );

LIBRARY ExecBase BY -180
  PROCEDURE Cause( (* REF *) Interrupt IN A1 : InterruptPtr );

LIBRARY ExecBase BY -120
  PROCEDURE Disable;

LIBRARY ExecBase BY -126
  PROCEDURE Enable;

LIBRARY ExecBase BY -132
  PROCEDURE Forbid;

LIBRARY ExecBase BY -138
  PROCEDURE Permit;

  PROCEDURE RemIntServer( intNumber : IntFlags;        | Autodocs are wrong
			  interrupt : InterruptPtr );

|LIBRARY ExecBase BY -174
  |PROCEDURE RemIntServer( intNumber IN D0 : IntFlags; | Autodocs are wrong
  |                        interrupt IN A1 : InterruptPtr );


PROCEDURE SetIntVector( intNumber : IntFlags;          | Autodocs are wrong
			interrupt : InterruptPtr ): InterruptPtr;

|LIBRARY ExecBase BY -162
  |PROCEDURE SetIntVector( intNumber IN D0 : IntFlags; | Autodocs are wrong
  |                        interrupt IN A1 : InterruptPtr ): InterruptPtr;

LIBRARY ExecBase BY -144
  PROCEDURE SetSR( newSR IN D0 : BITSET; mask IN D1 : BITSET ): BITSET;

LIBRARY ExecBase BY -150
  PROCEDURE SuperState(): ANYPTR;

LIBRARY ExecBase BY -30
  PROCEDURE Supervisor( userFunction IN A5: PROC );

LIBRARY ExecBase BY -156
  PROCEDURE UserState( sysStack IN D0 : ANYPTR );


GROUP

  IntGrp  =
	  (* I *) IntFlags,           (*LIntFlags,*)      ListGrp,
		  PROC,
	  (* T *) Interrupt,          InterruptPtr,       IntFunc,
		  IntFuncPtr,         IntVector,          IntVectorPtr,
		  SoftIntList,        SoftIntListPtr,
	  (* P *) AddIntServer,       Cause,              Disable,
		  Enable,             Forbid,             Permit,
		  RemIntServer,       SetIntVector,       SetSR,
		  SuperState,         Supervisor,         UserState;



|-------------------------------------------------------------------------
| memory
|-------------------------------------------------------------------------

TYPE

  | local, dma24, reverse and total are new for V36.
  | dma24 is memory within the 24 bit address space.
  MemReqs       = ( public,   chip,     fast,     mr3,      mr4,      mr5,
		    mr6,      mr7,      local,    dma24,    mr10,     mr11,
		    mr12,     mr13,     mr14,     mr15,     clear, largest,
		    reverse,  total );
  | clear used to be memClear when the compiler did not like it

  MemReqSet     = SET OF MemReqs;
  MemTypeSet    = SET OF [public..mr15];

  MemChunkPtr   = POINTER TO MemChunk;
  MemChunk      = RECORD                                | 8 Bytes
		    next  : MemChunkPtr;
		    bytes : LONGCARD
		  END;

  MemHeaderPtr  = POINTER TO MemHeader;
  MemHeader     = RECORD OF Node                        | 32 Bytes
		    attributes : MemTypeSet;
		    first      : MemChunkPtr;
		    lower      : ANYPTR;
		    upper      : ANYPTR;
		    free       : LONGCARD
		  END;

  MemEntryPtr   = POINTER TO MemEntry;
  MemEntry      = RECORD                                | 8 Bytes
		    IF KEY :INTEGER
		      OF 1 THEN reqs : MemReqSet
		      OF 2 THEN addr : ANYPTR
		    END;
		    length : LONGCARD;
		  END;

  MemListPtr    = POINTER TO MemList;
  MemList       = RECORD OF Node           | 16+me'RANGE*8 Bytes
		    numEntries : CARDINAL;
		    me         : ARRAY [1000] OF MemEntry;
		  END;


LIBRARY ExecBase BY -204
  PROCEDURE AllocAbs( byteSize IN D0 : LONGINT;
		      location IN A1 : ANYPTR ): ANYPTR;

LIBRARY ExecBase BY -186
  PROCEDURE Allocate( freeList IN A0 : MemHeaderPtr;
		      byteSize IN D0 : LONGCARD ): ANYPTR;

LIBRARY ExecBase BY -222
  PROCEDURE AllocEntry( memList IN A0 : MemListPtr ): MemListPtr;

LIBRARY ExecBase BY -198
  PROCEDURE AllocMem( byteSize     IN D0 : LONGCARD; | WARNING: used to be
						     | LONGINT
		      requirements IN D1 : MemReqSet ): ANYPTR;

| no doc available, prototype from fd file and thin air (V37).
LIBRARY ExecBase BY -708
  PROCEDURE AllocPooled( memSize    IN D0 : LONGCARD;
			 poolHeader IN A0 : ANYPTR ): ANYPTR;

| allocate memory and keep track of the size  (V36)
| like AllocMem, but remembers the size. FREE WITH FreeVec !!!
LIBRARY ExecBase BY -684
  PROCEDURE AllocVec( byteSize     IN D0 : LONGCARD;
		      requirements IN D1 : MemReqSet ): ANYPTR;

LIBRARY ExecBase BY -216
  PROCEDURE AvailMem( requirements IN D1 : MemReqSet ): LONGCARD;

| no doc available, prototype from fd file and thin air (V37).
LIBRARY ExecBase BY -696
  PROCEDURE CreatePrivatePool( requirements IN D0 : MemReqSet; | this is
							       | a guess
			       puddleSize   IN D1,
			       puddleThresh IN D2 : LONGCARD ): ANYPTR;

LIBRARY ExecBase BY -192
  PROCEDURE Deallocate( freeList    IN A0 : MemHeaderPtr;
			memoryBlock IN A1 : ANYPTR;
			byteSize    IN D0 : LONGCARD );

| no doc available, prototype from fd file and thin air (V37).
LIBRARY ExecBase BY -702
  PROCEDURE DeletePrivatePool( poolHeader IN A0 : ANYPTR );

LIBRARY ExecBase BY -228
  PROCEDURE FreeEntry( memList IN A0 : MemListPtr );

LIBRARY ExecBase BY -210
  PROCEDURE FreeMem( memoryBlock IN A1 : ANYPTR;
		     byteSize    IN D0 : LONGCARD );

| no doc available, prototype from fd file and thin air (V37).
LIBRARY ExecBase BY -714
  PROCEDURE FreePooled( memory IN A1, poolHeader IN A0 : ANYPTR ) : ANYPTR;

| return AllocVec() memory to the system  (V36)
LIBRARY ExecBase BY -690
  PROCEDURE FreeVec( memoryBlock IN A1: ANYPTR );

LIBRARY ExecBase BY -534
  PROCEDURE TypeOfMem( address IN A0 : ANYPTR ): MemReqSet;


GROUP

  | New for V36 are AllocPooled, AllocVec, CreatePrivatePool,
  | DeletePrivatePool, FreePooled, FreeVec.
  MemGrp  =
	  (* I *)   NodeGrp,
	  (* T *) MemChunk,           MemChunkPtr,        MemEntry,
		  MemEntryPtr,        MemHeader,          MemHeaderPtr,
		  MemList,            MemListPtr,         MemReqs,
		  MemReqSet,          MemTypeSet,
	  (* P *) AllocAbs,           Allocate,           AllocEntry,
		  AllocMem,           AllocPooled,        AllocVec,
		  AvailMem,           CreatePrivatePool,  Deallocate,
		  DeletePrivatePool,  FreeEntry,          FreeMem,
		  FreePooled,         FreeVec,            TypeOfMem;



|-------------------------------------------------------------------------
| tasks
|-------------------------------------------------------------------------

TYPE

  | etask is new for V36
  TaskFlags     = ( procTime,   tf1,        tf2,        etask,
		    stackChk,   exception,  switch,     launch );
  TaskFlagSet   = SET OF TaskFlags;

  TaskState     = ( inval, added, run, ready, wait, except, removed );

  | Signals 0-15 are preallocated, but only some have official names. The
  | highest 16 signals (upto max) are there for the task's use. Please do
  | allocate them before using them
  |
  TaskSignals   = ( noSignal  = -1,
		    anySignal = -1,
		    abort,        child,        ts2,          ts3,
		    blit,         single=4,     intuition,    ts6,
		    ts7,          dos,          ts9,          ts10,
		    ts11,         ctrlC,        ctrlD,        ctrlE,
		    ctrlF,        user16,       user17,       user18,
                    user19,       user20,       user21,       user22,
		    user24,       user25,       user26,       user27,
		    user28,       user29,       user30,       user31 );
  TaskSigSet    = SET OF TaskSignals;

  | Procedures registered as exceptCode get called like this. 'data' is
  | the exceptData field from the Task RECORD. 'signals' is the set of
  | exceptions, that occured. The result value of an ExceptPROC is put
  | into sigExcept, thus setting the signals which can cause a soft
  | exception from then on. The Cluster runtimesystem has an
  | exceptionhandling routine of its own, so be careful to use this
  | possibilty on your own.
  |
  ExceptPROC    = PROCEDURE( signals IN D0 : TaskSigSet;
			     data    IN A1 : ANYPTR ) : TaskSigSet;

  TaskPtr       = POINTER TO Task;
  Task          = RECORD OF Node                        | 92 Bytes
		    flags     : TaskFlagSet;
		    state     : TaskState;
		    idNestCnt,
		    tdNestCnt : SHORTINT;  | WARNING: used to be SHORTCARD
		    sigAlloc,
		    sigWait,
		    sigRecvd,
		    sigExcept : TaskSigSet;
		    trapAlloc,
		    trapAble  : BITSET;
		    exceptData: ANYPTR;
		    exceptCode: ExceptPROC;
		    trapData  : ANYPTR;
		    trapCode  : PROC;
		    spReg,
		    spLower,
		    spUpper   : ANYPTR;
		    switch,
		    launch    : PROC;
		    memEntry  : List;
		    userData  : ANYPTR;
		  END;

CONST

  | WARNING: Sig* are now real signals, not the Bit numbers.
  SigAbort    = TaskSigSet:{ abort };
  SigChild    = TaskSigSet:{ child };
  SigBlit     = TaskSigSet:{ blit };      | same as single
  SigSingle   = TaskSigSet:{ single };    | same as blit
  SigDos      = TaskSigSet:{ dos };       | used for Dos calls
  SigCtrlC    = TaskSigSet:{ ctrlC };
  SigCtrlD    = TaskSigSet:{ ctrlD };
  SigCtrlE    = TaskSigSet:{ ctrlE };
  SigCtrlF    = TaskSigSet:{ ctrlF };


LIBRARY ExecBase BY -282
  PROCEDURE AddTask( task      IN A1 : TaskPtr;
		     initialPC IN A2 : ANYPTR;
		     finalPC   IN A3 : ANYPTR ): TaskPtr;

LIBRARY ExecBase BY -288
  PROCEDURE RemTask( task IN A1 : TaskPtr );

LIBRARY ExecBase BY -294
  PROCEDURE FindTask( name IN A1 : SysStringPtr ): TaskPtr;

LIBRARY ExecBase BY -300
  PROCEDURE SetTaskPri( task IN A1 : TaskPtr;
			pri  IN D0 : NodePri ): NodePri;

| CreateTask and DeleteTask are in T_Exec

GROUP

  TaskGrp =
	  (* I *) ListGrp,            PROC,
	  (* T *) ExceptPROC,         Task,               TaskFlags,
		  TaskFlagSet,        TaskPtr,            TaskSignals,
		  TaskSigSet,         TaskState,
	  (* C *) SigAbort,           SigBlit,            SigChild,
		  SigDos,             SigSingle,          SigCtrlC,
		  SigCtrlD,           SigCtrlE,           SigCtrlF,
	  (* P *) AddTask,            FindTask,           RemTask,
		  SetTaskPri;



|-------------------------------------------------------------------------
| ports
|-------------------------------------------------------------------------

TYPE

  MsgPortAction = ( signal, softInt, ignore );

  MsgPortPtr    = POINTER TO MsgPort;
  MsgPort       = RECORD OF Node
		    IF KEY flags : MsgPortAction
		      OF signal  THEN sigBit  : TaskSignals;
				      sigTask : TaskPtr
		      OF softInt THEN softInt : InterruptPtr
		    END;
		    msgList : List;
		  END;

  MessagePtr    = POINTER TO Message;
  Message       = RECORD OF Node
		    replyPort : MsgPortPtr;
		    msgSize   : CARDINAL;    | include Message'SIZE !!!
		  END;


LIBRARY ExecBase BY -354
  PROCEDURE AddPort( port IN A1 : MsgPortPtr );

| Allocate and initialize a new message port  (V36)
| Alloc a signal, clear msgList and set port to signal the calling task.
| To make public, set name and pri, AddPort, use, RemPort and DeleteMsgPort.
| YOU *MUST* USE DeleteMsgPort TO DELETE PORTS CREATED WITH CreateMsgPort!
LIBRARY ExecBase BY -666
  PROCEDURE CreateMsgPort(): MsgPortPtr;

| Free a message port created by CreateMsgPort  (V36)
| port may be NIL. msgList MUST already be empty.
LIBRARY ExecBase BY -672
  PROCEDURE DeleteMsgPort( port IN A0 : MsgPortPtr );

LIBRARY ExecBase BY -390
  PROCEDURE FindPort( REF name IN A1 : STRING ): MsgPortPtr;

LIBRARY ExecBase BY -372
  PROCEDURE GetMsg( port IN A0 : MsgPortPtr ): MessagePtr;

LIBRARY ExecBase BY -366
  PROCEDURE PutMsg( port IN A0 : MsgPortPtr;
		    msg  IN A1 : MessagePtr );

LIBRARY ExecBase BY -360
  PROCEDURE RemPort( port IN A1 : MsgPortPtr );

LIBRARY ExecBase BY -378
  PROCEDURE ReplyMsg( msg IN A1 : MessagePtr );

LIBRARY ExecBase BY -384
  PROCEDURE WaitPort( port IN A0 : MsgPortPtr ): MessagePtr;

GROUP

  MsgPortGrp =
  (* I *)   TaskGrp,
  (* T *)   Message,        MessagePtr,     MsgPort,        MsgPortAction,
	    MsgPortPtr,
  (* P *)   AddPort,        CreateMsgPort,  DeleteMsgPort,  FindPort,
	    GetMsg,         PutMsg,         RemPort,
	    ReplyMsg,       WaitPort;


|-------------------------------------------------------------------------
| libraries
|-------------------------------------------------------------------------

CONST

  vectSize      = 6;
  reserved      = 4;
  base          = -vectSize;
  userDef       = base-reserved*vectSize;
  nonStd        = userDef;

  extFunc       = -24;  | user functions begin here
  expunge       = -18;
  close         = -12;
  open          = -6;

TYPE

  LibFlags      = ( summing,  | currently being checksummed
		    changed,  | has just been changed
		    sumUsed,  | should be summed
		    delExp ); | delayed expunge
  LibFlagSet    = SET OF LibFlags;

  LibraryPtr    = POINTER TO Library;
  Library       = RECORD OF Node                  | 34 Bytes
		    flags    : LibFlagSet;
		    libPad   : SHORTCARD;   | WARNING: was missing here
		    negSize,
		    posSize,
		    version,
		    revision : CARDINAL;
		    idString : SysStringPtr;
		    sum      : LONGCARD;
		    openCnt  : CARDINAL;
		  END;                   | Warning: not a longword multiple

  LibInitProc   = PROCEDURE ( lib     IN D0 : LibraryPtr;
			      segList IN A0 : BPTR;
			      exec    IN A6 : ExecBasePtr ): LibraryPtr;

  FuncArrayPtr  = POINTER TO ARRAY OF PROC;

LIBRARY ExecBase BY -396
  PROCEDURE AddLibrary( library IN A1 : LibraryPtr );

LIBRARY ExecBase BY -414
  PROCEDURE CloseLibrary( library IN A1 : LibraryPtr );

LIBRARY ExecBase BY -90
  PROCEDURE MakeFunctions( target        IN A0 : ANYPTR;
			   functArray    IN A1 : ANYPTR;
			   functDispBase IN A2 : ANYPTR );

LIBRARY ExecBase BY -84
  PROCEDURE MakeLibrary( vectors   IN A0 : FuncArrayPtr;
			 structure IN A1 : ANYPTR;
			 init      IN A2 : LibInitProc;
			 dataSize  IN D0 : LONGCARD;
			 segList   IN D1 : BPTR ): LibraryPtr;

LIBRARY ExecBase BY -408
  PROCEDURE OldOpenLibrary( REF name IN A1 : STRING ): LibraryPtr;

LIBRARY ExecBase BY -552
  PROCEDURE OpenLibrary( REF name    IN A1 : STRING;
			     version IN D0 : LONGINT ): LibraryPtr;

LIBRARY ExecBase BY -402
  PROCEDURE RemLibrary( library IN A1 : LibraryPtr );

LIBRARY ExecBase BY -420
  PROCEDURE SetFunction( library    IN A1 : LibraryPtr;
			 funcOffset IN A0 : INTEGER;
			 funcEntry  IN D0 : ANYPTR   ): ANYPTR;

| no doc available, prototype from fd file and thin air.
LIBRARY ExecBase BY -720
  PROCEDURE SetFunction8( funcOffset  IN D0 : LONGCARD;
			  newFunction IN D1 : ANYPTR;
			  array       IN A0 : ANYPTR;
			  library     IN A1 : LibraryPtr ): ANYPTR;

LIBRARY ExecBase BY -426
  PROCEDURE SumLibrary( library IN A1 : LibraryPtr );

GROUP

  | New for V36 is SetFunction8.
  LibGrp  =
  (* I *)   BPTR,           NodeGrp,
  (* T *)   FuncArrayPtr,   LibInitProc,    Library,        LibraryPtr,
  (* C *)   base,           close,          expunge,        extFunc,
	    nonStd,         open,           reserved,       userDef,
	    vectSize,
  (* P *)   AddLibrary,     CloseLibrary,   MakeFunctions,  MakeLibrary,
	    OldOpenLibrary, OpenLibrary,    RemLibrary,     SetFunction,
	    SetFunction8,   SumLibrary;



|-------------------------------------------------------------------------
| devices
|-------------------------------------------------------------------------

TYPE

  DevicePtr     = POINTER TO Device;
  Device        = RECORD OF Library END;

  UnitFlags     = ( active, inTask );
  UnitFlagSet   = SET OF UnitFlags;

  UnitPtr       = POINTER TO Unit;
  Unit          = RECORD OF MsgPort;
		    flags    : UnitFlagSet;
		    unit_Pad : SHORTCARD;     | WARNING: added
		    openCnt  : CARDINAL
		  END;

|-------------------------------------------------------------------------
| + io
|-------------------------------------------------------------------------

TYPE

  IOFlags       = ( IOquick, IO1, IO2, IO3, IO4, IO5, IO6, IO7 );
  IOFlagSet     = SET OF IOFlags;

  | CARDINAL values for I/O command
  IOCommand   = ( invalid,            reset,              read,
		  write,              update,             clear,
		  stop,               start,              flush,
		  nonstd,             makemecard = $7FFF );

  | SHORTCARD return values for device IO functions and the error field
  IOReturn    = ( badLength = $FC,
		  noCmd     = $FD,
		  aborted   = $FE,
		  openFail  = $FF,
		  ioOk      = 0);

CONST

  | used more easily to extend IOCommand
  nonstdVAL    = CARDINAL( nonstd );

  | offsets into device structures
  abortIO       = -36;
  beginIO       = -30;

  quick         = IOFlagSet:{ IOquick };


TYPE

  IORequestPtr  = POINTER TO IORequest;
  IORequest     = RECORD OF Message
		    device  : DevicePtr;
		    unit    : UnitPtr;
		    command : IOCommand;     | CARDINAL
		    flags   : IOFlagSet;
		    error   : IOReturn;      | SHORTCARD
		  END;

  IOStdReqPtr   = POINTER TO IOStdReq;
  IOStdReq      = RECORD OF IORequest
		    actual,
		    length  : LONGCARD;
		    data    : ANYPTR;
		    offset  : LONGCARD;
		  END;

| devices

LIBRARY ExecBase BY -432
  PROCEDURE AddDevice( device IN A1 : DevicePtr );

LIBRARY ExecBase BY -450
  PROCEDURE CloseDevice( ioRequest IN A1 : IORequestPtr );

| create an IORequest structure  (V36)
| Allocates memory for and initializes a new IO request block.
| size must be at least Message'SIZE
| port may be the non-NIL return value of CreateMsgPort.
| returns a pointer to the new IORequest block, or NIL.
LIBRARY ExecBase BY -654
  PROCEDURE CreateIORequest( port IN A0 : MsgPortPtr;
			     size IN D0 : LONGCARD ): IORequestPtr;

| DeleteIORequest() - Free a request made by CreateIORequest()  (V36)
LIBRARY ExecBase BY -660
  PROCEDURE DeleteIORequest( iorequest IN A0 : IORequestPtr );

|   OpenDevice
|
| returns a sign extended copy of ioRequest.error.
LIBRARY ExecBase BY -444
  PROCEDURE OpenDevice( REF devName   IN A0 : STRING;
			    unit      IN D0 : LONGCARD;
			    ioRequest IN A1 : IORequestPtr;
			    flags     IN D1 : LONGSET ): IOReturn;

LIBRARY ExecBase BY -438
  PROCEDURE RemDevice( device IN A1 : DevicePtr );

|
|  I/O Functions
|
| !! NOTE !! LONGINT return values are the sign extended version of
| ioRequest.error !
|

LIBRARY ExecBase BY -480
  PROCEDURE AbortIO( ioRequest IN A1 : IORequestPtr );

LIBRARY ExecBase BY -468
  PROCEDURE CheckIO( ioRequest IN A1 : IORequestPtr ): IORequestPtr;

LIBRARY ExecBase BY -456
  PROCEDURE DoIO( ioRequest IN A1 : IORequestPtr ): IOReturn;

LIBRARY ExecBase BY -462
  PROCEDURE SendIO( ioRequest IN A1 : IORequestPtr );

LIBRARY ExecBase BY -474
  PROCEDURE WaitIO( ioRequest IN A1 : IORequestPtr ): IOReturn;

GROUP

  | new for V36 are CreateIORequest and DeleteIORequest.
  DeviceIOGrp =
  (* I *)       LibGrp,           MsgPortGrp,
  (* T *)       Device,           DevicePtr,        IOFlagSet,
		IORequest,        IORequestPtr,     IOStdReq,
		IOStdReqPtr,      Unit,             UnitFlags,
		UnitFlagSet,      UnitPtr,
  (* C *)       abortIO,          beginIO,          nonStd,
		nonstdVAL,        quick,
  (* P *)       AbortIO,          AddDevice,        CheckIO,
		CloseDevice,      CreateIORequest,  DeleteIORequest,
		DoIO,             OpenDevice,       RemDevice,
		SendIO,           WaitIO;



|-------------------------------------------------------------------------
| semaphores
|-------------------------------------------------------------------------

TYPE

  SemaphoreRequestPtr = POINTER TO SemaphoreRequest;
  SemaphoreRequest    = RECORD OF MinNode
			  waiter : TaskPtr;
			END;

  SignalSemaphorePtr  = POINTER TO SignalSemaphore;
  SignalSemaphore     = RECORD OF Node
			  nestCount    : INTEGER;
			  waitQueue    : MinList;
			  multipleLink : SemaphoreRequest;
			  owner        : TaskPtr;
			  queueCount   : INTEGER;
			END;

  SemaphorePtr        = POINTER TO Semaphore;
  Semaphore           = RECORD OF MsgPort
			  bids : INTEGER
			END;

LIBRARY ExecBase BY -600
  PROCEDURE AddSemaphore( sigSema IN A1 : SignalSemaphorePtr );

LIBRARY ExecBase BY -576
  PROCEDURE AttemptSemaphore(sigSema IN A0 : SignalSemaphorePtr):BOOLEAN;

LIBRARY ExecBase BY -594
  PROCEDURE FindSemaphore( name IN A1 : SysStringPtr ): SignalSemaphore;

LIBRARY ExecBase BY -558
  PROCEDURE InitSemaphore( sigSema IN A0 : SignalSemaphorePtr );

LIBRARY ExecBase BY -564
  PROCEDURE ObtainSemaphore( sigSema IN A0 : SignalSemaphorePtr );

LIBRARY ExecBase BY -582
  PROCEDURE ObtainSemaphoreList( list IN A0 : ListPtr );

| gain shared access to a semaphore (V36)
| works like you would expect even on older SignalSemaphores
LIBRARY ExecBase BY -678
  PROCEDURE ObtainSemaphoreShared( sigSema IN A0 : SignalSemaphorePtr );

LIBRARY ExecBase BY -540
  PROCEDURE Procure( sema   IN A0 : SemaphorePtr;
		     bidMsg IN A1 : MessagePtr ): BOOLEAN;

LIBRARY ExecBase BY -570
  PROCEDURE ReleaseSemaphore( sigSema IN A0 : SignalSemaphorePtr );

LIBRARY ExecBase BY -588
  PROCEDURE ReleaseSemaphoreList( list IN A0 : ListPtr );

LIBRARY ExecBase BY -606
  PROCEDURE RemSemaphore( sigSema IN A1 : SignalSemaphorePtr );

LIBRARY ExecBase BY -546
  PROCEDURE Vacate( sema IN A0 : SemaphorePtr );

GROUP

  | New for V36 is ObtainSemaphoreShared.
  SemaphoreGrp  =
  (* I *)         MsgPortGrp,
  (* T *)         Semaphore,              SemaphorePtr,
		  SemaphoreRequest,       SemaphoreRequestPtr,
		  SignalSemaphore,        SignalSemaphorePtr,
  (* P *)         AddSemaphore,           AttemptSemaphore,
		  FindSemaphore,          InitSemaphore,
		  ObtainSemaphore,        ObtainSemaphoreList,
		  ObtainSemaphoreShared,  Procure,
		  ReleaseSemaphore,       ReleaseSemaphoreList,
		  RemSemaphore,           Vacate;



|-------------------------------------------------------------------------
| resident
|-------------------------------------------------------------------------

TYPE

  | singleTask and afterDos are new for V36
  ResidentFlags   = ( coldStart,  singleTask, afterDos,   rf3,
		      rf4,        rf5,        rf6,        autoinit );
  ResidentFlagSet = SET OF ResidentFlags;

  ResidentPri     = NodePri;

  ResidentPtr     = POINTER TO Resident;
  Resident        = RECORD                              | 26 Bytes
		      matchWord : CARDINAL;
		      matchTag  : ResidentPtr;
		      endSkip   : ANYPTR;
		      flags     : ResidentFlagSet;
		      version   : SHORTCARD;
		      type      : NodeType;
		      priority  : ResidentPri;
		      name      : SysStringPtr;
		      idString  : SysStringPtr;
		      init      : ANYPTR
		    END;

CONST
  matchWord       = $4AFC;  | = the 68000 "ILLEGAL" instruction

LIBRARY ExecBase BY -96
  PROCEDURE FindResident( name IN A1 : SysStringPtr ): ResidentPtr;

LIBRARY ExecBase BY -72
  PROCEDURE InitCode( startClass IN D0 : ResidentFlagSet;
		      version    IN D1 : LONGINT );

LIBRARY ExecBase BY -102
  PROCEDURE InitResident( resident IN A1 : ResidentPtr;
			  segList  IN D1 : BPTR );

GROUP

  ResidentGrp =
  (* I *)       BPTR,             NodeGrp,
  (* T *)       Resident,         ResidentFlags,
		ResidentFlagSet,  ResidentPtr,
  (* C *)       matchWord,
  (* P *)       FindResident,     InitCode,         InitResident;



|-------------------------------------------------------------------------
| execbase
|-------------------------------------------------------------------------

TYPE
  AttnFlags     = ( m68010, m68020, m68030, m68040, m68881,
		    m68882, af6,    af7,    af8,    af9 );
  AttnFlagSet   = SET OF AttnFlags; | 2 Bytes

TYPE
  ExecBaseType  = RECORD OF Library
		    softVer               : CARDINAL;
		    lowMemChkSum          : INTEGER;
		    chkBase               : LONGCARD;

		    | A nice hidingplace for the classic virussians.
		    coldCapture,
		    coolCapture,
		    warmCapture           : PROC;
		    sysStkUpper,
		    sysStkLower           : ANYPTR;
		    maxLocMem             : LONGCARD;

		    | Debug() address.
		    debugEntry            : PROC;
		    debugData,
		    alertData             : ANYPTR;
		    maxExtMem             : ANYPTR;
		    chkSum                : CARDINAL;

		    | Interface to these with the AddIntServer Function
		    intVects              : ARRAY IntFlags OF IntVector;

		    | "There can be only one" on single CPU machines ...
		    thisTask              : TaskPtr;

		    | All the statistics you get from Exec.
		    idleCount,
		    dispCount             : LONGCARD;
		    quantum,
		    elapsed               : CARDINAL;
		    sysFlags              : CARDINAL;

		    | Interrupt disable nest count
		    idNestCnt,

		    | Task disable nest count
		    tdNestCnt             : SHORTCARD;

		    | Attention flags
		    attnFlags             : AttnFlagSet;

		    | Rescheduling attention
		    attnResched           : CARDINAL;

		    | resident module array pointer
		    resModules            : ANYPTR;

		    | task administration
		    taskTrapCode,
		    taskExceptCode,
		    taskExitCode          : PROC;
		    taskSigAlloc          : LONGSET;
		    taskTrapAlloc         : BITSET;

		    | The most often read systemlists (read only in
		    | Disable()ed code.
		    memList,
		    resourceList,
		    deviceList,
		    intrList,
		    libList,
		    portList,
		    taskReady,
		    taskWait              : List;

		    | the list of pending software interrupts. They have
		    | the priorities of -32, -16, 0, 16 and 32.
		    softInts              : ARRAY [0..4] OF SoftIntList;
		    lastAlert             : ARRAY [0..3] OF LONGINT;

		    | the next two should usualy contain 50 or 60
		    vBlankFrequency       : SHORTCARD;
		    powerSupplyFrequency  : SHORTCARD;
		    semaphoreList         : List;
		    kickMemPtr,
		    kickTagPtr            : ANYPTR;
		    kickCheckSum          : LONGCARD;
| >= V36
		    exPad0                : CARDINAL;
		    exReserved0           : LONGCARD;
		    RamLibPrivate         : ANYPTR;
		    eClockFrequency,                  | readable
		    cacheControl,                     | private
		    taskID,
		    puddleSize,
		    poolThreshold         : LONGCARD;
		    publicPool            : MinList;
		    mmuLock               : ANYPTR;
		    exReserved1           : ARRAY[ 0..11 ] OF SHORTCARD;

| <V36              execBaseReserved,
| <V36              execbaseNewReserved   : ARRAY [0..9] OF SHORTCARD;
		  END;

GROUP

  ExecBaseGrp =
  (* I *)       IntGrp,       LibGrp,       TaskGrp,      BITSET,
  (* T *)       AttnFlags,    AttnFlagSet,  ExecBase,     ExecBasePtr,
		ExecBaseType;



|-------------------------------------------------------------------------
| special
|-------------------------------------------------------------------------

TYPE

  PutChProc    = PROCEDURE( ch IN D0 : CHAR; data IN A3 : ANYPTR );

  | new for V37
  StackSwapStructPtr = POINTER TO StackSwapStruct;
  StackSwapStruct    = RECORD
			 lower,            | new lower bound
			 upper,            | new upper bound
			 pointer : ANYPTR; | stack pointer at switch point
		       END;


LIBRARY ExecBase BY -108
  PROCEDURE Alert( alertNum IN D7  : LONGINT );
| WARNING: used to be parameter 2 :'Params   IN A5 : ANYPTR'

| try to reboot the Amiga (V36)
LIBRARY ExecBase BY -726
  PROCEDURE ColdReboot();

LIBRARY ExecBase BY -114
  PROCEDURE Debug();

LIBRARY ExecBase BY -528
  PROCEDURE GetCC(): BITSET;

LIBRARY ExecBase BY -78
  PROCEDURE InitStruct( initTable IN A1  : ANYPTR;
			memory    IN A2 : ANYPTR;
			size      IN D0  : LONGCARD );

LIBRARY ExecBase BY -522
  PROCEDURE RawDoFmt( formatString IN A0 : SysStringPtr;
		      dataStream   IN A1 : ANYPTR;
		      putChProc    IN A2 : PutChProc;
		      putChData    IN A3 : ANYPTR );

| new for V37 and 1:10
LIBRARY ExecBase BY -732
  PROCEDURE StackSwap( newStack IN A0 : StackSwapStructPtr ): ANYPTR;

GROUP

  | New for V36/V37 are ColdReboot and StackSwap.
  SpecialGrp  =
  (* T *)       PutChProc,
  (* P *)       Alert,              ColdReboot,         Debug,
		GetCC,              InitStruct,         RawDoFmt,
		StackSwap,          StackSwapStruct,    StackSwapStructPtr;



|-------------------------------------------------------------------------
| signals
|-------------------------------------------------------------------------

LIBRARY ExecBase BY -330
  PROCEDURE AllocSignal( sigNum IN D0 : TaskSignals ): TaskSignals;

LIBRARY ExecBase BY -336
  PROCEDURE FreeSignal( sigNum IN D0 : TaskSignals );

LIBRARY ExecBase BY -312
  PROCEDURE SetExcept( newSigs IN D0,
		       sigMask IN D1 : TaskSigSet ): TaskSigSet;

LIBRARY ExecBase BY -306
  PROCEDURE SetSignal( newSigs IN D0,
		       sigMask IN D1 : TaskSigSet ): TaskSigSet;

LIBRARY ExecBase BY -324
  PROCEDURE Signal( task    IN A1 : TaskPtr;
		    signal  IN D0 : TaskSigSet );

LIBRARY ExecBase BY -318
  PROCEDURE Wait( signals IN D0 : TaskSigSet ): TaskSigSet;


GROUP

  SignalGrp     =
	  (* I *) TaskGrp,
	  (* P *) AllocSignal,        FreeSignal,         SetExcept,
		  SetSignal,          Signal,             Wait;



|-------------------------------------------------------------------------
|      traps
|-------------------------------------------------------------------------

|
| The Cluster runtime system uses several traps and has a traphandler. Thus,
| TRAPs are off limits for Cluster programs. You can, of course, use TRAPs
| in your own exec tasks.
|


LIBRARY ExecBase BY -342
  PROCEDURE AllocTrap( trapNum IN D0 : LONGINT ): LONGINT;

LIBRARY ExecBase BY -348
  PROCEDURE FreeTrap( trapNum IN D0 : LONGINT );

GROUP

  TrapGrp       =
	    (*P*) AllocTrap,          FreeTrap;



|-------------------------------------------------------------------------
| resources
|-------------------------------------------------------------------------

TYPE

  ResourcePtr = POINTER TO Resource;
  Resource    = RECORD OF Library END;

LIBRARY ExecBase BY -486
  PROCEDURE AddResource( resource IN A1 : ResourcePtr );

LIBRARY ExecBase BY -492
  PROCEDURE RemResource( resource IN A1 : ResourcePtr );

| WARNING: 2nd parameter "Version IN D0 : LONGCARD" removed, as it does not
| occur in the autodocs.
LIBRARY ExecBase BY -498
  PROCEDURE OpenResource( REF name IN A1 : STRING;
			      vers IN D0 : LONGCARD ): ResourcePtr;

GROUP

  ResourceGrp =
  (* I *)       LibGrp,
  (* T *)       Resource,             ResourcePtr,
  (* P *)       AddResource,          RemResource,        OpenResource;



|-------------------------------------------------------------------------
| kickstart
|-------------------------------------------------------------------------

LIBRARY ExecBase BY -612
  PROCEDURE SumKickData;

LIBRARY ExecBase BY -618
  PROCEDURE AddMemList(    size       IN D0 : LONGINT;
			   attributes IN D1 : MemReqSet;
			   priority   IN D2 : NodePri;
			   base       IN A0 : ANYPTR;
		       REF name       IN A1 : STRING ): LONGINT;

LIBRARY ExecBase BY -624
  PROCEDURE CopyMem( source IN A0,
		     dest   IN A1  : ANYPTR;
		     size   IN D0  : LONGCARD );

| highest offset for <V36
LIBRARY ExecBase BY -630
  PROCEDURE CopyMemQuick( source IN A0,
			  dest   IN A1  : ANYPTR;
			  size   IN D0  : LONGCARD );

GROUP

  KickGrp       =
	    (*P*) SumKickData,        AddMemList,         CopyMem,
		  CopyMemQuick;



|-------------------------------------------------------------------------
| private Exec functions. Only in PrivateGrp, not in All.
|-------------------------------------------------------------------------

|
| though ExecBase.negSize is 810, the newest functions have not been
| documented at all yet. Please write a thank-you letter to CBM in
| WestChester. You should only use other private functions if you really
| know what to do with them and are writing really low level code.
|

LIBRARY ExecBase BY -60
  PROCEDURE Dispatch();

LIBRARY ExecBase BY -66
  PROCEDURE Exception();

| no docs available
LIBRARY ExecBase BY -774
  PROCEDURE ExecReserved00( nothing IN D0 : ANYPTR );

| no docs available
LIBRARY ExecBase BY -780
  PROCEDURE ExecReserved01( nothing IN D0 : ANYPTR );

| no docs available
LIBRARY ExecBase BY -786
  PROCEDURE ExecReserved02( nothing IN D0 : ANYPTR );

| no docs available
LIBRARY ExecBase BY -792
  PROCEDURE ExecReserved03( nothing IN D0 : ANYPTR );

LIBRARY ExecBase BY -36
  PROCEDURE ExitIntr();

LIBRARY ExecBase BY -504
  PROCEDURE RawIOInit;

LIBRARY ExecBase BY -510
  PROCEDURE RawMayGetChar(): CHAR;

LIBRARY ExecBase BY -516
  PROCEDURE RawPutChar( ch IN D0 : CHAR );

LIBRARY ExecBase BY -48
  PROCEDURE Reschedule();

LIBRARY ExecBase BY -42
  PROCEDURE Schedule();

LIBRARY ExecBase BY -54
  PROCEDURE Switch();


GROUP

  | ExecReserved?? are new for V36
  PrivateGrp    =
	    (*P*) Dispatch,           Exception,          ExecReserved00,
		  ExecReserved01,     ExecReserved02,     ExecReserved03,
		  ExitIntr,           RawIOInit,          RawMayGetChar,
		  RawPutChar,         Reschedule,         Schedule,
		  Switch;



|-------------------------------------------------------------------------
| caches
|-------------------------------------------------------------------------

TYPE

  Caches    = ( enableI,       | Enable instruction cache
		freezeI,       | Freeze instruction cache
		cacr2,
		clearI,        | Clear instruction cache
		ibe,           | Instruction burst enable
		cacr5, cacr6,
		cacr7,
		enableD,       | 68030 Enable data cache
		freezeD,       | 68030 Freeze data cache
		cacr10,
		clearD,        | 68030 Clear data cache
		dbe,           | 68030 Data burst enable
		writeAllocate, | 68030 Write-Allocate mode
			       | (must always be set!)
		cacr14,
		cacr15, cacr16, cacr17, cacr18, cacr19,
		cacr20, cacr21, cacr22, cacr23, cacr24,
		cacr25, cacr26, cacr27, cacr28, cacr29,
		cacr30,
		copyBack       | Master enable for copyback caches
	      );
  CacheSet  = SET OF Caches;

  CacheDMAFlags = ( continue=1,   | continue a broken up request (Pre)
		    noModify );   | dma didn't modify memory     (Post)
  CacheDMAFlagSet = SET OF CacheDMAFlags;

| User callable simple cache clearing (V37)
| Flush out the contents of any CPU instruction or data caches.
LIBRARY ExecBase BY -636
  PROCEDURE CacheClearU();

| Cache clearing with extended control (V37)
| WARNING: Cluster still uses the wrong LONGACARD'MAX=2^31-1. Should be
| 2^32-1. length = LONGCARD'MAX (= CAST(LONGCARD,-1)) means clear all
| addresses clearCaches must be IN {clearI,clearD}
LIBRARY ExecBase BY -642
  PROCEDURE CacheClearE( address     IN A0 : ANYPTR;
			 length      IN D0 : LONGCARD;
			 clearCaches IN D1 : CacheSet );

| Instruction & data cache control (V37?)
| Set global cachebits in mask to the values in bits and return old values.
LIBRARY ExecBase BY -648
  PROCEDURE CacheControl( bits IN D0, mask IN D1 : CacheSet ): CacheSet;


| note that length *must* remain a valid variable upto the CachePostDMA
| call.
| WARNING: Autodocs say D0 for flags, fd file says D1...
LIBRARY ExecBase BY -762
  PROCEDURE CachePreDMA(     vaddress IN A0 : ANYPTR;    | virtual address
			 VAR length   IN A1 : LONGCARD;  | to be updated
			     flags    IN D1 : CacheDMAFlagSet; ) : ANYPTR;

| WARNING: Autodocs say D0 for flags, fd file says D1...
LIBRARY ExecBase BY -768
  PROCEDURE CachePostDMA(     vaddress IN A0 : ANYPTR;   | same as for
							 | CachePreDMA
			  VAR length   IN A1 : LONGINT;  | same as for
							 | CachePreDMA
			      flags    IN D1 : CacheDMAFlagSet; );
GROUP

  | All new for V36
  CacheGrp      =
	    (*T*) Caches,             CacheSet,           CacheDMAFlags,
		  CacheDMAFlagSet,
	    (*P*) CacheClearE,        CacheClearU,        CacheControl,
		  CachePreDMA,        CachePostDMA;



|-------------------------------------------------------------------------
| kids. The docs are not ready yet.
| The return value might not be valid.
|-------------------------------------------------------------------------

| no doc available, prototype from fd file and thin air.
LIBRARY ExecBase BY -738
  PROCEDURE ChildFree( tid IN D0 : ANYPTR ) : ANYPTR;

| no doc available, prototype from fd file and thin air.
LIBRARY ExecBase BY -744
  PROCEDURE ChildOrphan( tid IN D0 : ANYPTR ) : ANYPTR;

| no doc available, prototype from fd file and thin air.
LIBRARY ExecBase BY -750
  PROCEDURE ChildStatus( tid IN D0 : ANYPTR ) : ANYPTR;

| no doc available, prototype from fd file and thin air.
LIBRARY ExecBase BY -756
  PROCEDURE ChildWait( tid IN D0 : ANYPTR ) : ANYPTR;

GROUP

  | all new for V36
  ChildGrp      =
	    (*P*) ChildFree,          ChildOrphan,        ChildStatus,
		  ChildWait;

  | Just for compatibility at the moment.
  ExecIOGrp     = DeviceIOGrp;
  MsgGrp        = MsgPortGrp;

  | New for V36 are Cache, Child, DeviceIO, Resource and SpecialGrp.
  | Groups not included are Const, Private, Func, Ptr and Record.
  All           =
	    (*I*) CacheGrp,           ChildGrp,           DeviceIOGrp,
		  ExecBaseGrp,
  | compat
		  ExecIOGrp,          MsgGrp,

		  IntGrp,             KickGrp,            LibGrp,
		  ListGrp,            MemGrp,             MsgPortGrp,
		  NodeGrp,
  | old           oldMsgPortGrp,
		  ResidentGrp,        ResourceGrp,        SemaphoreGrp,
		  SignalGrp,          SpecialGrp,         TaskGrp,
		  TrapGrp;

  | All Functions in this module (including Cluster coded functions)
  FuncGrp   = AbortIO,                AddDevice,              AddHead,
	      AddIntServer,           AddLibrary,             AddMemList,
	      AddPort,                AddResource,            AddSemaphore,
	      AddTail,                AddTask,                Alert,
	      AllocAbs,               Allocate,               AllocEntry,
	      AllocMem,               AllocPooled,            AllocSignal,
	      AllocTrap,              AllocVec,
	      AttemptSemaphore,
	      AvailMem,               CacheClearE,            CacheClearU,
	      CacheControl,           Cause,                  CheckIO,
	      ChildFree,              ChildOrphan,            ChildStatus,
	      ChildWait,              CloseDevice,            CloseLibrary,
	      ColdReboot,             CopyMem,                CopyMemQuick,
	      CreateIORequest,        CreateMsgPort,
	      CreatePrivatePool,      Deallocate,             Debug,
	      DeleteIORequest,        DeleteMsgPort,
	      DeletePrivatePool,
	      Disable,                Dispatch,               DoIO,
	      Enable,                 Enqueue,                Exception,
	      ExitIntr,               FindName,
	      FindPort,               FindResident,           FindSemaphore,
	      FindTask,               Forbid,                 FreeEntry,
	      FreeMem,                FreePooled,             FreeSignal,
	      FreeTrap,               FreeVec,                GetCC,
	      GetMsg,                 InitCode,               InitResident,
	      InitSemaphore,          InitStruct,             Insert,
	      MakeFunctions,          MakeLibrary,            NewList,
	      ObtainSemaphore,        ObtainSemaphoreList,
	      ObtainSemaphoreShared,
	      OldOpenLibrary,         OpenDevice,             OpenLibrary,
	      OpenResource,           Permit,                 Procure,
	      PutMsg,                 RawDoFmt,               RawIOInit,
	      RawMayGetChar,          RawPutChar,
	      ReleaseSemaphore,
	      ReleaseSemaphoreList,   RemDevice,              RemHead,
	      RemIntServer,           RemLibrary,             Remove,
	      RemPort,                RemResource,            RemSemaphore,
	      RemTail,                RemTask,                ReplyMsg,
	      Reschedule,             Schedule,               SendIO,
	      SetExcept,              SetFunction,            SetFunction8,
	      SetIntVector,           SetSignal,              SetSR,
	      SetTaskPri,             Signal,                 StackSwap,
	      SumKickData,            SumLibrary,             SuperState,
	      Supervisor,             Switch,                 TypeOfMem,
	      UserState,              Vacate,                 Wait,
	      WaitIO,                 WaitPort;

  PtrGrp    = DevicePtr,              ExecBasePtr,            FuncArrayPtr,
	      InterruptPtr,           IntFuncPtr,             IntVectorPtr,
	      IORequestPtr,           IOStdReqPtr,            LibraryPtr,
	      ListPtr,                MemChunkPtr,            MemEntryPtr,
	      MemHeaderPtr,           MemListPtr,             MessagePtr,
	      MinListPtr,             MinNodePtr,             MsgPortPtr,
	      NodePtr,                ResidentPtr,            ResourcePtr,
	      SemaphorePtr,           SemaphoreRequestPtr,
	      SignalSemaphorePtr,
	      SoftIntListPtr,         TaskPtr,                UnitPtr;

  RecordGrp = Device,                 ExecBaseType,           Interrupt,
	      IntVector,              IORequest,              IOStdReq,
	      Library,                List,                   MemChunk,
	      MemEntry,               MemHeader,              MemList,
	      Message,                MinList,                MinNode,
	      MsgPort,                Node,                   Resident,
	      Resource,               Semaphore,
	      SemaphoreRequest,
	      SignalSemaphore,        SoftIntList,            Task,
	      Unit;


END Exec.


TABLE OF CONTENTS

FUNCTION              GRP               V36?

AbortIO               DeviceIO
AddDevice             DeviceIO
AddHead               List
AddIntServer          Int
AddLibrary            Lib
AddMemList            Kick
AddPort               MsgPort
AddResource           Resource
AddSemaphore          Semaphore
AddTail               List
AddTask               Task
Alert                 Special
AllocAbs              Mem
Allocate              Mem
AllocEntry            Mem
AllocMem              Mem
AllocPooled           Mem               V36
AllocSignal           Signal
AllocTrap             Trap
AllocVec              Mem               V36
AttemptSemaphore      Semaphore
AvailMem              Mem
CacheClearE           Cache             V36
CacheClearU           Cache             V36
CacheControl          Cache             V36
Cause                 Int
CheckIO               DeviceIO
ChildFree             Child             V36
ChildOrphan           Child             V36
ChildStatus           Child             V36
ChildWait             Child             V36
CloseDevice           DeviceIO
CloseLibrary          Lib
ColdReboot            Special           V36
CopyMem               Kick
CopyMemQuick          Kick
CreateIORequest       DeviceIO          V36
|CreateMsgPort         MsgPort           V36
CreatePrivatePool     Mem               V36
Deallocate            Mem
Debug                 Special
DeleteIORequest       DeviceIO          V36
|DeleteMsgPort         MsgPort           V36
DeletePrivatePool     Mem               V36
Disable               Int
Dispatch              Private
DoIO                  DeviceIO
Enable                Int
Enqueue               List
Exception             Private
ExecReserved00        Private           V36
ExecReserved01        Private           V36
ExecReserved02        Private           V36
ExecReserved03        Private           V36
ExitIntr              Private
FindName              List
FindPort              MsgPort
FindResident          Resident
FindSemaphore         Semaphore
FindTask              Task
Forbid                Int
FreeEntry             Mem
FreeMem               Mem
FreePooled            Mem               V36
FreeSignal            Signal
FreeTrap              Trap
FreeVec               Mem               V36
GetCC                 Special
GetMsg                MsgPort
InitCode              Resident
InitResident          Resident
InitSemaphore         Semaphore
InitStruct            Special
Insert                List
MakeFunctions         Lib
MakeLibrary           Lib
ObtainSemaphore       Semaphore
ObtainSemaphoreList   Semaphore
ObtainSemaphoreShared Semaphore         V36
OldOpenLibrary        Lib
OpenDevice            DeviceIO
OpenLibrary           Lib
OpenResource          Resource
Permit                Int
Procure               Semaphore
PutMsg                MsgPort
RawDoFmt              Special
RawIOInit             Private
RawMayGetChar         Private
RawPutChar            Private
ReleaseSemaphore      Semaphore
ReleaseSemaphoreList  Semaphore
RemDevice             DeviceIO
RemHead               List
RemIntServer          Int
RemLibrary            Lib
Remove                List
RemPort               MsgPort
RemResource           Resource
RemSemaphore          Semaphore
RemTail               List
RemTask               Task
ReplyMsg              MsgPort
Reschedule            Private
Schedule              Private
SendIO                DeviceIO
SetExcept             Signal
SetFunction           Lib
SetFunction8          Lib               V36
SetIntVector          Int
SetSignal             Signal
SetSR                 Int
SetTaskPri            Task
Signal                Signal
StackSwap             Special           V36
SumKickData           Kick
SumLibrary            Lib
SuperState            Int
Supervisor            Int
Switch                Private
TypeOfMem             Mem
UserState             Int
Vacate                Semaphore
Wait                  Signal
WaitIO                DeviceIO
WaitPort              MsgPort


NodeType
MemReqs
TaskFlags
TaskState
MsgPortAction
LibFlags
UnitFlags
ResidentFlags
AttnFlags
Caches

