home *** CD-ROM | disk | FTP | other *** search
- unit Exec;
-
- INTERFACE
- type
- pshortint = ^shortint;
- ppshortint = ^pshortint;
- pppshortint = ^ppshortint;
- pbyte = ^byte;
- ppbyte = ^pbyte;
- pppbyte = ^ppbyte;
- pinteger = ^integer;
- ppinteger = ^pinteger;
- pword = ^word;
- plongint = ^longint;
- pplongint = ^plongint;
- long = longint;
- plong = ^longint;
- ppointer = ^pointer;
- STRPTR = ^byte;
-
- pNode = ^tNode;
- tNode = record
- ln_Succ: pNode;
- ln_Pred: pNode;
- ln_Type: byte;
- ln_Pri: shortint;
- ln_Name: pbyte;
- end;
-
- pMsgPort = ^tMsgPort;
- pMessage = ^tMessage;
- tMessage = record
- mn_Node: tNode;
- mn_ReplyPort: pMsgPort;
- mn_Length: word;
- end;
-
- pList = ^tList;
- tList = record
- lh_Head: pNode;
- lh_Tail: pNode;
- lh_TailPred: pNode;
- lh_Type: byte;
- l_pad: byte;
- end;
-
- pMemEntry = ^tMemEntry;
- tMemEntry = record
- case integer of
- 0: (
- me_Reqs: long;
- );
- 1: (
- me_Addr: pointer;
- me_Length: long;
- );
- end;
-
- pInterrupt = ^tInterrupt;
- pTask = ^tTask;
- tMsgPort = record
- mp_Node: tNode;
- mp_Flags: byte;
- mp_SigBit: byte;
- case integer of
- 0: (
- mp_SoftInt: pInterrupt;
- );
- 1: (
- sm_LockMsg: pMessage;
- );
- 2: (
- mp_SigTask: pTask;
- mp_MsgList: tList;
- );
- end;
-
- pSoftIntList = ^tSoftIntList;
- tSoftIntList = record
- sh_List: tList;
- sh_Pad: word;
- end;
-
- pUnit = ^tUnit;
- tUnit = record
- unit_MsgPort: tMsgPort;
- unit_flags: byte;
- unit_pad: byte;
- unit_OpenCnt: word;
- end;
-
- pIntVector = ^tIntVector;
- tIntVector = record
- iv_Data: pointer;
- iv_Code: pointer;
- iv_Node: pNode;
- end;
-
- pLibrary = ^tLibrary;
- tLibrary = record
- lib_Node: tNode;
- lib_Flags: byte;
- lib_pad: byte;
- lib_NegSize: word;
- lib_PosSize: word;
- lib_Version: word;
- lib_Revision: word;
- lib_IdString: pointer;
- lib_Sum: long;
- lib_OpenCnt: word;
- end;
-
- pResident = ^tResident;
- tResident = record
- rt_MatchWord: word;
- rt_MatchTag: pResident;
- rt_EndSkip: pointer;
- rt_Flags: byte;
- rt_Version: byte;
- rt_Type: byte;
- rt_Pri: shortint;
- rt_Name: pbyte;
- rt_IdString: pbyte;
- rt_Init: pointer;
- end;
-
- pSemaphore = ^tSemaphore;
- tSemaphore = record
- sm_MsgPort: tMsgPort;
- sm_Bids: integer;
- end;
-
- pMinNode = ^tMinNode;
- pMinList = ^tMinList;
- tMinList = record
- mlh_Head: pMinNode;
- mlh_Tail: pMinNode;
- mlh_TailPred: pMinNode;
- end;
-
- tMinNode = record
- mln_Succ: pMinNode;
- mln_Pred: pMinNode;
- end;
-
- pSemaphoreRequest = ^tSemaphoreRequest;
- tSemaphoreRequest = record
- sr_Link: tMinNode;
- sr_Waiter: pTask;
- end;
-
- pSignalSemaphore = ^tSignalSemaphore;
- tSignalSemaphore = record
- ss_Link: tNode;
- ss_NestCount: integer;
- ss_WaitQueue: tMinList;
- ss_MultipleLink: tSemaphoreRequest;
- ss_Owner: pTask;
- ss_QueueCount: integer;
- end;
-
- pDevice = ^tDevice;
- pIOStdReq = ^tIOStdReq;
- tIOStdReq = record
- io_Message: tMessage;
- io_Device: pDevice;
- io_Unit: pUnit;
- io_Command: word;
- io_Flags: byte;
- io_Error: shortint;
- io_Actual: long;
- io_Length: long;
- io_Data: pointer;
- io_Offset: long;
- end;
-
- pExecBase = ^tExecBase;
- tExecBase = record
- LibNode: tLibrary;
- SoftVer: word;
- LowMemChkSum: integer;
- ChkBase: long;
- ColdCapture: pointer;
- CoolCapture: pointer;
- WarmCapture: pointer;
- SysStkUpper: pointer;
- SysStkLower: pointer;
- MaxLocMem: long;
- DebugEntry: pointer;
- DebugData: pointer;
- AlertData: pointer;
- MaxExtMem: pointer;
- ChkSum: word;
- IntVects: array [0..15] of tIntVector;
- ThisTask: pTask;
- IdleCount: long;
- DispCount: long;
- Quantum: word;
- Elapsed: word;
- SysFlags: word;
- IDNestCnt: shortint;
- TDNestCnt: shortint;
- AttnFlags: word;
- AttnResched: word;
- ResModules: pointer;
- TaskTrapCode: pointer;
- TaskExceptCode: pointer;
- TaskExitCode: pointer;
- TaskSigAlloc: long;
- TaskTrapAlloc: word;
- MemList: tList;
- ResourceList: tList;
- DeviceList: tList;
- IntrList: tList;
- LibList: tList;
- PortList: tList;
- TaskReady: tList;
- TaskWait: tList;
- SoftInts: array [0..4] of tSoftIntList;
- LastAlert: array [0..3] of longint;
- VBlankFrequency: byte;
- PowerSupplyFrequency: byte;
- SemaphoreList: tList;
- KickMemPtr: pointer;
- KickTagPtr: pointer;
- KickCheckSum: pointer;
- ExecBaseReserved: array [0..9] of byte;
- ExecBaseNewReserved: array [0..19] of byte;
- end;
-
- pMemChunk = ^tMemChunk;
- pMemHeader = ^tMemHeader;
- tMemHeader = record
- mh_Node: tNode;
- mh_Attributes: word;
- mh_First: pMemChunk;
- mh_Lower: pointer;
- mh_Upper: pointer;
- mh_Free: long;
- end;
-
- tInterrupt = record
- is_Node: tNode;
- is_Data: pointer;
- is_Code: pointer;
- end;
-
- tMemChunk = record
- mc_Next: pMemChunk;
- mc_Bytes: long;
- end;
-
- tDevice = record
- dd_Library: tLibrary;
- end;
-
- pIORequest = ^tIORequest;
- tIORequest = record
- io_Message: tMessage;
- io_Device: pDevice;
- io_Unit: pUnit;
- io_Command: word;
- io_Flags: byte;
- io_Error: shortint;
- end;
-
- pMemList = ^tMemList;
- tMemList = record
- ml_Node: tNode;
- ml_NumEntries: word;
- end;
-
- tTask = record
- tc_Node: tNode;
- tc_Flags: byte;
- tc_State: byte;
- tc_IDNestCnt: shortint;
- tc_TDNestCnt: shortint;
- tc_SigAlloc: long;
- tc_SigWait: long;
- tc_SigRecvd: long;
- tc_SigExcept: long;
- tc_TrapAlloc: word;
- tc_TrapAble: word;
- tc_ExceptData: pointer;
- tc_ExceptCode: pointer;
- tc_TrapData: pointer;
- tc_TrapCode: pointer;
- tc_SPReg: pointer;
- tc_SPLower: pointer;
- tc_SPUpper: pointer;
- tc_Switch: pointer;
- tc_Launch: pointer;
- tc_MemEntry: tList;
- tc_UserData: pointer;
- end;
-
-
-
- const
- NT_SOFTINT = $B;
- AN_FreeVec = $7000005;
- AN_IconLib = $9000000;
- BYTEMASK = $FF;
- TS_RUN = 2;
- AO_IconLib = $8009;
- AN_MathLib = $5000000;
- AN_TMBadSupply = $15000002;
- AG_OpenLib = $30000;
- AO_MathLib = $8005;
- AN_BitMap = $7000007;
- TB_SWITCH = 6;
- AN_BadState = $8400000C;
- NT_MSGPORT = 4;
- AN_InitAPtr = $81000007;
- AN_TrackDiskDev = $14000000;
- TF_SWITCH = $40;
- AO_TrackDiskDev = $8014;
- NT_UNKNOWN = 0;
- MEMF_LARGEST = $20000;
- LIB_RESERVED = 4;
- SF_ALERTWACK = 2;
- RTF_COLDSTART = 1;
- LIB_OPEN = $FFFFFFFA;
- AG_OpenDev = $40000;
- AN_EndTask = $7000002;
- AN_GamePortDev = $12000000;
- NULL = 0;
- TS_EXCEPT = 5;
- SIGB_DOS = 8;
- AO_GamePortDev = $8012;
- AN_KeyFree = $7000008;
- AN_PlaneAlloc = $84010005;
- AN_AudioDev = $10000000;
- AO_AudioDev = $8010;
- LIBF_SUMMING = 1;
- SIGF_DOS = $100;
- AG_NoSignal = $70000;
- AN_MakeVPort = $82010030;
- TRUE_ = 1;
- AN_ItemAlloc = $4010003;
- AN_SubAlloc = $4010004;
- AN_WeirdEcho = $8400000E;
- INTB_NMI = $F;
- CMD_INVALID = 0;
- IOERR_BADLENGTH = $FFFFFFFC;
- AN_LongFrame = $82010006;
- AN_KeyRange = $700000B;
- AN_BadExpansionFree = $A000001;
- DEV_BEGINIO = $FFFFFFE2;
- UNITF_ACTIVE = 1;
- LIBF_SUMUSED = 4;
- AN_FreeTwice = $81000009;
- AN_GraphicsLib = $2000000;
- INTF_NMI = $8000;
- LIB_VECTSIZE = 6;
- LIBF_DELEXP = 8;
- AG_OpenRes = $50000;
- AO_GraphicsLib = $8002;
- NT_MEMORY = $A;
- NT_SIGNALSEM = $F;
- NT_SEMAPHORE = $E;
- TB_STACKCHK = 4;
- AN_LayersNoMem = $83010000;
- RTW_NEVER = 0;
- RTW_COLDSTART = 1;
- MEMF_PUBLIC = 1;
- CMD_STOP = 6;
- AN_BadOverlay = $700000C;
- LIB_USERDEF = $FFFFFFE2;
- AN_TimerDev = $15000000;
- TF_STACKCHK = $10;
- TS_READY = 3;
- AO_TimerDev = $8015;
- AN_IntrMem = $81000006;
- AN_ItemBoxTop = $84000006;
- AN_KeyboardDev = $13000000;
- SIGB_SINGLE = 4;
- AO_KeyboardDev = $8013;
- AN_LayersLib = $3000000;
- AO_LayersLib = $8003;
- AN_GfxNoLCM = $82011234;
- AN_GadgetType = $84000001;
- AN_DiskRsrc = $21000000;
- SIGF_SINGLE = $10;
- UNITF_INTASK = 2;
- AO_DiskRsrc = $8021;
- AN_RAMLib = $8000000;
- AN_MiscRsrc = $22000000;
- AN_DiskCopy = $32000000;
- AO_RAMLib = $8008;
- AO_MiscRsrc = $8022;
- AN_OpenScreen = $84010007;
- AN_ConsoleDev = $11000000;
- SIGB_CHILD = 1;
- AO_ConsoleDev = $8011;
- DEV_ABORTIO = $FFFFFFDC;
- RTM_WHEN = 3;
- AN_NoConsole = $8400000F;
- MEMF_CLEAR = $10000;
- AN_DOSLib = $7000000;
- SIGF_CHILD = 2;
- IOERR_NOCMD = $FFFFFFFD;
- AO_DOSLib = $8007;
- AN_StartMem = $7010001;
- AN_AsyncPkt = $7000004;
- LIB_EXPUNGE = $FFFFFFEE;
- AN_OpenScrnRast = $84010008;
- LIB_EXTFUNC = $FFFFFFE8;
- AG_NoMemory = $10000;
- AN_CreatePort = $84010002;
- RTF_AUTOINIT = $80;
- AN_DiskError = $700000A;
- SYSBASESIZE = $24C;
- AN_ExcptVect = $81000001;
- AN_ShortFrame = $82010007;
- AN_TDCalibSeek = $14000001;
- AN_CIARsrc = $20000000;
- AN_DRIntNoAct = $21000002;
- AFB_68010 = 0;
- AO_CIARsrc = $8020;
- AN_TextTmpRas = $2010009;
- AFB_68020 = 1;
- TB_PROCTIME = 0;
- AN_AddSWGadget = $8401000A;
- AN_TMBadReq = $15000001;
- SIH_PRIMASK = $F0;
- AFF_68010 = 1;
- NT_BOOTNODE = $10;
- CMD_UPDATE = 4;
- AFF_68020 = 2;
- AFB_RESERVED8 = 8;
- TF_PROCTIME = 1;
- AFB_RESERVED9 = 9;
- AN_ExpansionLib = $A000000;
- AO_ExpansionLib = $800A;
- AN_BootStrap = $30000000;
- AN_BootError = $30000001;
- AO_BootStrap = $8030;
- AN_BogusExcpt = $8100000A;
- SIGB_ABORT = 0;
- AN_DRHasDisk = $21000001;
- AN_Workbench = $31000000;
- NT_TASK = 1;
- AO_Workbench = $8031;
- FALSE_ = 0;
- CMD_CLEAR = 5;
- IOERR_OPENFAIL = $FFFFFFFF;
- AN_OpenWindow = $8401000B;
- SIGF_ABORT = 1;
- LIBF_CHANGED = 2;
- AFB_68881 = 4;
- NT_FONT = $C;
- AN_MemCorrupt = $81000005;
- NT_INTERRUPT = 2;
- NT_RESOURCE = 8;
- TS_WAIT = 4;
- AFF_68881 = $10;
- LIBRARY_VERSION = $22;
- NT_MESSAGE = 5;
- AN_SysScrnType = $84000009;
- AN_RegionMemory = $8201000B;
- CMD_NONSTD = 9;
- AN_SemCorrupt = $81000008;
- NT_FREEMSG = 6;
- MEM_BLOCKMASK = 7;
- LIB_NONSTD = $FFFFFFE2;
- TS_INVALID = 0;
- MEMF_CHIP = 2;
- NT_REPLYMSG = 7;
- EXECNAME = 'exec.library';
- AN_TDDelay = $14000002;
- LIB_CLOSE = $FFFFFFF4;
- AN_BadChkSum = $7000009;
- AN_BadGadget = $4000001;
- PA_SIGNAL = 0;
- SIGB_BLIT = 4;
- AT_DeadEnd = $80000000;
- AT_Recovery = 0;
- TB_LAUNCH = 7;
- NT_DEVICE = 3;
- NT_LIBRARY = 9;
- PA_SOFTINT = 1;
- MEMF_FAST = 4;
- IOERR_ABORTED = $FFFFFFFE;
- AG_MakeLib = $20000;
- TS_REMOVED = 6;
- SIGF_BLIT = $10;
- PF_ACTION = 3;
- TF_LAUNCH = $80;
- PA_IGNORE = 2;
- CMD_READ = 2;
- MEM_BLOCKSIZE = 8;
- CMD_FLUSH = 8;
- AN_CListLib = $6000000;
- LIB_BASE = $FFFFFFFA;
- IOB_QUICK = 0;
- CMD_RESET = 1;
- AO_CListLib = $8006;
- AN_BadSegList = $8000001;
- AN_Intuition = $4000000;
- AO_Intuition = $8004;
- AN_BltBitMap = $8201000A;
- IOF_QUICK = 1;
- NT_PROCESS = $D;
- AN_BaseChkSum = $81000002;
- AN_QPktFail = $7000003;
- AN_LibChkSum = $81000003;
- TS_ADDED = 1;
- TB_EXCEPT = 5;
- CMD_WRITE = 3;
- AG_IOError = $60000;
- AN_LibMem = $81000004;
- AN_ExecLib = $1000000;
- AN_GfxNoMem = $82010000;
- CMD_START = 7;
- AO_ExecLib = $8001;
- AN_BadMessage = $8400000D;
- TF_EXCEPT = $20;
- AN_DiskBlkSeq = $7000006;
- RTC_MATCHWORD = $4AFC;
-
-
- function Supervisor (userFunction: pointer): long;
- procedure InitCode
- (startClass: long;
- version: long);
-
- procedure InitStruct
- (initTable: pointer;
- memory: pointer;
- size: long);
-
- function MakeLibrary
- (funcInit: pointer;
- structInit: pointer;
- libInit: pointer;
- dataSize: long;
- codeSize: longint): pLibrary;
-
- function MakeFunctions
- (target: pointer;
- functionArray: pointer;
- funcDispBase: pointer): long;
-
- function FindResident (name: STRPTR): pResident;
- procedure InitResident
- (resident: pResident;
- segList: long);
-
- procedure Alert
- (alertNum: long;
- parameters: pointer);
-
- procedure Debug (flags: long);
- procedure Disable;
- procedure Enable;
- procedure Forbid;
- procedure Permit;
- function SetSR
- (newSR: long;
- mask: long): long;
-
- function SuperState: pointer;
- procedure UserState (sysStack: pointer);
- function SetIntVector
- (intNumber: long;
- interrupt: pInterrupt): pInterrupt;
-
- procedure AddIntServer
- (intNumber: long;
- interrupt: pInterrupt);
-
- procedure RemIntServer
- (intNumber: long;
- interrupt: pInterrupt);
-
- procedure Cause (interrupt: pInterrupt);
- function Allocate
- (freeList: pMemHeader;
- byteSize: long): pointer;
-
- procedure Deallocate
- (freeList: pMemHeader;
- memoryBlock: pointer;
- byteSize: long);
-
- function AllocMem
- (byteSize: long;
- requirements: long): pointer;
-
- function AllocAbs
- (byteSize: long;
- location: pointer): pointer;
-
- procedure FreeMem_
- (memoryBlock: pointer;
- byteSize: long);
-
- function AvailMem (requirements: long): long;
- function AllocEntry (entry: pMemList): pMemList;
- procedure FreeEntry (entry: pMemList);
- procedure Insert_
- (list: pList;
- node: pNode;
- pred: pNode);
-
- procedure AddHead
- (list: pList;
- node: pNode);
-
- procedure AddTail
- (list: pList;
- node: pNode);
-
- procedure Remove (node: pNode);
- function RemHead (list: pList): pNode;
- function RemTail (list: pList): pNode;
- procedure Enqueue
- (list: pList;
- node: pNode);
-
- function FindName
- (list: pList;
- name: STRPTR): pNode;
-
- function AddTask
- (task: pTask;
- initPC: pointer;
- finalPC: pointer): pointer;
-
- procedure RemTask (task: pTask);
- function FindTask (name: STRPTR): pTask;
- function SetTaskPri
- (task: pTask;
- priority: longint): shortint;
-
- function SetSignal
- (newSignals: long;
- signalSet: long): long;
-
- function SetExcept
- (newSignals: long;
- signalSet: long): long;
-
- function Wait (signalSet: long): long;
- procedure Signal
- (task: pTask;
- signalSet: long);
-
- function AllocSignal (signalNum: shortint): shortint;
- procedure FreeSignal (signalNum: shortint);
- function AllocTrap (trapNum: longint): longint;
- procedure FreeTrap (trapNum: long);
- procedure AddPort (port: pMsgPort);
- procedure RemPort (port: pMsgPort);
- procedure PutMsg
- (port: pMsgPort;
- message: pMessage);
-
- function GetMsg (port: pMsgPort): pMessage;
- procedure ReplyMsg (message: pMessage);
- function WaitPort (port: pMsgPort): pMessage;
- function FindPort (name: STRPTR): pMsgPort;
- procedure AddLibrary (library: pLibrary);
- procedure RemLibrary (library: pLibrary);
- function OldOpenLibrary (libName: string): pLibrary;
- procedure CloseLibrary (library: pLibrary);
- function SetFunction
- (library: pLibrary;
- funcOffset: longint;
- funcEntry: pointer): pointer;
-
- procedure SumLibrary (library: pLibrary);
- procedure AddDevice (device: pDevice);
- procedure RemDevice (device: pDevice);
- function OpenDevice
- (devName: string;
- unit_: long;
- ioRequest: pIORequest;
- flags: long): shortint;
-
- procedure CloseDevice (ioRequest: pIORequest);
- function DoIO (ioRequest: pIORequest): shortint;
- procedure SendIO (ioRequest: pIORequest);
- function CheckIO (ioRequest: pIORequest): boolean;
- function WaitIO (ioRequest: pIORequest): shortint;
- procedure AbortIO (ioRequest: pIORequest);
- procedure AddResource (resource: pointer);
- procedure RemResource (resource: pointer);
- function OpenResource (resName: string): pointer;
- procedure RawDoFmt
- (formatString: STRPTR;
- dataStream: pointer;
- putChProc: pointer;
- putChData: pointer);
-
- function GetCC: word;
- function TypeOfMem (address: pointer): long;
- function Procure
- (semaport: pSemaphore;
- bidMsg: pMessage): shortint;
-
- procedure Vacate (semaport: pSemaphore);
- function OpenLibrary
- (libName: string;
- version: long): pLibrary;
-
- procedure InitSemaphore (sigSem: pSignalSemaphore);
- procedure ObtainSemaphore (sigSem: pSignalSemaphore);
- procedure ReleaseSemaphore (sigSem: pSignalSemaphore);
- function AttemptSemaphore (sigSem: pSignalSemaphore): longint;
- procedure ObtainSemaphoreList (sigSem: pList);
- procedure ReleaseSemaphoreList (sigSem: pList);
- function FindSemaphore (sigSem: STRPTR): pSignalSemaphore;
- procedure AddSemaphore (sigSem: pSignalSemaphore);
- procedure RemSemaphore (sigSem: pSignalSemaphore);
- function SumKickData: long;
- procedure AddMemList
- (size: long;
- attributes: long;
- pri: longint;
- base: pointer;
- name: STRPTR);
-
- procedure CopyMem
- (source: pointer;
- dest: pointer;
- size: long);
-
- procedure CopyMemQuick
- (source: plong;
- dest: plong;
- size: long);
-
-
-
- procedure PasToC (p: string; var c);
- procedure CToPas (var c; var p: string);
- function BitMask (no: shortint): longint;
- function IsListEmpty (list: pList): boolean;
- function IsMsgPortEmpty (mp: pMsgPort): boolean;
-
-
- IMPLEMENTATION
- procedure PasToC; xassembler;
- asm
- movem.l 4(sp),a0-a1
- moveq #0,d0
- move.b (a1)+,d0
- bra @2
- @1:
- move.b (a1)+,(a0)+
- @2:
- dbra d0,@1
- clr.b (a0)
- end;
-
- procedure CToPas; xassembler;
- asm
- movem.l 4(sp),a0-a1
- addq.l #1,a0
- move.w #254,d0
- @1:
- move.b (a1)+,d1
- beq @2
- move.b d1,(a0)+
- dbra d0,@1
- @2:
- addq.b #1,d0
- not.b d0
- move.l 4(sp),a0
- move.b d0,(a0)
- end;
-
- function BitMask; xassembler;
- asm
- moveq #0,d0
- move.b 4(sp),d1
- bset d1,d0
- move.l d0,6(sp)
- end;
-
- function IsListEmpty;
- begin
- IsListEmpty := list^.lh_TailPred = pNode(list)
- end;
-
- function IsMsgPortEmpty;
- begin
- with mp^ do
- IsMsgPortEmpty := mp_MsgList.lh_TailPred = pNode(@mp_MsgList)
- end;
-
- function Supervisor; xassembler;
- asm
- movem.l a5-a6,-(sp)
- move.l $C(sp),a5
- move.l SysBase,a6
- jsr -$1E(a6)
- move.l d0,$10(sp)
- movem.l (sp)+,a5-a6
- end;
-
- procedure InitCode; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$48(a6)
- move.l (sp)+,a6
- end;
-
- procedure InitStruct; xassembler;
- asm
- movem.l a2/a6,-(sp)
- lea $C(sp),a6
- move.l (a6)+,d0
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l SysBase,a6
- jsr -$4E(a6)
- movem.l (sp)+,a2/a6
- end;
-
- function MakeLibrary; xassembler;
- asm
- movem.l a2/a6,-(sp)
- lea $C(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$54(a6)
- move.l d0,$20(sp)
- movem.l (sp)+,a2/a6
- end;
-
- function MakeFunctions; xassembler;
- asm
- movem.l a2/a6,-(sp)
- lea $C(sp),a6
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$5A(a6)
- move.l d0,$18(sp)
- movem.l (sp)+,a2/a6
- end;
-
- function FindResident; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$60(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure InitResident; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),d1/a1
- move.l SysBase,a6
- jsr -$66(a6)
- move.l (sp)+,a6
- end;
-
- procedure Alert; xassembler;
- asm
- movem.l d7/a5-a6,-(sp)
- lea $10(sp),a6
- move.l (a6)+,a5
- move.l (a6)+,d7
- move.l SysBase,a6
- jsr -$6C(a6)
- movem.l (sp)+,d7/a5-a6
- end;
-
- procedure Debug; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),d0
- move.l SysBase,a6
- jsr -$72(a6)
- move.l (sp)+,a6
- end;
-
- procedure Disable; xassembler;
- asm
- move.l a6,-(sp)
- move.l SysBase,a6
- jsr -$78(a6)
- move.l (sp)+,a6
- end;
-
- procedure Enable; xassembler;
- asm
- move.l a6,-(sp)
- move.l SysBase,a6
- jsr -$7E(a6)
- move.l (sp)+,a6
- end;
-
- procedure Forbid; xassembler;
- asm
- move.l a6,-(sp)
- move.l SysBase,a6
- jsr -$84(a6)
- move.l (sp)+,a6
- end;
-
- procedure Permit; xassembler;
- asm
- move.l a6,-(sp)
- move.l SysBase,a6
- jsr -$8A(a6)
- move.l (sp)+,a6
- end;
-
- function SetSR; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$90(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function SuperState; xassembler;
- asm
- move.l a6,-(sp)
- move.l SysBase,a6
- jsr -$96(a6)
- move.l d0,8(sp)
- move.l (sp)+,a6
- end;
-
- procedure UserState; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),d0
- move.l SysBase,a6
- jsr -$9C(a6)
- move.l (sp)+,a6
- end;
-
- function SetIntVector; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$A2(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure AddIntServer; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$A8(a6)
- move.l (sp)+,a6
- end;
-
- procedure RemIntServer; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$AE(a6)
- move.l (sp)+,a6
- end;
-
- procedure Cause; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$B4(a6)
- move.l (sp)+,a6
- end;
-
- function Allocate; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),d0/a0
- move.l SysBase,a6
- jsr -$BA(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure Deallocate; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d0
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$C0(a6)
- move.l (sp)+,a6
- end;
-
- function AllocMem; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$C6(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function AllocAbs; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$CC(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeMem_; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),d0/a1
- move.l SysBase,a6
- jsr -$D2(a6)
- move.l (sp)+,a6
- end;
-
- function AvailMem; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),d1
- move.l SysBase,a6
- jsr -$D8(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- function AllocEntry; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$DE(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeEntry; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$E4(a6)
- move.l (sp)+,a6
- end;
-
- procedure Insert_; xassembler;
- asm
- movem.l a2/a6,-(sp)
- lea $C(sp),a6
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$EA(a6)
- movem.l (sp)+,a2/a6
- end;
-
- procedure AddHead; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$F0(a6)
- move.l (sp)+,a6
- end;
-
- procedure AddTail; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$F6(a6)
- move.l (sp)+,a6
- end;
-
- procedure Remove; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$FC(a6)
- move.l (sp)+,a6
- end;
-
- function RemHead; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$102(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- function RemTail; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$108(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure Enqueue; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$10E(a6)
- move.l (sp)+,a6
- end;
-
- function FindName; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$114(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function AddTask; xassembler;
- asm
- movem.l a2-a3/a6,-(sp)
- lea $10(sp),a6
- move.l (a6)+,a3
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l SysBase,a6
- jsr -$11A(a6)
- move.l d0,$1C(sp)
- movem.l (sp)+,a2-a3/a6
- end;
-
- procedure RemTask; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$120(a6)
- move.l (sp)+,a6
- end;
-
- function FindTask; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$126(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- function SetTaskPri; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),d0/a1
- move.l SysBase,a6
- jsr -$12C(a6)
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function SetSignal; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$132(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function SetExcept; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$138(a6)
- move.l d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- function Wait; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),d0
- move.l SysBase,a6
- jsr -$13E(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure Signal; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),d0/a1
- move.l SysBase,a6
- jsr -$144(a6)
- move.l (sp)+,a6
- end;
-
- function AllocSignal; xassembler;
- asm
- move.l a6,-(sp)
- move.b 8(sp),d0
- move.l SysBase,a6
- jsr -$14A(a6)
- move.b d0,$A(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeSignal; xassembler;
- asm
- move.l a6,-(sp)
- move.b 8(sp),d0
- move.l SysBase,a6
- jsr -$150(a6)
- move.l (sp)+,a6
- end;
-
- function AllocTrap; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),d0
- move.l SysBase,a6
- jsr -$156(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure FreeTrap; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),d0
- move.l SysBase,a6
- jsr -$15C(a6)
- move.l (sp)+,a6
- end;
-
- procedure AddPort; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$162(a6)
- move.l (sp)+,a6
- end;
-
- procedure RemPort; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$168(a6)
- move.l (sp)+,a6
- end;
-
- procedure PutMsg; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$16E(a6)
- move.l (sp)+,a6
- end;
-
- function GetMsg; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$174(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure ReplyMsg; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$17A(a6)
- move.l (sp)+,a6
- end;
-
- function WaitPort; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$180(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- function FindPort; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$186(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure AddLibrary; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$18C(a6)
- move.l (sp)+,a6
- end;
-
- procedure RemLibrary; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$192(a6)
- move.l (sp)+,a6
- end;
-
- function OldOpenLibrary; assembler;
- var c_libName: string;
- asm
- move.l libName,-(sp)
- pea c_libName
- jsr PasToC
- move.l a6,-(sp)
- lea c_libName,a1
- move.l SysBase,a6
- jsr -$198(a6)
- move.l d0,$110(sp)
- move.l (sp)+,a6
- end;
-
- procedure CloseLibrary; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$19E(a6)
- move.l (sp)+,a6
- end;
-
- function SetFunction; xassembler;
- asm
- move.l a6,-(sp)
- movem.l 8(sp),d0/a0-a1
- move.l SysBase,a6
- jsr -$1A4(a6)
- move.l d0,$14(sp)
- move.l (sp)+,a6
- end;
-
- procedure SumLibrary; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1AA(a6)
- move.l (sp)+,a6
- end;
-
- procedure AddDevice; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1B0(a6)
- move.l (sp)+,a6
- end;
-
- procedure RemDevice; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1B6(a6)
- move.l (sp)+,a6
- end;
-
- function OpenDevice; assembler;
- var c_devName: string;
- asm
- move.l devName,-(sp)
- pea c_devName
- jsr PasToC
- move.l a6,-(sp)
- lea c_devName,a0
- lea $10C(sp),a6
- move.l (a6)+,d1
- move.l (a6)+,a1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$1BC(a6)
- move.b d0,$11C(sp)
- move.l (sp)+,a6
- end;
-
- procedure CloseDevice; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1C2(a6)
- move.l (sp)+,a6
- end;
-
- function DoIO; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1C8(a6)
- move.b d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure SendIO; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1CE(a6)
- move.l (sp)+,a6
- end;
-
- function CheckIO; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1D4(a6)
- tst.l d0
- sne d0
- neg.b d0
- move.b d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- function WaitIO; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1DA(a6)
- move.b d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure AbortIO; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1E0(a6)
- move.l (sp)+,a6
- end;
-
- procedure AddResource; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1E6(a6)
- move.l (sp)+,a6
- end;
-
- procedure RemResource; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$1EC(a6)
- move.l (sp)+,a6
- end;
-
- function OpenResource; assembler;
- var c_resName: string;
- asm
- move.l resName,-(sp)
- pea c_resName
- jsr PasToC
- move.l a6,-(sp)
- lea c_resName,a1
- move.l SysBase,a6
- jsr -$1F2(a6)
- move.l d0,$110(sp)
- move.l (sp)+,a6
- end;
-
- procedure RawDoFmt; xassembler;
- asm
- movem.l a2-a3/a6,-(sp)
- lea $10(sp),a6
- move.l (a6)+,a3
- move.l (a6)+,a2
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$20A(a6)
- movem.l (sp)+,a2-a3/a6
- end;
-
- function GetCC; xassembler;
- asm
- movem.l a2-a3/a6,-(sp)
- move.l SysBase,a6
- jsr -$210(a6)
- move.w d0,$10(sp)
- movem.l (sp)+,a2-a3/a6
- end;
-
- function TypeOfMem; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$216(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- function Procure; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$21C(a6)
- move.b d0,$10(sp)
- move.l (sp)+,a6
- end;
-
- procedure Vacate; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$222(a6)
- move.l (sp)+,a6
- end;
-
- function OpenLibrary; assembler;
- var c_libName: string;
- asm
- move.l libName,-(sp)
- pea c_libName
- jsr PasToC
- move.l a6,-(sp)
- lea c_libName,a1
- move.l $10C(sp),d0
- move.l SysBase,a6
- jsr -$228(a6)
- move.l d0,$114(sp)
- move.l (sp)+,a6
- end;
-
- procedure InitSemaphore; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$22E(a6)
- move.l (sp)+,a6
- end;
-
- procedure ObtainSemaphore; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$234(a6)
- move.l (sp)+,a6
- end;
-
- procedure ReleaseSemaphore; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$23A(a6)
- move.l (sp)+,a6
- end;
-
- function AttemptSemaphore; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$240(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure ObtainSemaphoreList; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$246(a6)
- move.l (sp)+,a6
- end;
-
- procedure ReleaseSemaphoreList; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a0
- move.l SysBase,a6
- jsr -$24C(a6)
- move.l (sp)+,a6
- end;
-
- function FindSemaphore; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$252(a6)
- move.l d0,$C(sp)
- move.l (sp)+,a6
- end;
-
- procedure AddSemaphore; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$258(a6)
- move.l (sp)+,a6
- end;
-
- procedure RemSemaphore; xassembler;
- asm
- move.l a6,-(sp)
- move.l 8(sp),a1
- move.l SysBase,a6
- jsr -$25E(a6)
- move.l (sp)+,a6
- end;
-
- function SumKickData; xassembler;
- asm
- move.l a6,-(sp)
- move.l SysBase,a6
- jsr -$264(a6)
- move.l d0,8(sp)
- move.l (sp)+,a6
- end;
-
- procedure AddMemList; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l (a6)+,d2
- move.l (a6)+,d1
- move.l (a6)+,d0
- move.l SysBase,a6
- jsr -$26A(a6)
- move.l (sp)+,a6
- end;
-
- procedure CopyMem; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d0
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$270(a6)
- move.l (sp)+,a6
- end;
-
- procedure CopyMemQuick; xassembler;
- asm
- move.l a6,-(sp)
- lea 8(sp),a6
- move.l (a6)+,d0
- move.l (a6)+,a1
- move.l (a6)+,a0
- move.l SysBase,a6
- jsr -$276(a6)
- move.l (sp)+,a6
- end;
-
- end.
-