diff --git a/.gitattributes b/.gitattributes index 2bfe173c9b..deec0c3391 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5568,6 +5568,26 @@ packages/modplug/Makefile.fpc svneol=native#text/plain packages/modplug/Makefile.fpc.fpcmake svneol=native#text/plain packages/modplug/fpmake.pp svneol=native#text/plain packages/modplug/src/modplug.pas svneol=native#text/plain +packages/morphunits/src/agraphics.pas svneol=native#text/plain +packages/morphunits/src/ahi.pas svneol=native#text/plain +packages/morphunits/src/amigados.pas svneol=native#text/plain +packages/morphunits/src/amigalib.pas svneol=native#text/plain +packages/morphunits/src/asl.pas svneol=native#text/plain +packages/morphunits/src/clipboard.pas svneol=native#text/plain +packages/morphunits/src/datatypes.pas svneol=native#text/plain +packages/morphunits/src/exec.pas svneol=native#text/plain +packages/morphunits/src/get9.pas svneol=native#text/plain +packages/morphunits/src/hardware.pas svneol=native#text/plain +packages/morphunits/src/inputevent.pas svneol=native#text/plain +packages/morphunits/src/intuition.pas svneol=native#text/plain +packages/morphunits/src/keymap.pas svneol=native#text/plain +packages/morphunits/src/kvm.pas svneol=native#text/plain +packages/morphunits/src/layers.pas svneol=native#text/plain +packages/morphunits/src/mui.pas svneol=native#text/plain +packages/morphunits/src/muihelper.pas svneol=native#text/plain +packages/morphunits/src/timer.pas svneol=native#text/plain +packages/morphunits/src/tinygl.pas svneol=native#text/plain +packages/morphunits/src/utility.pas svneol=native#text/plain packages/mysql/Makefile svneol=native#text/plain packages/mysql/Makefile.fpc svneol=native#text/plain packages/mysql/Makefile.fpc.fpcmake svneol=native#text/plain @@ -8567,40 +8587,20 @@ rtl/mipsel/strings.inc svneol=native#text/plain rtl/mipsel/stringss.inc svneol=native#text/plain rtl/morphos/Makefile svneol=native#text/plain rtl/morphos/Makefile.fpc svneol=native#text/plain -rtl/morphos/aboxlib.pas -text svneol=unset#text/plain -rtl/morphos/ahi.pas svneol=native#text/plain -rtl/morphos/asl.pas svneol=native#text/plain -rtl/morphos/clipboard.pas svneol=native#text/plain -rtl/morphos/datatypes.pas -text svneol=unset#text/plain -rtl/morphos/doslib.pp svneol=native#text/plain rtl/morphos/doslibd.inc svneol=native#text/plain rtl/morphos/doslibf.inc svneol=native#text/plain rtl/morphos/emuld.inc svneol=native#text/plain -rtl/morphos/exec.pp svneol=native#text/plain rtl/morphos/execd.inc svneol=native#text/plain rtl/morphos/execf.inc svneol=native#text/plain -rtl/morphos/get9.pas svneol=native#text/plain -rtl/morphos/graphics.pas svneol=native#text/plain -rtl/morphos/hardware.pas svneol=native#text/plain -rtl/morphos/inputevent.pas svneol=native#text/plain -rtl/morphos/intuition.pas svneol=native#text/plain -rtl/morphos/keymap.pas svneol=native#text/plain -rtl/morphos/kvm.pp svneol=native#text/plain -rtl/morphos/layers.pas svneol=native#text/plain -rtl/morphos/mui.pas -text svneol=unset#text/plain -rtl/morphos/muihelper.pas -text svneol=unset#text/plain rtl/morphos/prt0.as svneol=native#text/plain rtl/morphos/sysosh.inc svneol=native#text/plain rtl/morphos/system.pp svneol=native#text/plain -rtl/morphos/timer.pp svneol=native#text/plain rtl/morphos/timerd.inc svneol=native#text/plain rtl/morphos/timerf.inc svneol=native#text/plain -rtl/morphos/tinygl.pp svneol=native#text/plain rtl/morphos/tthread.inc svneol=native#text/plain rtl/morphos/utild1.inc svneol=native#text/plain rtl/morphos/utild2.inc svneol=native#text/plain rtl/morphos/utilf.inc svneol=native#text/plain -rtl/morphos/utility.pp svneol=native#text/plain rtl/msdos/Makefile svneol=native#text/plain rtl/msdos/Makefile.fpc svneol=native#text/plain rtl/msdos/classes.pp svneol=native#text/plain diff --git a/packages/Makefile.fpc.fpcmake b/packages/Makefile.fpc.fpcmake index 65639dba18..9a74638d2e 100644 --- a/packages/Makefile.fpc.fpcmake +++ b/packages/Makefile.fpc.fpcmake @@ -63,7 +63,7 @@ dirs_netwlibc=rtl-console fv zlib unzip dirs_palmos=palmunits dirs_go32v2=rtl-console fv graph unzip gdbint dirs_amiga=amunits -dirs_morphos=rtl-console fv opengl sdl +dirs_morphos=morphunits rtl-console fv opengl sdl dirs_wii=libogcfpc dirs_arm_nds=libndsfpc diff --git a/packages/fpmake_add.inc b/packages/fpmake_add.inc index 32ec2abcca..0b74b5052e 100644 --- a/packages/fpmake_add.inc +++ b/packages/fpmake_add.inc @@ -71,6 +71,7 @@ add_lua(ADirectory+IncludeTrailingPathDelimiter('lua')); add_mad(ADirectory+IncludeTrailingPathDelimiter('mad')); add_modplug(ADirectory+IncludeTrailingPathDelimiter('modplug')); + add_morphunits(ADirectory+IncludeTrailingPathDelimiter('morphunits')); add_mysql(ADirectory+IncludeTrailingPathDelimiter('mysql')); add_ncurses(ADirectory+IncludeTrailingPathDelimiter('ncurses')); add_newt(ADirectory+IncludeTrailingPathDelimiter('newt')); diff --git a/packages/fpmake_proc.inc b/packages/fpmake_proc.inc index af057415d0..4937ea27b0 100644 --- a/packages/fpmake_proc.inc +++ b/packages/fpmake_proc.inc @@ -416,6 +416,12 @@ begin {$include modplug/fpmake.pp} end; +procedure add_morphunits(const ADirectory: string); +begin + with Installer do +{$include morphunits/fpmake.pp} +end; + procedure add_mysql(const ADirectory: string); begin with Installer do diff --git a/packages/fv/fpmake.pp b/packages/fv/fpmake.pp index ce804401fe..8731fb6b5e 100644 --- a/packages/fv/fpmake.pp +++ b/packages/fv/fpmake.pp @@ -29,6 +29,7 @@ begin P.IncludePath.Add('src'); P.Dependencies.add('rtl-console'); P.Dependencies.add('rtl-extra'); + P.Dependencies.add('morphunits',[morphos]); T:=P.Targets.AddUnit('app.pas'); with T.Dependencies do diff --git a/packages/fv/src/drivers.pas b/packages/fv/src/drivers.pas index 87c00a3d4b..eaa6101399 100644 --- a/packages/fv/src/drivers.pas +++ b/packages/fv/src/drivers.pas @@ -94,7 +94,7 @@ USES {$ENDIF} {$IFDEF OS_AMIGA} - doslib, + amigados, {$ENDIF} video, @@ -824,7 +824,7 @@ end; {$IFDEF OS_AMIGA} begin { AmigaOS Delay() wait's argument in 1/50 seconds } - DOSLib.Delay(2); + AmigaDOS.Delay(2); end; {$ENDIF OS_AMIGA} diff --git a/rtl/morphos/graphics.pas b/packages/morphunits/src/agraphics.pas similarity index 99% rename from rtl/morphos/graphics.pas rename to packages/morphunits/src/agraphics.pas index 1b790f7d4d..d3a6e4ea6f 100644 --- a/rtl/morphos/graphics.pas +++ b/packages/morphunits/src/agraphics.pas @@ -20,7 +20,7 @@ **********************************************************************} {$PACKRECORDS 2} -unit graphics; +unit agraphics; interface diff --git a/rtl/morphos/ahi.pas b/packages/morphunits/src/ahi.pas similarity index 100% rename from rtl/morphos/ahi.pas rename to packages/morphunits/src/ahi.pas diff --git a/packages/morphunits/src/amigados.pas b/packages/morphunits/src/amigados.pas new file mode 100644 index 0000000000..3575cd5edd --- /dev/null +++ b/packages/morphunits/src/amigados.pas @@ -0,0 +1,2163 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. + + dos.library interface unit for MorphOS/PowerPC + + MorphOS port was done on a free Pegasos II/G4 machine + provided by Genesi S.a.r.l. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +{$INLINE ON} + +unit AmigaDOS; + +interface + +uses Exec, Timer; + +var + DosBase: Pointer; + + +{ * dos global definitions (V50) + ********************************************************************* + * } + + +const + DOSNAME = 'dos.library'; + +const + DOSTRUE = -1; + DOSFALSE = 0; + +const + MODE_OLDFILE = 1005; + MODE_NEWFILE = 1006; + MODE_READWRITE = 1004; + +const + OFFSET_BEGINNING = -1; + OFFSET_CURRENT = 0; + OFFSET_END = 1; + OFFSET_BEGINING = OFFSET_BEGINNING; { * Typo fix * } + +const + BITSPERBYTE = 8; + BYTESPERLONG = 4; + BITSPERLONG = 32; + _MAXINT = $7FFFFFFF; + _MININT = $80000000; + +const + SHARED_LOCK = -2; + ACCESS_READ = -2; + EXCLUSIVE_LOCK = -1; + ACCESS_WRITE = -1; + + +type + PDateStamp = ^TDateStamp; + TDateStamp = packed record + ds_Days : LongInt; + ds_Minute: LongInt; + ds_Tick : LongInt; + end; + +const + TICKS_PER_SECOND = 50; + + +type + PFileInfoBlock = ^TFileInfoBlock; + TFileInfoBlock = packed record + fib_DiskKey : LongInt; + fib_DirEntryType: LongInt; + fib_FileName : Array[0..107] Of Char; + fib_Protection : LongInt; + fib_EntryType : LongInt; + fib_Size : LongInt; + fib_NumBlocks : LongInt; + fib_Date : TDateStamp; + fib_Comment : Array[0..79] Of Char; + + fib_OwnerUID : Word; + fib_OwnerGID : Word; + + fib_Reserved : Array[0..31] Of Char; + end; + +const + FIBB_OTR_READ = 15; + FIBB_OTR_WRITE = 14; + FIBB_OTR_EXECUTE = 13; + FIBB_OTR_DELETE = 12; + FIBB_GRP_READ = 11; + FIBB_GRP_WRITE = 10; + FIBB_GRP_EXECUTE = 9; + FIBB_GRP_DELETE = 8; + + FIBB_SCRIPT = 6; + FIBB_PURE = 5; + FIBB_ARCHIVE = 4; + FIBB_READ = 3; + FIBB_WRITE = 2; + FIBB_EXECUTE = 1; + FIBB_DELETE = 0; + +const + FIBF_OTR_READ = (1 Shl FIBB_OTR_READ); + FIBF_OTR_WRITE = (1 Shl FIBB_OTR_WRITE); + FIBF_OTR_EXECUTE = (1 Shl FIBB_OTR_EXECUTE); + FIBF_OTR_DELETE = (1 Shl FIBB_OTR_DELETE); + FIBF_GRP_READ = (1 Shl FIBB_GRP_READ); + FIBF_GRP_WRITE = (1 Shl FIBB_GRP_WRITE); + FIBF_GRP_EXECUTE = (1 Shl FIBB_GRP_EXECUTE); + FIBF_GRP_DELETE = (1 Shl FIBB_GRP_DELETE); + + FIBF_SCRIPT = (1 Shl FIBB_SCRIPT); + FIBF_PURE = (1 Shl FIBB_PURE); + FIBF_ARCHIVE = (1 Shl FIBB_ARCHIVE); + FIBF_READ = (1 Shl FIBB_READ); + FIBF_WRITE = (1 Shl FIBB_WRITE); + FIBF_EXECUTE = (1 Shl FIBB_EXECUTE); + FIBF_DELETE = (1 Shl FIBB_DELETE); + +const + FAULT_MAX = 82; + + +type + BPTR = LongInt; + BSTR = LongInt; + +type + PInfoData = ^TInfoData; + TInfoData = packed record + id_NumSoftErrors: LongInt; + id_UnitNumber : LongInt; + id_DiskState : LongInt; + id_NumBlocks : LongInt; + id_NumBlocksUsed: LongInt; + id_BytesPerBlock: LongInt; + id_DiskType : LongInt; + id_VolumeNode : LongInt; {BPTR} + id_InUse : LongInt; + end; + + +const + ID_WRITE_PROTECTED = 80; + ID_VALIDATING = 81; + ID_VALIDATED = 82; + + ID_NO_DISK_PRESENT = -1; + ID_UNREADABLE_DISK = $42414400; + ID_DOS_DISK = $444F5300; + ID_FFS_DISK = $444F5301; + ID_INTER_DOS_DISK = $444F5302; + ID_INTER_FFS_DISK = $444F5303; + ID_FASTDIR_DOS_DISK = $444F5304; + ID_FASTDIR_FFS_DISK = $444F5305; + ID_LNFS_DOS_DISK = $444F5306; + ID_LNFS_FFS_DISK = $444F5307; + ID_NOT_REALLY_DOS = $4E444F53; + ID_KICKSTART_DISK = $4B49434B; + ID_MSDOS_DISK = $4d534400; + +const + ERROR_NO_FREE_STORE = 103; + ERROR_TASK_TABLE_FULL = 105; + ERROR_BAD_TEMPLATE = 114; + ERROR_BAD_NUMBER = 115; + ERROR_REQUIRED_ARG_MISSING = 116; + ERROR_KEY_NEEDS_ARG = 117; + ERROR_TOO_MANY_ARGS = 118; + ERROR_UNMATCHED_QUOTES = 119; + ERROR_LINE_TOO_LONG = 120; + ERROR_FILE_NOT_OBJECT = 121; + ERROR_INVALID_RESIDENT_LIBRARY = 122; + ERROR_NO_DEFAULT_DIR = 201; + ERROR_OBJECT_IN_USE = 202; + ERROR_OBJECT_EXISTS = 203; + ERROR_DIR_NOT_FOUND = 204; + ERROR_OBJECT_NOT_FOUND = 205; + ERROR_BAD_STREAM_NAME = 206; + ERROR_OBJECT_TOO_LARGE = 207; + ERROR_ACTION_NOT_KNOWN = 209; + ERROR_INVALID_COMPONENT_NAME = 210; + ERROR_INVALID_LOCK = 211; + ERROR_OBJECT_WRONG_TYPE = 212; + ERROR_DISK_NOT_VALIDATED = 213; + ERROR_DISK_WRITE_PROTECTED = 214; + ERROR_RENAME_ACROSS_DEVICES = 215; + ERROR_DIRECTORY_NOT_EMPTY = 216; + ERROR_TOO_MANY_LEVELS = 217; + ERROR_DEVICE_NOT_MOUNTED = 218; + ERROR_SEEK_ERROR = 219; + ERROR_COMMENT_TOO_BIG = 220; + ERROR_DISK_FULL = 221; + ERROR_DELETE_PROTECTED = 222; + ERROR_WRITE_PROTECTED = 223; + ERROR_READ_PROTECTED = 224; + ERROR_NOT_A_DOS_DISK = 225; + ERROR_NO_DISK = 226; + ERROR_NO_MORE_ENTRIES = 232; + + ERROR_IS_SOFT_LINK = 233; + ERROR_OBJECT_LINKED = 234; + ERROR_BAD_HUNK = 235; + ERROR_NOT_IMPLEMENTED = 236; + ERROR_RECORD_NOT_LOCKED = 240; + ERROR_LOCK_COLLISION = 241; + ERROR_LOCK_TIMEOUT = 242; + ERROR_UNLOCK_ERROR = 243; + +const + RETURN_OK = 0; + RETURN_WARN = 5; + RETURN_ERROR = 10; + RETURN_FAIL = 20; + +const + SIGBREAKB_CTRL_C = 12; + SIGBREAKB_CTRL_D = 13; + SIGBREAKB_CTRL_E = 14; + SIGBREAKB_CTRL_F = 15; + + SIGBREAKF_CTRL_C = (1 Shl SIGBREAKB_CTRL_C); + SIGBREAKF_CTRL_D = (1 Shl SIGBREAKB_CTRL_D); + SIGBREAKF_CTRL_E = (1 Shl SIGBREAKB_CTRL_E); + SIGBREAKF_CTRL_F = (1 Shl SIGBREAKB_CTRL_F); + +const + LOCK_DIFFERENT = -1; + LOCK_SAME = 0; + LOCK_SAME_VOLUME = 1; + LOCK_SAME_HANDLER = LOCK_SAME_VOLUME; + +const + CHANGE_LOCK = 0; + CHANGE_FH = 1; + +const + LINK_HARD = 0; + LINK_SOFT = 1; + +const + ITEM_EQUAL = -2; + ITEM_ERROR = -1; + ITEM_NOTHING = 0; + ITEM_UNQUOTED = 1; + ITEM_QUOTED = 2; + +const + DOS_FILEHANDLE = 0; + DOS_EXALLCONTROL = 1; + DOS_FIB = 2; + DOS_STDPKT = 3; + DOS_CLI = 4; + DOS_RDARGS = 5; + + + +{ * dos date/time definitions + ********************************************************************* + * } + + +type + { * Required to avoid conflict with default types * } + _PDateTime = ^_TDateTime; + _TDateTime = packed record + dat_Stamp : TDateStamp; + dat_Format : Byte; + dat_Flags : Byte; + dat_StrDay : Pointer; + dat_StrDate: Pointer; + dat_StrTime: Pointer; + end; + +const + LEN_DATSTRING = 16; + +const + DTB_SUBST = 0; + DTF_SUBST = (1 Shl DTB_SUBST); + DTB_FUTURE = 1; + DTF_FUTURE = (1 Shl DTB_FUTURE); + +const + FORMAT_DOS = 0; + FORMAT_INT = 1; + FORMAT_USA = 2; + FORMAT_CDN = 3; + FORMAT_MAX = FORMAT_CDN; + FORMAT_DEF = 4; + + + +{ * dos extended structures definitions + ********************************************************************* + * } + + +type + PProcess = ^TProcess; + TProcess = packed record + pr_Task : TTask; + pr_MsgPort : TMsgPort; + pr_Pad : Word; + pr_SegList : DWord; { BPTR } + pr_StackSize : LongInt; { 68k stacksize! } + pr_GlobVec : Pointer; + pr_TaskNum : LongInt; + pr_StackBase : DWord; { BPTR } + pr_Result2 : LongInt; + pr_CurrentDir : DWord; { BPTR } + pr_CIS : DWord; { BPTR } + pr_COS : DWord; { BPTR } + pr_ConsoleTask : Pointer; + pr_FileSystemTask: Pointer; + pr_CLI : DWord; { BPTR } + pr_ReturnAddr : Pointer; + pr_PktWait : Pointer; + pr_WindowPtr : Pointer; + pr_HomeDir : DWord; { BPTR } + pr_Flags : LongInt; + pr_ExitCode : Pointer; { Procedure } + pr_ExitData : LongInt; + pr_Arguments : PChar; + pr_LocalVars : TMinList; + pr_ShellPrivate : DWord; + pr_CES : DWord; { BPTR } + end; + +const + PRB_FREESEGLIST = 0; + PRF_FREESEGLIST = (1 Shl PRB_FREESEGLIST); + + PRB_FREECURRDIR = 1; + PRF_FREECURRDIR = (1 Shl PRB_FREECURRDIR); + + PRB_FREECLI = 2; + PRF_FREECLI = (1 Shl PRB_FREECLI); + + PRB_CLOSEINPUT = 3; + PRF_CLOSEINPUT = (1 Shl PRB_CLOSEINPUT); + + PRB_CLOSEOUTPUT = 4; + PRF_CLOSEOUTPUT = (1 Shl PRB_CLOSEOUTPUT); + + PRB_FREEARGS = 5; + PRF_FREEARGS = (1 Shl PRB_FREEARGS); + + +type + PFileHandle = ^TFileHandle; + TFileHandle = packed record + fh_Flags : DWord; + fh_Interactive: LongInt; + fh_Type : PMsgPort; + fh_Buf : LongInt; + fh_Pos : LongInt; + fh_End : LongInt; + fh_Func1 : LongInt; + fh_Func2 : LongInt; + fh_Func3 : LongInt; + fh_Arg1 : LongInt; + fh_Arg2 : LongInt; + { *** V50 MorphOS *** } + fh_BufSize : LongInt; + fh_OrigBuf : LongInt; + end; + +type + PDOSPacket = ^TDOSPacket; + TDOSPacket = packed record + dp_Link: PMessage; + dp_Port: PMsgPort; + case Byte of + 0 : ( dp_Action : Longint; + dp_Status : Longint; + dp_Status2: Longint; + dp_BufAddr: Longint; + ); + 1 : ( dp_Type: Longint; + dp_Res1: Longint; + dp_Res2: Longint; + dp_Arg1: Longint; + dp_Arg2: Longint; + dp_Arg3: Longint; + dp_Arg4: Longint; + dp_Arg5: Longint; + dp_Arg6: Longint; + dp_Arg7: Longint; + ); + end; + +type + PStandardPacket = ^TStandardPacket; + TStandardPacket = packed record + sp_Msg: TMessage; + sp_Pkt: TDOSPacket; + end; + + +const + ACTION_NIL = 0; + ACTION_STARTUP = 0; + ACTION_GET_BLOCK = 2; { *** OBSOLETE *** } + ACTION_SET_MAP = 4; + ACTION_DIE = 5; + ACTION_EVENT = 6; + ACTION_CURRENT_VOLUME = 7; + ACTION_LOCATE_OBJECT = 8; + ACTION_RENAME_DISK = 9; + ACTION_WRITE = 'W'; + ACTION_READ = 'R'; + ACTION_FREE_LOCK = 15; + ACTION_DELETE_OBJECT = 16; + ACTION_RENAME_OBJECT = 17; + ACTION_MORE_CACHE = 18; + ACTION_COPY_DIR = 19; + ACTION_WAIT_CHAR = 20; + ACTION_SET_PROTECT = 21; + ACTION_CREATE_DIR = 22; + ACTION_EXAMINE_OBJECT = 23; + ACTION_EXAMINE_NEXT = 24; + ACTION_DISK_INFO = 25; + ACTION_INFO = 26; + ACTION_FLUSH = 27; + ACTION_SET_COMMENT = 28; + ACTION_PARENT = 29; + ACTION_TIMER = 30; + ACTION_INHIBIT = 31; + ACTION_DISK_TYPE = 32; + ACTION_DISK_CHANGE = 33; + ACTION_SET_DATE = 34; + + ACTION_SAME_LOCK = 40; + + ACTION_SCREEN_MODE = 994; + + ACTION_CHANGE_SIGNAL = 995; + + ACTION_READ_RETURN = 1001; + ACTION_WRITE_RETURN = 1002; + ACTION_SEEK = 1008; + ACTION_FINDUPDATE = 1004; + ACTION_FINDINPUT = 1005; + ACTION_FINDOUTPUT = 1006; + ACTION_END = 1007; + + ACTION_FORMAT = 1020; + ACTION_MAKE_LINK = 1021; + + ACTION_SET_FILE_SIZE = 1022; + ACTION_WRITE_PROTECT = 1023; + + ACTION_READ_LINK = 1024; + ACTION_FH_FROM_LOCK = 1026; + ACTION_IS_FILESYSTEM = 1027; + ACTION_CHANGE_MODE = 1028; + + ACTION_COPY_DIR_FH = 1030; + ACTION_PARENT_FH = 1031; + ACTION_EXAMINE_ALL = 1033; + ACTION_EXAMINE_FH = 1034; + + ACTION_EXAMINE_ALL_END = 1035; + ACTION_SET_OWNER = 1036; + + ACTION_LOCK_RECORD = 2008; + ACTION_FREE_RECORD = 2009; + + ACTION_ADD_NOTIFY = 4097; + ACTION_REMOVE_NOTIFY = 4098; + + ACTION_SERIALIZE_DISK = 4200; + + ACTION_GET_DISK_FSSM = 4201; + ACTION_FREE_DISK_FSSM = 4202; + + +type + PErrorString = ^TErrorString; + TErrorString = packed record + estr_Nums: Pointer; { ^LongInt } + estr_Byte: Pointer; { ^Byte } + end; + +type + PRootNode = ^TRootNode; + TRootNode = packed record + rn_TaskArray : DWord; { BPTR } + rn_ConsoleSegment : DWord; { BPTR } + rn_Time : TDateStamp; + rn_RestartSeg : LongInt; + rn_Info : DWord; { BPTR } + rn_FileHandlerSegment: DWord; { BPTR } + rn_CliList : TMinList; + rn_BootProc : PMsgPort; + rn_ShellSegment : DWord; { BPTR } + rn_Flags : LongInt; + end; + +type + PDOSLibrary = ^TDOSLibrary; + TDOSLibrary = packed record + dl_Lib : TLibrary; + dl_Root : PRootNode; + dl_GU : Pointer; + dl_A2 : LongInt; + dl_A5 : LongInt; + dl_A6 : LongInt; + dl_Errors : PErrorString; + dl_TimeReq : PTimeRequest; + dl_UtilityBase : PLibrary; + dl_IntuitionBase: PLibrary; + end; + + +const + RNB_WILDSTAR = 24; + RNF_WILDSTAR = (1 Shl RNB_WILDSTAR); + + RNB_PRIVATE1 = 1; + RNF_PRIVATE1 = (1 Shl RNB_PRIVATE1); + + +type + PCliProcList = ^TCliProcList; + TCliProcList = packed record + cpl_Node : TMinNode; + cpl_First: LongInt; + cpl_Array: Array[0..0] Of PMsgPort; + end; + +type + PDOSInfo = ^TDOSInfo; + TDOSInfo = packed record + case Byte of + 0 : ( di_ResList: DWord; { BPTR } + ); + 1 : ( di_McName : DWord; { BPTR } + di_DevInfo : DWord; { BPTR } + di_Devices : DWord; { BPTR } + di_Handlers : DWord; { BPTR } + di_NetHand : Pointer; + di_DevLock : TSignalSemaphore; + di_EntryLock : TSignalSemaphore; + di_DeleteLock: TSignalSemaphore; + ); + end; + +type + PSegment = ^TSegment; + TSegment = packed record + seg_Next : DWord; { BPTR } + seg_UC : LongInt; + seg_Seg : DWord; { BPTR } + seg_Name : Array[0..3] Of Byte; + { * seg_Name continues * } + end; + + +const + CMD_SYSTEM = -1; + CMD_INTERNAL = -2; + CMD_NOTLOADED = -998; + CMD_DISABLED = -999; + + +type + PCommandLineInterface = ^TCommandLineInterface; + TCommandLineInterface = packed record + cli_Result2 : LongInt; + cli_SetName : DWord; { BSTR } + cli_CommandDir : DWord; { BPTR } + cli_ReturnCode : LongInt; + cli_CommandName : DWord; { BSTR } + cli_FailLevel : LongInt; + cli_Prompt : DWord; { BSTR } + cli_StandardInput : DWord; { BPTR } + cli_CurrentInput : DWord; { BPTR } + cli_CommandFile : DWord; { BSTR } + cli_Interactive : LongInt; + cli_Background : LongInt; + cli_CurrentOutput : DWord; { BPTR } + cli_DefaultStack : LongInt; + cli_StandardOutput: DWord; { BPTR } + cli_Module : DWord; { BPTR } + end; + +type + PDeviceList = ^TDeviceList; + TDeviceList = packed record + dl_Next : DWord; { BPTR } + dl_Type : LongInt; + dl_Task : PMsgPort; + dl_Lock : DWord; { BPTR } + dl_VolumeDate: TDateStamp; + dl_LockList : DWord; { BPTR } + dl_DiskType : LongInt; + dl_unused : LongInt; + dl_Name : DWord; { BSTR } + end; + +type + PDevInfo = ^TDevInfo; + TDevInfo = packed record + dvi_Next : DWord; { BPTR } + dvi_Type : LongInt; + dvi_Task : Pointer; + dvi_Lock : DWord; { BPTR } + dvi_Handler : DWord; { BSTR } + dvi_StackSize: LongInt; + dvi_Priority : LongInt; + dvi_Startup : LongInt; + dvi_SegList : DWord; { BPTR } + dvi_GlobVec : DWord; { BPTR } + dvi_Name : DWord; { BSTR } + end; + +type + PAssignList = ^TAssignList; + TAssignList = packed record + al_Next: PAssignList; + al_Lock: DWord; { BPTR } + end; + +type + PDOSList = ^TDOSList; + TDOSList = packed record + dol_Next: DWord; { BPTR } + dol_Type: LongInt; + dol_Task: PMsgPort; + dol_Lock: DWord; { BPTR } + case Byte of + 0: ( dol_handler : record + dol_Handler : DWord; { BSTR } + dol_StackSize: LongInt; + dol_Priority : LongInt; + dol_Startup : DWord; + dol_SegList : DWord; { BPTR } + dol_GlobVec : DWord; { BPTR } + end; + ); + 1: ( dol_volume : record + dol_VolumeDate: TDateStamp; + dol_LockList : DWord; { BPTR } + dol_DiskType : LongInt; + end; + ); + 2: ( dol_assign : record + dol_AssignName: PChar; + dol_List : PAssignList; + end; + ); + 3: ( dol_Misc: array[0..23] of Byte; + dol_Name: DWord; { BPTR } + ); + end; + + +const + DLT_DEVICE = 0; + DLT_DIRECTORY = 1; + DLT_VOLUME = 2; + DLT_LATE = 3; + DLT_NONBINDING = 4; + DLT_PRIVATE = -1; + + +type + PDevProc = ^TDevProc; + TDevProc = packed record + dvp_Port : PMsgPort; + dvp_Lock : DWord; { BPTR } + dvp_Flags : DWord; + dvp_DevNode: PDOSList; + end; + + +const + DVPB_UNLOCK = 0; + DVPF_UNLOCK = (1 Shl DVPB_UNLOCK); + + DVPB_ASSIGN = 1; + DVPF_ASSIGN = (1 Shl DVPB_ASSIGN); + +const + LDB_READ = 0; + LDF_READ = (1 Shl LDB_READ); + + LDB_WRITE = 1; + LDF_WRITE = (1 Shl LDB_WRITE); + + LDB_DEVICES = 2; + LDF_DEVICES = (1 Shl LDB_DEVICES); + + LDB_VOLUMES = 3; + LDF_VOLUMES = (1 Shl LDB_VOLUMES); + + LDB_ASSIGNS = 4; + LDF_ASSIGNS = (1 Shl LDB_ASSIGNS); + + LDB_ENTRY = 5; + LDF_ENTRY = (1 Shl LDB_ENTRY); + + LDB_DELETE = 6; + LDF_DELETE = (1 Shl LDB_DELETE); + + LDF_ALL = (LDF_DEVICES Or LDF_VOLUMES Or LDF_ASSIGNS); + + +type + PFileLock = ^TFileLock; + TFileLock = packed record + fl_Link : DWord; { BPTR } + fl_Key : LongInt; + fl_Access: LongInt; + fl_Task : PMsgPort; + fl_Volume: DWord; { BPTR } + end; + + +const + REPORT_STREAM = 0; + REPORT_TASK = 1; + REPORT_LOCK = 2; + REPORT_VOLUME = 3; + REPORT_INSERT = 4; + +const + ABORT_DISK_ERROR = 296; + ABORT_BUSY = 288; + +const + RUN_EXECUTE = -1; + RUN_SYSTEM = -2; + RUN_SYSTEM_ASYNCH = -3; + +const + ST_ROOT = 1; + ST_USERDIR = 2; + ST_SOFTLINK = 3; + ST_LINKDIR = 4; + ST_FILE = -3; + ST_LINKFILE = -4; + ST_PIPEFILE = -5; + + + +{ * dos asl definitions + ********************************************************************* + * } + + +type + PAChain = ^TAChain; + TAChain = packed record + an_Child : PAChain; + an_Parent: PAChain; + an_Lock : DWord; { BPTR } + an_Info : TFileInfoBlock; + an_Flags : ShortInt; + an_String: Array[0..0] Of Char; + { * an_String continues * } + end; + +type + PAnchorPath = ^TAnchorPath; + TAnchorPath = packed record + case Byte of + 0 : ( ap_First: PAChain; + ap_Last : PAChain; + ); + 1 : ( ap_Base : PAChain; + ap_Current : PAChain; + ap_BreakBits : LongInt; + ap_FoundBreak: LongInt; + ap_Flags : ShortInt; + ap_Reserved : ShortInt; + ap_Strlen : SmallInt; + ap_Info : TFileInfoBlock; + ap_Buf : Array[0..0] of Char; + { * an_Buf continues * } + ); + end; + + +const + APB_DOWILD = 0; + APF_DOWILD = (1 Shl APB_DOWILD); + + APB_ITSWILD = 1; + APF_ITSWILD = (1 Shl APB_ITSWILD); + + APB_DODIR = 2; + APF_DODIR = (1 Shl APB_DODIR); + + APB_DIDDIR = 3; + APF_DIDDIR = (1 Shl APB_DIDDIR); + + APB_NOMEMERR = 4; + APF_NOMEMERR = (1 Shl APB_NOMEMERR); + + APB_DODOT = 5; + APF_DODOT = (1 Shl APB_DODOT); + + APB_DirChanged = 6; + APF_DirChanged = (1 Shl APB_DirChanged); + + APB_FollowHLinks = 7; + APF_FollowHLinks = (1 Shl APB_FollowHLinks); + +const + APSB_EXTENDED = 15; + APSF_EXTENDED = (1 Shl APSB_EXTENDED); + + APEB_DoMultiAssigns = 0; + APEF_DoMultiAssigns = (1 Shl APEB_DoMultiAssigns); + + APEB_FutureExtension = 7; + APEF_FutureExtension = (1 Shl APEB_FutureExtension); + +const + DDB_PatternBit = 0; + DDF_PatternBit = (1 Shl DDB_PatternBit); + + DDB_ExaminedBit = 1; + DDF_ExaminedBit = (1 Shl DDB_ExaminedBit); + + DDB_Completed = 2; + DDF_Completed = (1 Shl DDB_Completed); + + DDB_AllBit = 3; + DDF_AllBit = (1 Shl DDB_AllBit); + + DDB_Single = 4; + DDF_Single = (1 Shl DDB_Single); + +const + P_ANY = $80; + P_SINGLE = $81; + P_ORSTART = $82; + P_ORNEXT = $83; + P_OREND = $84; + P_NOT = $85; + P_NOTEND = $86; + P_NOTCLASS = $87; + P_CLASS = $88; + P_REPBEG = $89; + P_REPEND = $8A; + P_STOP = $8B; + +const + COMPLEX_BIT = 1; + EXAMINE_BIT = 2; + +const + ERROR_BUFFER_OVERFLOW = 303; + ERROR_BREAK = 304; + ERROR_NOT_EXECUTABLE = 305; + + + +{ * dos hunk definitions + ********************************************************************* + * } + + +const + HUNK_UNIT = 999; + HUNK_NAME = 1000; + HUNK_CODE = 1001; + HUNK_DATA = 1002; + HUNK_BSS = 1003; + + HUNK_RELOC32 = 1004; + HUNK_ABSRELOC32 = HUNK_RELOC32; + + HUNK_RELOC16 = 1005; + HUNK_RELRELOC16 = HUNK_RELOC16; + + HUNK_RELOC8 = 1006; + HUNK_RELRELOC8 = HUNK_RELOC8; + + HUNK_EXT = 1007; + HUNK_SYMBOL = 1008; + HUNK_DEBUG = 1009; + HUNK_END = 1010; + HUNK_HEADER = 1011; + + HUNK_OVERLAY = 1013; + HUNK_BREAK = 1014; + + HUNK_DREL32 = 1015; + HUNK_DREL16 = 1016; + HUNK_DREL8 = 1017; + + HUNK_LIB = 1018; + HUNK_INDEX = 1019; + + HUNK_RELOC32SHORT = 1020; + + HUNK_RELRELOC32 = 1021; + HUNK_ABSRELOC16 = 1022; + +const + HUNKB_ADVISORY = 29; + HUNKB_CHIP = 30; + HUNKB_FAST = 31; + + HUNKF_ADVISORY = (1 Shl HUNKB_ADVISORY); + HUNKF_CHIP = (1 Shl HUNKB_CHIP); + HUNKF_FAST = (1 Shl HUNKB_FAST); + +const + EXT_SYMB = 0; + EXT_DEF = 1; + EXT_ABS = 2; + EXT_RES = 3; + + EXT_REF32 = 129; + EXT_ABSREF32 = EXT_REF32; + + EXT_COMMON = 130; + EXT_ABSCOMMON = EXT_COMMON; + + EXT_REF16 = 131; + EXT_RELREF16 = EXT_REF16; + + EXT_REF8 = 132; + EXT_RELREF8 = EXT_REF8; + + EXT_DEXT32 = 133; + EXT_DEXT16 = 134; + EXT_DEXT8 = 135; + + EXT_RELREF32 = 136; + EXT_RELCOMMON = 137; + + EXT_ABSREF16 = 138; + + EXT_ABSREF8 = 139; + + + +{ * dos ExAll definitions + ********************************************************************* + * } + + +const + ED_NAME = 1; + ED_TYPE = 2; + ED_SIZE = 3; + ED_PROTECTION = 4; + ED_DATE = 5; + ED_COMMENT = 6; + ED_OWNER = 7; + + +type + PExAllData = ^TExAllData; + TExAllData = packed record + ed_Next : PExAllData; + ed_Name : PChar; + ed_Type : LongInt; + ed_Size : Cardinal; + ed_Prot : Cardinal; + ed_Days : Cardinal; + ed_Mins : Cardinal; + ed_Ticks : Cardinal; + ed_Comment : PChar; + ed_OwnerUID: Word; + ed_OwnerGID: Word; + end; + +type + PExAllControl = ^TExAllControl; + TexAllControl = packed record + eac_Entries : Cardinal; + eac_LastKey : Cardinal; + eac_MatchString: PChar; + eac_MatchFunc : PHook; + + end; + + + +{ * dos record definitions + ********************************************************************* + * } + + +const + REC_EXCLUSIVE = 0; + REC_EXCLUSIVE_IMMED = 1; + REC_SHARED = 2; + REC_SHARED_IMMED = 3; + + +type + PRecordLock = ^TRecordLock; + TRecordLock = packed record + rec_FH : LongInt; + rec_Offset: Cardinal; + rec_Length: Cardinal; + rec_Mode : Cardinal; + end; + + + +{ * dos tag definitions (V50) + ********************************************************************* + * } + + +const + SYS_Dummy = (TAG_USER + 32); + SYS_Input = (SYS_Dummy + 1); + SYS_Output = (SYS_Dummy + 2); + SYS_Asynch = (SYS_Dummy + 3); + SYS_UserShell = (SYS_Dummy + 4); + SYS_CustomShell = (SYS_Dummy + 5); + + { *** V50 *** } + SYS_FilterTags = (SYS_Dummy + 6); { * filters the tags passed down to CreateNewProc(), default: TRUE * } + +const + NP_Dummy = (TAG_USER + 1000); + NP_Seglist = (NP_Dummy + 1); + NP_FreeSeglist = (NP_Dummy + 2); + NP_Entry = (NP_Dummy + 3); + NP_Input = (NP_Dummy + 4); + NP_Output = (NP_Dummy + 5); + NP_CloseInput = (NP_Dummy + 6); + NP_CloseOutput = (NP_Dummy + 7); + NP_Error = (NP_Dummy + 8); + NP_CloseError = (NP_Dummy + 9); + NP_CurrentDir = (NP_Dummy + 10); + NP_StackSize = (NP_Dummy + 11); + NP_Name = (NP_Dummy + 12); + NP_Priority = (NP_Dummy + 13); + NP_ConsoleTask = (NP_Dummy + 14); + NP_WindowPtr = (NP_Dummy + 15); + NP_HomeDir = (NP_Dummy + 16); + NP_CopyVars = (NP_Dummy + 17); + NP_Cli = (NP_Dummy + 18); + NP_Path = (NP_Dummy + 19); + NP_CommandName = (NP_Dummy + 20); + NP_Arguments = (NP_Dummy + 21); + + NP_NotifyOnDeath = (NP_Dummy + 22); + NP_Synchronous = (NP_Dummy + 23); + NP_ExitCode = (NP_Dummy + 24); + NP_ExitData = (NP_Dummy + 25); + + { *** V50 *** } + NP_SeglistArray = (NP_Dummy + 26); + NP_UserData = (NP_Dummy + 27); + NP_StartupMsg = (NP_Dummy + 28); { * PMessage, ReplyMsg'd at exit * } + NP_TaskMsgPort = (NP_Dummy + 29); { * ^PMsgPort, create MsgPort, automagic delete * } + + NP_CodeType = (NP_Dummy + 100); + NP_PPC_Arg1 = (NP_Dummy + 101); + NP_PPC_Arg2 = (NP_Dummy + 102); + NP_PPC_Arg3 = (NP_Dummy + 103); + NP_PPC_Arg4 = (NP_Dummy + 104); + NP_PPC_Arg5 = (NP_Dummy + 105); + NP_PPC_Arg6 = (NP_Dummy + 106); + NP_PPC_Arg7 = (NP_Dummy + 107); + NP_PPC_Arg8 = (NP_Dummy + 108); + NP_PPCStackSize = (NP_Dummy + 109); + +const + ADO_Dummy = (TAG_USER + 2000); + ADO_FH_Mode = (ADO_Dummy + 1); + + ADO_DirLen = (ADO_Dummy + 2); + ADO_CommNameLen = (ADO_Dummy + 3); + ADO_CommFileLen = (ADO_Dummy + 4); + ADO_PromptLen = (ADO_Dummy + 5); + + { *** V50 *** } + ADDS_Dummy = (TAG_USER + 3000); + ADDS_Name = (ADDS_Dummy + 1); { * Segment name * } + ADDS_Seglist = (ADDS_Dummy + 2); { * Seglist for this segment * } + ADDS_Filename = (ADDS_Dummy + 3); { * Name of the file to load when needed. Ignored if Seglist is given. * } + ADDS_Type = (ADDS_Dummy + 4); { * Segment type * } + +const + FNDS_Dummy = (TAG_USER + 3100); + FNDS_Name = (FNDS_Dummy + 1); { * Segment name * } + FNDS_From = (FNDS_Dummy + 2); { * Segment to start from * } + FNDS_System = (FNDS_Dummy + 3); { * Look for a system segment ? * } + FNDS_Load = (FNDS_Dummy + 4); { * Load the seglist if needed ? (Default: TRUE) * } + + + +{ * dos stdio definitions + ********************************************************************* + * } + + +const + BUF_LINE = 0; + BUF_FULL = 1; + BUF_NONE = 2; + +const + ENDSTREAMCH = -1; + + + +{ * dos env-var definitions + ********************************************************************* + * } + + +type + PLocalVar = ^TLocalVar; + TLocalVar = packed record + lv_Node : TNode; + lv_Flags: Word; + lv_Value: PChar; + lv_Len : Cardinal; + end; + + +const + LV_VAR = 0; + LV_ALIAS = 1; + +const + LVB_IGNORE = 7; + LVF_IGNORE = (1 Shl LVB_IGNORE); + + GVB_GLOBAL_ONLY = 8; + GVF_GLOBAL_ONLY = (1 Shl GVB_GLOBAL_ONLY); + + GVB_LOCAL_ONLY = 9; + GVF_LOCAL_ONLY = (1 Shl GVB_LOCAL_ONLY); + + GVB_BINARY_VAR = 10; + GVF_BINARY_VAR = (1 Shl GVB_BINARY_VAR); + + GVB_DONT_NULL_TERM = 11; + GVF_DONT_NULL_TERM = (1 Shl GVB_DONT_NULL_TERM); + + GVB_SAVE_VAR = 12; + GVF_SAVE_VAR = (1 Shl GVB_SAVE_VAR); + + + +{ * dos ReadArgs definitions + ********************************************************************* + * } + + +type + PCSource = ^TCSource; + TCSource = packed record + CS_Buffer: PChar; + CS_Length: LongInt; + CS_CurChr: LongInt; + end; + +type + PRDArgs = ^TRDArgs; + TRDArgs = packed record + RDA_Source : TCSource; + RDA_DAList : LongInt; + RDA_Buffer : PChar; + RDA_BufSiz : LongInt; + RDA_ExtHelp: PChar; + RDA_Flags : LongInt; + end; + + +const + RDAB_STDIN = 0; + RDAF_STDIN = (1 Shl RDAB_STDIN); + + RDAB_NOALLOC = 1; + RDAF_NOALLOC = (1 Shl RDAB_NOALLOC); + + RDAB_NOPROMPT = 2; + RDAF_NOPROMPT = (1 Shl RDAB_NOPROMPT); + +const + MAX_TEMPLATE_ITEMS = 100; + MAX_MULTIARGS = 128; + + + +{ * dos filehandler definitions + ********************************************************************* + * } + + +type + PDosEnvec = ^TDosEnvec; + TDosEnvec = packed record + de_TableSize : Cardinal; + de_SizeBlock : Cardinal; + de_SecOrg : Cardinal; + de_Surfaces : Cardinal; + de_SectorPerBlock: Cardinal; + de_BlocksPerTrack: Cardinal; + de_Reserved : Cardinal; + de_PreAlloc : Cardinal; + de_Interleave : Cardinal; + de_LowCyl : Cardinal; + de_HighCyl : Cardinal; + de_NumBuffers : Cardinal; + de_BufMemType : Cardinal; + de_MaxTransfer : Cardinal; + de_Mask : Cardinal; + de_BootPri : LongInt; + de_DosType : Cardinal; + de_Baud : Cardinal; + de_Control : Cardinal; + de_BootBlocks : Cardinal; + end; + + +const + DE_TABLESIZE = 0; + DE_SIZEBLOCK = 1; + DE_SECORG = 2; + DE_NUMHEADS = 3; + DE_SECSPERBLK = 4; + DE_BLKSPERTRACK = 5; + DE_RESERVEDBLKS = 6; + DE_PREFAC = 7; + DE_INTERLEAVE = 8; + DE_LOWCYL = 9; + DE_UPPERCYL = 10; + DE_NUMBUFFERS = 11; + DE_MEMBUFTYPE = 12; + DE_BUFMEMTYPE = 12; + DE_MAXTRANSFER = 13; + DE_MASK = 14; + DE_BOOTPRI = 15; + DE_DOSTYPE = 16; + DE_BAUD = 17; + DE_CONTROL = 18; + DE_BOOTBLOCKS = 19; + + +type + PFileSysStartupMsg = ^TFileSysStartupMsg; + TFileSysStartupMsg = packed record + fssm_Unit : Cardinal; + fssm_Device : LongInt; + fssm_Environ: LongInt; + fssm_Flags : Cardinal; + end; + +type + PDeviceNode = ^TDeviceNode; + TDeviceNode = packed record + dn_Next : LongInt; + dn_Type : Cardinal; + dn_Task : PMsgPort; + dn_Lock : LongInt; + dn_Handler : LongInt; + dn_StackSize: Cardinal; + dn_Priority : LongInt; + dn_Startup : LongInt; + dn_SegList : LongInt; + dn_GlobalVec: LongInt; + dn_Name : LongInt; + end; + + + +{ * dos notification definitions + ********************************************************************* + * } + + +const + NOTIFY_CLASS = $40000000; + NOTIFY_CODE = $1234; + + +type + PNotifyRequest = ^TNotifyRequest; + TNotifyRequest = packed record + nr_Name : PChar; + nr_FullName: PChar; + nr_UserData: Cardinal; + nr_Flags : Cardinal; + nr_stuff : record + case Byte of + 0 : ( nr_Msg : record + nr_Port: PMsgPort; + end ); + 1 : ( nr_Signal : record + nr_Task : PTask; + nr_SignalNum: Byte; + nr_pad : Array[0..2] Of Byte; + end ); + end; + nr_Reserved: Array[0..3] Of Cardinal; + nr_MsgCount: Cardinal; + nr_Handler : PMsgPort; + end; + +type + PNotifyMessage = ^TNotifyMessage; + TNotifyMessage = packed record + nm_ExecMessage: TMessage; + nm_Class : Cardinal; + nm_Code : Word; + nm_NReq : PNotifyRequest; + nm_DoNotTouch : Cardinal; + nm_DoNotTouch2: Cardinal; + end; + + +const + NRB_SEND_MESSAGE = 0; + NRB_SEND_SIGNAL = 1; + NRB_WAIT_REPLY = 3; + NRB_NOTIFY_INITIAL = 4; + + NRB_MAGIC = 31; + +const + NRF_SEND_MESSAGE = (1 Shl NRB_SEND_MESSAGE); + NRF_SEND_SIGNAL = (1 Shl NRB_SEND_SIGNAL); + NRF_WAIT_REPLY = (1 Shl NRB_WAIT_REPLY); + NRF_NOTIFY_INITIAL = (1 Shl NRB_NOTIFY_INITIAL); + + NRF_MAGIC = (1 Shl NRB_MAGIC); + +const + NR_HANDLER_FLAGS = $ffff0000; + + + +{ * dos.library segtracker include + ********************************************************************* + * } + + +const + SEG_SEM = 'SegTracker'; + + +type + PSegSem = ^TSegSem; + TSegSem = packed record + seg_Semaphore: TSignalSemaphore; + seg_Find : Procedure; { Name = seg_Find(REG(a0, ULONG Address), REG(a1, ULONG *SegNum), REG(a2, ULONG *Offset)) } + seg_List : TMinList; + end; + +type + PSegArray = ^TSegArray; + TSegArray = packed record + seg_Address: Cardinal; + seg_Size : Cardinal; + end; + +type + PSegNode = ^TSegNode; + TSegNode = packed record + seg_Node : TMinNode; + seg_Name : PChar; + seg_Array: Array[0..0] Of TSegArray; + end; + + +{.$include doslibd.inc} +{.$include doslibf.inc} + +{ dos.library functions } + +function Open(fname : PChar location 'd1'; + accessMode: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 30; + +function dosClose(fileh: LongInt location 'd1'): Boolean; +SysCall MOS_DOSBase 36; + +function dosRead(fileh : LongInt location 'd1'; + buffer: Pointer location 'd2'; + length: LongInt location 'd3'): LongInt; +SysCall MOS_DOSBase 42; + +function dosWrite(fileh : LongInt location 'd1'; + buffer: Pointer location 'd2'; + length: LongInt location 'd3'): LongInt; +SysCall MOS_DOSBase 48; + +function dosInput: LongInt; +SysCall MOS_DOSBase 54; + +function dosOutput: LongInt; +SysCall MOS_DOSBase 60; + +function dosSeek(fileh : LongInt location 'd1'; + position: LongInt location 'd2'; + posmode : LongInt location 'd3'): LongInt; +SysCall MOS_DOSBase 66; + +function dosDeleteFile(fname: PChar location 'd1'): Boolean; +SysCall MOS_DOSBase 72; + +function dosRename(oldName: PChar location 'd1'; + newName: PChar location 'd2'): LongInt; +SysCall MOS_DOSBase 78; + +function Lock(lname : PChar location 'd1'; + accessMode: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 84; + +procedure Unlock(lock: LongInt location 'd1'); +SysCall MOS_DOSBase 90; + +function DupLock(lock: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 096; + +function Examine(lock : LongInt location 'd1'; + fileInfoBlock: PFileInfoBlock location 'd2'): LongInt; +SysCall MOS_DOSBase 102; + +function ExNext(lock : LongInt location 'd1'; + fileInfoBlock: PFileInfoBlock location 'd2'): LongInt; +SysCall MOS_DOSBase 108; + +function Info(lock : LongInt location 'd1'; + parameterBlock: PInfoData location 'd2'): LongInt; +SysCall MOS_DOSBase 114; + +function dosCreateDir(dname: PChar location 'd1'): LongInt; +SysCall MOS_DOSBase 120; + +function CurrentDir(lock: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 126; + +function IoErr: LongInt; +SysCall MOS_DOSBase 132; + +function CreateProc(name : PChar location 'd1'; + pri : LongInt location 'd2'; + segList : LongInt location 'd3'; + stackSize: LongInt location 'd4'): PMsgPort; +SysCall MOS_DOSBase 138; + +procedure dosExit(returnCode: LongInt location 'd1'); +SysCall MOS_DOSBase 144; + +function LoadSeg(name: PChar location 'd1'): LongInt; +SysCall MOS_DOSBase 150; + +procedure UnLoadSeg(seglist: LongInt location 'd1'); +SysCall MOS_DOSBase 156; + +function DeviceProc(name: PChar location 'd1'): PMsgPort; +SysCall MOS_DOSBase 174; + +function SetComment(name : PChar location 'd1'; + comment: PChar location 'd2'): Boolean; +SysCall MOS_DOSBase 180; + +function SetProtection(name: PChar location 'd1'; + mask: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 186; + +function DateStamp(date: PDateStamp location 'd1'): PDateStamp; +SysCall MOS_DOSBase 192; + +procedure Delay(timeout: LongInt location 'd1'); +SysCall MOS_DOSBase 198; + +function WaitForChar(file1 : LongInt location 'd1'; + timeout: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 204; + +function ParentDir(lock: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 210; + +function IsInteractive(file1: LongInt location 'd1'): Boolean; +SysCall MOS_DOSBase 216; + +function Execute(string1: PChar location 'd1'; + file1 : LongInt location 'd2'; + file2 : LongInt location 'd3'): Boolean; +SysCall MOS_DOSBase 222; + +function AllocDosObject(type1: Cardinal location 'd1'; + tags : PTagItem location 'd2'): Pointer; +SysCall MOS_DOSBase 228; + +function AllocDosObjectTagList(type1: Cardinal location 'd1'; + tags : PTagItem location 'd2'): Pointer; +SysCall MOS_DOSBase 228; + +procedure FreeDosObject(type1: Cardinal location 'd1'; + ptr : Pointer location 'd2'); +SysCall MOS_DOSBase 234; + +function DoPkt(port : PMsgPort location 'd1'; + action: LongInt location 'd2'; + arg1 : LongInt location 'd3'; + arg2 : LongInt location 'd4'; + arg3 : LongInt location 'd5'; + arg4 : LongInt location 'd6'; + arg5 : LongInt location 'd7'): LongInt; +SysCall MOS_DOSBase 240; + +function DoPkt0(port : PMsgPort location 'd1'; + action: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 240; + +function DoPkt1(port : PMsgPort location 'd1'; + action: LongInt location 'd2'; + arg1 : LongInt location 'd3'): LongInt; +SysCall MOS_DOSBase 240; + +function DoPkt2(port : PMsgPort location 'd1'; + action: LongInt location 'd2'; + arg1 : LongInt location 'd3'; + arg2 : LongInt location 'd4'): LongInt; +SysCall MOS_DOSBase 240; + +function DoPkt3(port : PMsgPort location 'd1'; + action: LongInt location 'd2'; + arg1 : LongInt location 'd3'; + arg2 : LongInt location 'd4'; + arg3 : LongInt location 'd5'): LongInt; +SysCall MOS_DOSBase 240; + +function DoPkt4(port : PMsgPort location 'd1'; + action: LongInt location 'd2'; + arg1 : LongInt location 'd3'; + arg2 : LongInt location 'd4'; + arg3 : LongInt location 'd5'; + arg4 : LongInt location 'd6'): LongInt; +SysCall MOS_DOSBase 240; + +procedure SendPkt(dp : PDosPacket location 'd1'; + port : PMsgPort location 'd2'; + replyport: PMsgPort location 'd3'); +SysCall MOS_DOSBase 246; + +function WaitPkt: PDosPacket; +SysCall MOS_DOSBase 252; + +procedure ReplyPkt(dp : PDosPacket location 'd1'; + res1: LongInt location 'd2'; + res2: LongInt location 'd3'); +SysCall MOS_DOSBase 258; + +procedure AbortPkt(port: PMsgPort location 'd1'; + pkt : PDosPacket location 'd2'); +SysCall MOS_DOSBase 264; + +function LockRecord(fh : LongInt location 'd1'; + offset : Cardinal location 'd2'; + length : Cardinal location 'd3'; + mode : Cardinal location 'd4'; + timeout: Cardinal location 'd5'): Boolean; +SysCall MOS_DOSBase 270; + +function LockRecords(recArray: PRecordLock location 'd1'; + timeout : Cardinal location 'd2'): Boolean; +SysCall MOS_DOSBase 276; + +function UnLockRecord(fh : LongInt location 'd1'; + offset: Cardinal location 'd2'; + length: Cardinal location 'd3'): Boolean; +SysCall MOS_DOSBase 282; + +function UnLockRecords(recArray: PRecordLock location 'd1'): Boolean; +SysCall MOS_DOSBase 288; + +function SelectInput(fh: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 294; + +function SelectOutput(fh: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 300; + +function FGetC(fh: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 306; + +function FPutC(fh: LongInt location 'd1'; + ch: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 312; + +function UnGetC(fh : LongInt location 'd1'; + character: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 318; + +function FRead(fh : LongInt location 'd1'; + block : Pointer location 'd2'; + blocklen: Cardinal location 'd3'; + number : Cardinal location 'd4'): LongInt; +SysCall MOS_DOSBase 324; + +function FWrite(fh : LongInt location 'd1'; + block : Pointer location 'd2'; + blocklen: Cardinal location 'd3'; + number : Cardinal location 'd4'): LongInt; +SysCall MOS_DOSBase 330; + +function FGets(fh : LongInt location 'd1'; + buf : PChar location 'd2'; + buflen: Cardinal location 'd3'): PChar; +SysCall MOS_DOSBase 336; + +function FPuts(fh : LongInt location 'd1'; + str: PChar location 'd2'): LongInt; +SysCall MOS_DOSBase 342; + +procedure VFWritef(fh : LongInt location 'd1'; + format : PChar location 'd2'; + argarray: Pointer location 'd3'); +SysCall MOS_DOSBase 348; + +function VFPrintf(fh : LongInt location 'd1'; + format : PChar location 'd2'; + argarray: Pointer location 'd3'): LongInt; +SysCall MOS_DOSBase 354; + +function dosFlush(fh: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 360; + +function SetVBuf(fh : LongInt location 'd1'; + buff : PChar location 'd2'; + type1: LongInt location 'd3'; + size : LongInt location 'd4'): LongInt; +SysCall MOS_DOSBase 366; + +function DupLockFromFH(fh: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 372; + +function OpenFromLock(lock: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 378; + +function ParentOfFH(fh: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 384; + +function ExamineFH(fh : LongInt location 'd1'; + fib: PFileInfoBlock location 'd2'): Boolean; +SysCall MOS_DOSBase 390; + +function SetFileDate(name: PChar location 'd1'; + date: PDateStamp location 'd2'): Boolean; +SysCall MOS_DOSBase 396; + +function NameFromLock(lock : LongInt location 'd1'; + buffer: PChar location 'd2'; + len : LongInt location 'd3'): Boolean; +SysCall MOS_DOSBase 402; + +function NameFromFH(fh : LongInt location 'd1'; + buffer: PChar location 'd2'; + len : LongInt location 'd3'): Boolean; +SysCall MOS_DOSBase 408; + +function SplitName(name : PChar location 'd1'; + separator: Cardinal location 'd2'; + buf : PChar location 'd3'; + oldpos : LongInt location 'd4'; + size : LongInt location 'd5'): SmallInt; +SysCall MOS_DOSBase 414; + +function SameLock(lock1: LongInt location 'd1'; + lock2: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 420; + +function SetMode(fh : LongInt location 'd1'; + mode: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 426; + +function ExAll(lock : LongInt location 'd1'; + buffer : PExAllData location 'd2'; + size : LongInt location 'd3'; + data : LongInt location 'd4'; + control: PExAllControl location 'd5'): Boolean; +SysCall MOS_DOSBase 432; + +function ReadLink(port : PMsgPort location 'd1'; + lock : LongInt location 'd2'; + path : PChar location 'd3'; + buffer: PChar location 'd4'; + size : Cardinal location 'd5'): Boolean; +SysCall MOS_DOSBase 438; + +function MakeLink(name: PChar location 'd1'; + dest: LongInt location 'd2'; + soft: LongInt location 'd3'): Boolean; +SysCall MOS_DOSBase 444; + +function ChangeMode(type1 : LongInt location 'd1'; + fh : LongInt location 'd2'; + newmode: LongInt location 'd3'): Boolean; +SysCall MOS_DOSBase 450; + +function SetFileSize(fh : LongInt location 'd1'; + pos : LongInt location 'd2'; + mode: LongInt location 'd3'): LongInt; +SysCall MOS_DOSBase 456; + +function SetIoErr(result: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 462; + +function Fault(code : LongInt location 'd1'; + header: PChar location 'd2'; + buffer: PChar location 'd3'; + len : LongInt location 'd4'): Boolean; +SysCall MOS_DOSBase 468; + +function PrintFault(code : LongInt location 'd1'; + header: PChar location 'd2'): Boolean; +SysCall MOS_DOSBase 474; + +function ErrorReport(code : LongInt location 'd1'; + type1 : LongInt location 'd2'; + arg1 : Cardinal location 'd3'; + device: PMsgPort location 'd4'): Boolean; +SysCall MOS_DOSBase 480; + +function Cli: PCommandLineInterface; +SysCall MOS_DOSBase 492; + +function CreateNewProc(tags: PTagItem location 'd1'): PProcess; +SysCall MOS_DOSBase 498; + +function CreateNewProcTagList(tags: PTagItem location 'd1'): PProcess; +SysCall MOS_DOSBase 498; + +function RunCommand(seg : LongInt location 'd1'; + stack : LongInt location 'd2'; + paramptr: PChar location 'd3'; + paramlen: LongInt location 'd4'): LongInt; +SysCall MOS_DOSBase 504; + +function GetConsoleTask: PMsgPort; +SysCall MOS_DOSBase 510; + +function SetConsoleTask(task: PMsgPort location 'd1'): PMsgPort; +SysCall MOS_DOSBase 516; + +function GetFileSysTask: PMsgPort; +SysCall MOS_DOSBase 522; + +function SetFileSysTask(task: PMsgPort location 'd1'): PMsgPort; +SysCall MOS_DOSBase 528; + +function GetArgStr: PChar; +SysCall MOS_DOSBase 534; + +function SetArgStr(str: PChar location 'd1'): Boolean; +SysCall MOS_DOSBase 540; + +function FindCliProc(num: Cardinal location 'd1'): PProcess; +SysCall MOS_DOSBase 546; + +function MaxCli: Cardinal; +SysCall MOS_DOSBase 552; + +function SetCurrentDirName(name: PChar location 'd1'): Boolean; +SysCall MOS_DOSBase 558; + +function GetCurrentDirName(buf: PChar location 'd1'; + len: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 564; + +function SetProgramName(name: PChar location 'd1'): Boolean; +SysCall MOS_DOSBase 570; + +function GetProgramName(buf: PChar location 'd1'; + len: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 576; + +function SetPrompt(name: PChar location 'd1'): Boolean; +SysCall MOS_DOSBase 582; + +function GetPrompt(buf: PChar location 'd1'; + len: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 588; + +function SetProgramDir(lock: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 594; + +function GetProgramDir: LongInt; +SysCall MOS_DOSBase 600; + +function SystemTagList(command: PChar location 'd1'; + tags : PTagItem location 'd2'): LongInt; +SysCall MOS_DOSBase 606; + +function dosSystem(command: PChar location 'd1'; + tags : PTagItem location 'd2'): LongInt; +SysCall MOS_DOSBase 606; + +function AssignLock(name: PChar location 'd1'; + lock: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 612; + +function AssignLate(name: PChar location 'd1'; + path: PChar location 'd2'): Boolean; +SysCall MOS_DOSBase 618; + +function AssignPath(name: PChar location 'd1'; + path: PChar location 'd2'): Boolean; +SysCall MOS_DOSBase 624; + +function AssignAdd(name: PChar location 'd1'; + lock: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 630; + +function RemAssignList(name: PChar location 'd1'; + lock: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 636; + +function GetDeviceProc(name: PChar location 'd1'; + dp : PDevProc location 'd2'): PDevProc; +SysCall MOS_DOSBase 642; + +procedure FreeDeviceProc(dp: PDevProc location 'd1'); +SysCall MOS_DOSBase 648; + +function LockDosList(flags: Cardinal location 'd1'): PDosList; +SysCall MOS_DOSBase 654; + +procedure UnLockDosList(flags: Cardinal location 'd1'); +SysCall MOS_DOSBase 660; + +function AttemptLockDosList(flags: Cardinal location 'd1'): PDosList; +SysCall MOS_DOSBase 666; + +function RemDosEntry(dlist: PDosList location 'd1'): Boolean; +SysCall MOS_DOSBase 672; + +function AddDosEntry(dlist: PDosList location 'd1'): LongInt; +SysCall MOS_DOSBase 678; + +function FindDosEntry(dlist: PDosList location 'd1'; + name : PChar location 'd2'; + flags: Cardinal location 'd3'): PDosList; +SysCall MOS_DOSBase 684; + +function NextDosEntry(dlist: PDosList location 'd1'; + flags: Cardinal location 'd2'): PDosList; +SysCall MOS_DOSBase 690; + +function MakeDosEntry(name : PChar location 'd1'; + type1: LongInt location 'd2'): PDosList; +SysCall MOS_DOSBase 696; + +procedure FreeDosEntry(dlist: PDosList location 'd1'); +SysCall MOS_DOSBase 702; + +function IsFileSystem(name: PChar location 'd1'): Boolean; +SysCall MOS_DOSBase 708; + +function Format(filesystem: PChar location 'd1'; + volumename: PChar location 'd2'; + dostype : Cardinal location 'd3'): Boolean; +SysCall MOS_DOSBase 714; + +function Relabel(drive : PChar location 'd1'; + newname: PChar location 'd2'): Boolean; +SysCall MOS_DOSBase 720; + +function Inhibit(name : PChar location 'd1'; + onoff: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 726; + +function AddBuffers(name : PChar location 'd1'; + number: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 732; + +function CompareDates(date1: PDateStamp location 'd1'; + date2: PDateStamp location 'd2'): LongInt; +SysCall MOS_DOSBase 738; + +function DateToStr(datetime: _PDateTime location 'd1'): Boolean; +SysCall MOS_DOSBase 744; + +function StrToDate(datetime: _PDateTime location 'd1'): Boolean; +SysCall MOS_DOSBase 750; + +function InternalLoadSeg(fh : LongInt location 'd0'; + table : LongInt location 'a0'; + var funcarray: LongInt location 'a1'; + var stack : LongInt location 'a2'): LongInt; +SysCall MOS_DOSBase 756; + +function NewLoadSeg(file1: PChar location 'd1'; + tags : PTagItem location 'd2'): LongInt; +SysCall MOS_DOSBase 768; + +function NewLoadSegTagList(file1: PChar location 'd1'; + tags : PTagItem location 'd2'): LongInt; +SysCall MOS_DOSBase 768; + +function AddSegment(name : PChar location 'd1'; + seg : LongInt location 'd2'; + system: LongInt location 'd3'): Boolean; +SysCall MOS_DOSBase 774; + +function FindSegment(name : PChar location 'd1'; + seg : PSegment location 'd2'; + system: LongInt location 'd3'): PSegment; +SysCall MOS_DOSBase 780; + +function RemSegment(seg: PSegment location 'd1'): Boolean; +SysCall MOS_DOSBase 786; + +function CheckSignal(mask: LongInt location 'd1'): LongInt; +SysCall MOS_DOSBase 792; + +function ReadArgs(arg_template: PChar location 'd1'; + var array1 : LongInt location 'd2'; + args : PRDArgs location 'd3'): PRDArgs; +SysCall MOS_DOSBase 798; + +function FindArg(keyword : PChar location 'd1'; + arg_template: PChar location 'd2'): LongInt; +SysCall MOS_DOSBase 804; + +function ReadItem(name : PChar location 'd1'; + maxchars: LongInt location 'd2'; + cSource : PCSource location 'd3'): LongInt; +SysCall MOS_DOSBase 810; + +function StrToLong(string1 : PChar location 'd1'; + var value: LongInt location 'd2'): LongInt; +SysCall MOS_DOSBase 816; + +function MatchFirst(pat : PChar location 'd1'; + anchor: PAnchorPath location 'd2'): LongInt; +SysCall MOS_DOSBase 822; + +function MatchNext(anchor: PAnchorPath location 'd1'): LongInt; +SysCall MOS_DOSBase 828; + +procedure MatchEnd(anchor: PAnchorPath location 'd1'); +SysCall MOS_DOSBase 834; + +function ParsePattern(pat : PChar location 'd1'; + buf : PChar location 'd2'; + buflen: LongInt location 'd3'): LongInt; +SysCall MOS_DOSBase 840; + +function MatchPattern(pat: PChar location 'd1'; + str: PChar location 'd2'): Boolean; +SysCall MOS_DOSBase 846; + +procedure FreeArgs(args: pRDArgs location 'd1'); +SysCall MOS_DOSBase 858; + +function FilePart(path: PChar location 'd1'): PChar; +SysCall MOS_DOSBase 870; + +function PathPart(path: PChar location 'd1'): PChar; +SysCall MOS_DOSBase 876; + +function AddPart(dirname: PChar location 'd1'; + filename: PChar location 'd2'; + size : Cardinal location 'd3'): Boolean; +SysCall MOS_DOSBase 882; + +function StartNotify(notify: PNotifyRequest location 'd1'): Boolean; +SysCall MOS_DOSBase 888; + +procedure EndNotify(notify: PNotifyRequest location 'd1'); +SysCall MOS_DOSBase 894; + +function SetVar(name : PChar location 'd1'; + buffer: PChar location 'd2'; + size : LongInt location 'd3'; + flags : LongInt location 'd4'): Boolean; +SysCall MOS_DOSBase 900; + +function GetVar(name : PChar location 'd1'; + buffer: PChar location 'd2'; + size : LongInt location 'd3'; + flags : LongInt location 'd4'): LongInt; +SysCall MOS_DOSBase 906; + +function DeleteVar(name : PChar location 'd1'; + flags: Cardinal location 'd2'): Boolean; +SysCall MOS_DOSBase 912; + +function FindVar(name : PChar location 'd1'; + type1: Cardinal location 'd2'): PLocalVar; +SysCall MOS_DOSBase 918; + +function CliInitNewcli(dp: PDosPacket location 'a0'): LongInt; +SysCall MOS_DOSBase 930; + +function CliInitRun(dp: PDosPacket location 'a0'): LongInt; +SysCall MOS_DOSBase 936; + +function WriteChars(buf : PChar location 'd1'; + buflen: Cardinal location 'd2'): LongInt; +SysCall MOS_DOSBase 942; + +function PutStr(str: PChar location 'd1'): LongInt; +SysCall MOS_DOSBase 948; + +function VPrintf(format : PChar location 'd1'; + argarray: Pointer location 'd2'): LongInt; +SysCall MOS_DOSBase 954; + +function ParsePatternNoCase(pat : PChar location 'd1'; + buf : PChar location 'd2'; + buflen: LongInt location 'd3'): LongInt; +SysCall MOS_DOSBase 966; + +function MatchPatternNoCase(pat: PChar location 'd1'; + str: PChar location 'd2'): Boolean; +SysCall MOS_DOSBase 972; + +function SameDevice(lock1: LongInt location 'd1'; + lock2: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 984; + +procedure ExAllEnd(lock : LongInt location 'd1'; + buffer : PExAllData location 'd2'; + size : LongInt location 'd3'; + data : LongInt location 'd4'; + control: PExAllControl location 'd5'); +SysCall MOS_DOSBase 990; + +function SetOwner(name : PChar location 'd1'; + owner_info: LongInt location 'd2'): Boolean; +SysCall MOS_DOSBase 996; + +function AddSegmentTagList(tags: PTagItem location 'a0'): LongInt; +SysCall MOS_DOSBase 1002; + +function FindSegmentTagList(tags: PTagItem location 'a0'): PSegment; +SysCall MOS_DOSBase 1008; + + + + + +{ * dos global definitions (V50) + ********************************************************************* + * } + +function BADDR(x: LongInt): Pointer; Inline; +function MKBADDR(x: Pointer): LongInt; Inline; + + +{ * dos stdio definitions + ********************************************************************* + * } + +function ReadChar: LongInt; Inline; +function WriteChar(ch: Char): LongInt; Inline; +function UnReadChar(ch: Char): LongInt; Inline; +function ReadChars(buf: Pointer; num: LongInt): LongInt; Inline; +function dosReadLn(buf: PChar; num: LongInt): PChar; Inline; +function WriteStr(str: PChar): LongInt; Inline; +procedure VWritef(format: PChar; argv: Pointer); Inline; + + +{ * calls with tags workarounds (should be removed later) + ********************************************************************* + * } + +function CreateNewProcTags(tags: array of dword): PProcess; Inline; + + + +implementation + + +{ * dos stdio definitions + ********************************************************************* + * } + +function ReadChar: LongInt; Inline; +begin + ReadChar:=FGetC(dosInput); +end; + +function WriteChar(ch: Char): LongInt; Inline; +begin + WriteChar:=FPutC(dosOutput,Byte(ch)); +end; + +function UnReadChar(ch: Char): LongInt; Inline; +begin + UnReadChar:=UnGetC(dosInput,Byte(ch)); +end; + +function ReadChars(buf: Pointer; num: LongInt): LongInt; Inline; +begin + ReadChars:=FRead(dosInput,buf,1,num); +end; + +function dosReadLn(buf: PChar; num: LongInt): PChar; Inline; +begin + dosReadLn:=FGets(dosInput,buf,num); +end; + +function WriteStr(str: PChar): LongInt; Inline; +begin + WriteStr:=FPuts(dosOutput,str); +end; + +procedure VWritef(format: PChar; argv: Pointer); Inline; +begin + VFWritef(dosOutput,format,argv); +end; + + + +{ * dos global definitions (V50) + ********************************************************************* + * } + + +function BADDR(x: LongInt): Pointer; Inline; +begin + BADDR:=Pointer(x Shl 2); +end; + +function MKBADDR(x: Pointer): LongInt; Inline; +begin + MKBADDR:=LongInt(PtrUInt(x)) Shr 2; +end; + + + +{ * calls with tags workarounds (should be removed later) + ********************************************************************* + * } + +function CreateNewProcTags(tags: array of DWord): PProcess; Inline; +begin + CreateNewProcTags:=CreateNewProc(@tags); +end; + + +begin + DosBase:=MOS_DOSBase; +end. diff --git a/rtl/morphos/aboxlib.pas b/packages/morphunits/src/amigalib.pas similarity index 99% rename from rtl/morphos/aboxlib.pas rename to packages/morphunits/src/amigalib.pas index e1389af954..968a956d8e 100644 --- a/rtl/morphos/aboxlib.pas +++ b/packages/morphunits/src/amigalib.pas @@ -16,7 +16,7 @@ **********************************************************************} -unit aboxlib; +unit amigalib; interface diff --git a/rtl/morphos/asl.pas b/packages/morphunits/src/asl.pas similarity index 99% rename from rtl/morphos/asl.pas rename to packages/morphunits/src/asl.pas index b3e0434d11..ae06289bb7 100644 --- a/rtl/morphos/asl.pas +++ b/packages/morphunits/src/asl.pas @@ -24,7 +24,7 @@ unit asl; interface -uses exec, utility, {workbench,} graphics; +uses exec, utility, {workbench,} agraphics; {************************************************************************} diff --git a/rtl/morphos/clipboard.pas b/packages/morphunits/src/clipboard.pas similarity index 100% rename from rtl/morphos/clipboard.pas rename to packages/morphunits/src/clipboard.pas diff --git a/rtl/morphos/datatypes.pas b/packages/morphunits/src/datatypes.pas similarity index 99% rename from rtl/morphos/datatypes.pas rename to packages/morphunits/src/datatypes.pas index e0fb00f361..58ac85e53f 100644 --- a/rtl/morphos/datatypes.pas +++ b/packages/morphunits/src/datatypes.pas @@ -24,8 +24,8 @@ unit datatypes; interface -uses exec, doslib, intuition, utility, - graphics{, iffparse, amigaprinter, prtbase}; +uses exec, amigados, intuition, utility, + agraphics{, iffparse, amigaprinter, prtbase}; const {***************************************************************************} diff --git a/packages/morphunits/src/exec.pas b/packages/morphunits/src/exec.pas new file mode 100644 index 0000000000..dcf91eeb30 --- /dev/null +++ b/packages/morphunits/src/exec.pas @@ -0,0 +1,2377 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. + + exec.library interface unit for MorphOS/PowerPC + + MorphOS port was done on a free Pegasos II/G4 machine + provided by Genesi S.a.r.l. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +unit exec; + +interface + +var + ExecBase: Pointer; + +{.$include execd.inc} +{.$include execf.inc} + +{ * emulinterface consts from MorphOS SDK * } + +const + TRAP_MASK = $00ff; + TRAP_AREA_START = $ff00; { * $ff00 .. $ffff area * } + TRAP_LIB = $ff00; + TRAP_LIB_QUICK = $ff01; + TRAP_LIBNR = $ff05; + TRAP_LIBNR_QUICK = $ff06; + TRAP_ISYNC = $ff0f; + TRAP_SYNC = $ff10; + TRAP_EIEIO = $ff11; + TRAP_LIBSR = $ff12; + TRAP_LIBSRNR = $ff13; + TRAP_LIBD0_D1 = $ff14; + TRAP_LIBRESTORE = $ff15; + TRAP_LIBD0D1SR = $ff17; + TRAP_LIBD0D1A0A1SR = $ff18; + +const + EMULTAG_NAME = $0; { * Gives back a Name Ptr * } + EMULTAG_VERSION = $1; { * Gives back a Version * } + EMULTAG_REVISION = $2; { * Gives back a Revision * } + EMULTAG_OPCODETABLE = $3; { * Gives back the 16 Bit Opcodetable Ptr or NULL * } + EMULTAG_TYPE = $4; { * Gives back the emulation type * } + EMULTAG_EMULHANDLE = $5; { * Gives back the EmulHandle Ptr * } + EMULTAG_EMULHANDLESIZE = $6; { * Gives back the EmulHandle Size * } + EMULTAG_SUPERHANDLE = $7; { * Gives back the SuperHandle Ptr * } + EMULTAG_SUPERHANDLESIZE = $8; { * Gives back the SuperHandle Size * } + +{ * emulinterface structures from MorphOS SDK * } + +type + PEmulLibEntry = ^TEmulLibEntry; + TEmulLibEntry = packed record + Trap : Word; + Extension: Word; { * MUST be set to 0 if you create it by hand * } + Func : Pointer; + end; + + +{ * "dummy" definitions from utility, which we can't include here because it + * would create a circular dependency (KB) } +type + PTagItem = Pointer; + PHook = Pointer; + + +{ * exec node definitions (V50) + ********************************************************************* + * } + + +type + PNode = ^TNode; + TNode = packed record + ln_Succ: PNode; + ln_Pred: PNode; + ln_Type: Byte; + ln_Pri : ShortInt; + ln_Name: PChar; + end; + +type + PMinNode = ^TMinNode; + TMinNode = packed record + mln_Succ: PMinNode; + mln_Pred: PMinNode; + end; + + +const + NT_UNKNOWN = 0; + NT_TASK = 1; + NT_INTERRUPT = 2; + NT_DEVICE = 3; + NT_MSGPORT = 4; + NT_MESSAGE = 5; + NT_FREEMSG = 6; + NT_REPLYMSG = 7; + NT_RESOURCE = 8; + NT_LIBRARY = 9; + NT_MEMORY = 10; + NT_SOFTINT = 11; + NT_FONT = 12; + NT_PROCESS = 13; + NT_SEMAPHORE = 14; + NT_SIGNALSEM = 15; + NT_BOOTNODE = 16; + NT_KICKMEM = 17; + NT_GRAPHICS = 18; + NT_DEATHMESSAGE = 19; + NT_USER = 254; + NT_EXTENDED = 255; + + + +{ * exec list definitions (V50) + ********************************************************************* + * } + + +type + PList = ^TList; + TList = packed record + lh_Head : PNode; + lh_Tail : PNode; + lh_TailPred: PNode; + lh_Type : Byte; + lh_pad : Byte; + end; + +type + PMinList = ^TMinList; + TMinList = packed record + mlh_Head : PMinNode; + mlh_Tail : PMinNode; + mlh_TailPred: PMinNode; + end; + + + +{ * exec alert definitions (V50) + ********************************************************************* + * } + + +const + ACPU_BusErr = $80000002; + ACPU_AddressErr = $80000003; + ACPU_InstErr = $80000004; + ACPU_DivZero = $80000005; + ACPU_CHK = $80000006; + ACPU_TRAPV = $80000007; + ACPU_PrivErr = $80000008; + ACPU_Trace = $80000009; + ACPU_LineA = $8000000A; + ACPU_LineF = $8000000B; + ACPU_Format = $8000000E; + ACPU_Spurious = $80000018; + ACPU_AutoVec1 = $80000019; + ACPU_AutoVec2 = $8000001A; + ACPU_AutoVec3 = $8000001B; + ACPU_AutoVec4 = $8000001C; + ACPU_AutoVec5 = $8000001D; + ACPU_AutoVec6 = $8000001E; + ACPU_AutoVec7 = $8000001F; + + AT_DeadEnd = $80000000; + AT_Recovery = $00000000; + + AG_NoMemory = $00010000; + AG_MakeLib = $00020000; + AG_OpenLib = $00030000; + AG_OpenDev = $00040000; + AG_OpenRes = $00050000; + AG_IOError = $00060000; + AG_NoSignal = $00070000; + AG_BadParm = $00080000; + AG_CloseLib = $00090000; + AG_CloseDev = $000A0000; + AG_ProcCreate = $000B0000; + AG_MsgPortNotEmpty = $000C0000 { * V50 * }; + + AO_ExecLib = $00008001; + AO_GraphicsLib = $00008002; + AO_LayersLib = $00008003; + AO_Intuition = $00008004; + AO_MathLib = $00008005; + AO_DOSLib = $00008007; + AO_RAMLib = $00008008; + AO_IconLib = $00008009; + AO_ExpansionLib = $0000800A; + AO_DiskfontLib = $0000800B; + AO_UtilityLib = $0000800C; + AO_KeyMapLib = $0000800D; + + AO_AudioDev = $00008010; + AO_ConsoleDev = $00008011; + AO_GamePortDev = $00008012; + AO_KeyboardDev = $00008013; + AO_TrackDiskDev = $00008014; + AO_TimerDev = $00008015; + + AO_CIARsrc = $00008020; + AO_DiskRsrc = $00008021; + AO_MiscRsrc = $00008022; + + AO_BootStrap = $00008030; + AO_Workbench = $00008031; + AO_DiskCopy = $00008032; + AO_GadTools = $00008033; + AO_Unknown = $00008035; + + + { * + * exec.library + * } +const + AN_ExecLib = $01000000; + AN_ExcptVect = $01000001; + AN_BaseChkSum = $01000002; + AN_LibChkSum = $01000003; + + AN_MemCorrupt = $81000005; + AN_IntrMem = $81000006; + AN_InitAPtr = $01000007; + AN_SemCorrupt = $01000008; + + AN_FreeTwice = $01000009; + AN_BogusExcpt = $8100000A; + AN_IOUsedTwice = $0100000B; + AN_MemoryInsane = $0100000C; + + AN_IOAfterClose = $0100000D; + AN_StackProbe = $0100000E; + AN_BadFreeAddr = $0100000F; + AN_BadSemaphore = $01000010; + + { * + * graphics.library + * } +const + AN_GraphicsLib = $02000000; + AN_GfxNoMem = $82010000; + AN_GfxNoMemMspc = $82010001; + AN_LongFrame = $82010006; + AN_ShortFrame = $82010007; + AN_TextTmpRas = $02010009; + AN_BltBitMap = $8201000A; + AN_RegionMemory = $8201000B; + AN_MakeVPort = $82010030; + AN_GfxNewError = $0200000C; + AN_GfxFreeError = $0200000D; + + AN_GfxNoLCM = $82011234; + + AN_ObsoleteFont = $02000401; + + { * + * layers.library + * } +const + AN_LayersLib = $03000000; + AN_LayersNoMem = $83010000; + + { * + * intuition.library + * } +const + AN_Intuition = $04000000; + AN_GadgetType = $84000001; + AN_BadGadget = $04000001; + AN_CreatePort = $84010002; + AN_ItemAlloc = $04010003; + AN_SubAlloc = $04010004; + AN_PlaneAlloc = $84010005; + AN_ItemBoxTop = $84000006; + AN_OpenScreen = $84010007; + AN_OpenScrnRast = $84010008; + AN_SysScrnType = $84000009; + AN_AddSWGadget = $8401000A; + AN_OpenWindow = $8401000B; + AN_BadState = $8400000C; + AN_BadMessage = $8400000D; + AN_WeirdEcho = $8400000E; + AN_NoConsole = $8400000F; + AN_NoISem = $04000010; + AN_ISemOrder = $04000011; + + { * + * math.library + * } +const + AN_MathLib = $05000000; + + { * + * dos.library + * } +const + AN_DOSLib = $07000000; + AN_StartMem = $07010001; + AN_EndTask = $07000002; + AN_QPktFail = $07000003; + AN_AsyncPkt = $07000004; + AN_FreeVec = $07000005; + AN_DiskBlkSeq = $07000006; + AN_BitMap = $07000007; + AN_KeyFree = $07000008; + AN_BadChkSum = $07000009; + AN_DiskError = $0700000A; + AN_KeyRange = $0700000B; + AN_BadOverlay = $0700000C; + AN_BadInitFunc = $0700000D; + AN_FileReclosed = $0700000E; + + { * + * ramlib.library + * } +const + AN_RAMLib = $08000000; + AN_BadSegList = $08000001; + + { * + * icon.library + * } +const + AN_IconLib = $09000000; + + { * + * expansion.library + * } +const + AN_ExpansionLib = $0A000000; + AN_BadExpansionFree = $0A000001; + + { * + * diskfont.library + * } +const + AN_DiskfontLib = $0B000000; + + { * + * audio.device + * } +const + AN_AudioDev = $10000000; + + { * + * console.device + * } +const + AN_ConsoleDev = $11000000; + AN_NoWindow = $11000001; + + { * + * gameport.device + * } +const + AN_GamePortDev = $12000000; + + { * + * keyboard.device + * } +const + AN_KeyboardDev = $13000000; + + { * + * trackdisk.device + * } +const + AN_TrackDiskDev = $14000000; + AN_TDCalibSeek = $14000001; + AN_TDDelay = $14000002; + + { * + * timer.device + * } +const + AN_TimerDev = $15000000; + AN_TMBadReq = $15000001; + AN_TMBadSupply = $15000002; + + { * + * cia.resource + * } +const + AN_CIARsrc = $20000000; + + { * + * disk.resource + * } +const + AN_DiskRsrc = $21000000; + AN_DRHasDisk = $21000001; + AN_DRIntNoAct = $21000002; + + { * + * misc.resource + * } +const + AN_MiscRsrc = $22000000; + + { * + * bootstrap + * } +const + AN_BootStrap = $30000000; + AN_BootError = $30000001; + + { * + * Workbench + * } +const + AN_Workbench = $31000000; + AN_NoFonts = $B1000001; + AN_WBBadStartupMsg1 = $31000001; + AN_WBBadStartupMsg2 = $31000002; + AN_WBBadIOMsg = $31000003; + AN_WBReLayoutToolMenu = $B1010009; + + { * + * DiskCopy + * } +const + AN_DiskCopy = $32000000; + + { * + * toolkit for Intuition + * } +const + AN_GadTools = $33000000; + + { * + * System utility library + * } +const + AN_UtilityLib = $34000000; + + { * + * For use by any application that needs it + * } +const + AN_Unknown = $35000000; + + + +{ * exec error definitions (V50) + ********************************************************************* + * } + + +const + IOERR_OPENFAIL = (-1); + IOERR_ABORTED = (-2); + IOERR_NOCMD = (-3); + IOERR_BADLENGTH = (-4); + IOERR_BADADDRESS = (-5); + IOERR_UNITBUSY = (-6); + IOERR_SELFTEST = (-7); + IOERR_NOMEMORY = (-8); + + + +{ * exec resident definitions (V50) + ********************************************************************* + * } + + +type + PResident = ^TResident; + TResident = packed record + rt_MatchWord: Word; + rt_MatchTag : PResident; + rt_EndSkip : Pointer; + rt_Flags : Byte; + rt_Version : Byte; + rt_Type : Byte; + rt_Pri : Byte; + rt_Name : PChar; + rt_IdString : PChar; + rt_Init : Pointer; + { * Only valid when RTF_EXTENDED is set + * } + rt_Revision : Word; { * Revision Entry * } + rt_Tags : Pointer; + end; + + +const + RTC_MATCHWORD = $4AFC; + + RTF_AUTOINIT = (1 Shl 7); + RTF_EXTENDED = (1 Shl 6); { * structure extension is valid * } + { * rt_Init points to a PPC function which must be defined as + * + * struct Library* LIB_Init(struct Library *MyLibBase, + * BPTR SegList, + * struct ExecBase *SysBase) + * } + RTF_PPC = (1 Shl 3); + RTF_AFTERDOS = (1 Shl 2); + RTF_SINGLETASK = (1 Shl 1); + RTF_COLDSTART = (1 Shl 0); + + RTW_NEVER = 0; + RTW_COLDSTART = 1; + + + +{ * exec memory definitions (V50) + ********************************************************************* + * } + + +type + PMemChunk = ^TMemChunk; + TMemChunk = packed record + nc_Next : PMemChunk; + nc_Bytes: DWord; + end; + +type + PMemHeader = ^TMemHeader; + TMemHeader = packed record + mh_Node : TNode; + mh_Attributes: Word; + mh_First : PMemChunk; + mh_Lower : Pointer; + mh_Upper : Pointer; + mh_Free : DWord; + end; + +type + PMemEntry = ^TMemEntry; + TMemEntry = packed record + me_Un: packed record + case Byte of + 0 : (meu_Regs: DWord); + 1 : (meu_Addr: Pointer) + end; + me_Length: DWord; + end; + +type + PMemList = ^TMemList; + TMemList = packed record + ml_Node : TNode; + ml_NumEntries: Word; + ml_ME : PMemEntry; + end; + + +const + MEMF_ANY = 0; + MEMF_PUBLIC = (1 Shl 0); + MEMF_CHIP = (1 Shl 1); + MEMF_FAST = (1 Shl 2); + MEMF_LOCAL = (1 Shl 8); + MEMF_24BITDMA = (1 Shl 9); + MEMF_KICK = (1 Shl 10); + MEMF_SWAP = (1 Shl 11); { * Memory that can be swapped out to disk * } + + MEMF_CLEAR = (1 Shl 16); + MEMF_LARGEST = (1 Shl 17); + MEMF_REVERSE = (1 Shl 18); + MEMF_TOTAL = (1 Shl 19); + MEMF_SEM_PROTECTED = (1 Shl 20); { * Pools: semaphore protection * } + MEMF_NO_EXPUNGE = (1 Shl 31); + + MEM_BLOCKSIZE = 8; + MEM_BLOCKMASK = (MEM_BLOCKSIZE - 1); + + +type + PMemHandlerData = ^TMemHandlerData; + TMemHandlerData = packed record + memh_RequestSize : DWord; + memh_RequestFlags: DWord; + memh_Flags : DWord; + end; + + +const + MEMHF_RECYCLE = (1 Shl 0); + + MEM_DID_NOTHING = 0; + MEM_ALL_DONE = -1; + MEM_TRY_AGAIN = 1; + + + +{ * exec port definitions (V50) + ********************************************************************* + * } + + +type + PMsgPort = ^TMsgPort; + TMsgPort = packed record + mp_Node : TNode; + mp_Flags : Byte; + mp_SigBit : Byte; + mp_SigTask: Pointer; + mp_MsgList: TList; + end; + + +const + PF_ACTION = 3; + PA_SIGNAL = 0; + PA_SOFTINT = 1; + PA_IGNORE = 2; + + +type + PMessage = ^TMessage; + TMessage = packed record + mn_Node : TNode; + mn_ReplyPort: PMsgPort; + mn_Length : Word; + end; + + + +{ * exec task definitions (V50) + ********************************************************************* + * } + + +type + PTask = ^TTask; + TTask = packed record + tc_Node : TNode; + tc_Flags : Byte; + tc_State : Byte; + tc_IDNestCnt: ShortInt; + tc_TDNestCnt: ShortInt; + tc_SigAlloc : DWord; + tc_SigWait : DWord; + tc_SigRecvd : DWord; + tc_SigExcept: DWord; + {$IF 0} + tc_TrapAlloc: Word; + tc_TrapAble : Word; + {$ELSE} + tc_ETask: Pointer; + {$ENDIF} + tc_ExceptData: Pointer; + tc_ExceptCode: Pointer; + tc_TrapData : Pointer; + tc_TrapCode : Pointer; + tc_SPReg : Pointer; + tc_SPLower : Pointer; + tc_SPUpper : Pointer; + tc_Switch : Pointer; { *** OBSOLETE *** } + tc_Launch : Pointer; { *** OBSOLETE *** } + tc_MemEntry : TList; + tc_UserData : Pointer; + end; + + +const + TB_PROCTIME = 0; + TB_ETASK = 3; + TB_STACKCHK = 4; + TB_EXCEPT = 5; + TB_SWITCH = 6; + TB_LAUNCH = 7; + + TF_PROCTIME = (1 Shl TB_PROCTIME); + TF_ETASK = (1 Shl TB_ETASK); + TF_STACKCHK = (1 Shl TB_STACKCHK); + TF_EXCEPT = (1 Shl TB_EXCEPT); + TF_SWITCH = (1 Shl TB_SWITCH); + TF_LAUNCH = (1 Shl TB_LAUNCH); + + TS_INVALID = 0; + TS_ADDED = 1; + TS_RUN = 2; + TS_READY = 3; + TS_WAIT = 4; + TS_EXCEPT = 5; + TS_REMOVED = 6; + + SIGB_ABORT = 0; + SIGB_CHILD = 1; + SIGB_BLIT = 4; + SIGB_SINGLE = 4; + SIGB_INTUITION = 5; + SIGB_NET = 7; + SIGB_DOS = 8; + + SIGF_ABORT = (1 Shl SIGB_ABORT); + SIGF_CHILD = (1 Shl SIGB_CHILD); + SIGF_BLIT = (1 Shl SIGB_BLIT); + SIGF_SINGLE = (1 Shl SIGB_SINGLE); + SIGF_INTUITION = (1 Shl SIGB_INTUITION); + SIGF_NET = (1 Shl SIGB_NET); + SIGF_DOS = (1 Shl SIGB_DOS); + + +type + PTaskTrapMessage = ^TTaskTrapMessage; + TTaskTrapMessage = packed record + Message: TMessage; { * Message Header * } + Task : TTask; { * connected Task * } + Version: DWord; { * version of the structure * } + TType : DWord; { * Exception Type * } + DAR : DWord; { * Exception Address Register * } + DSISR : DWord; { * Exception DSISR Reg * } + + { * This is undiscovered land... + * never assume a size of this structure + * } + end; + + +const + VERSION_TASKTRAPMESSAGE = $0; + + +type + PETask = ^TETask; + TETask = packed record + Message : TMessage; + Parent : PTask; + UniqueID : DWord; + Children : TMinList; + TrapAlloc: Word; + TrapAble : Word; + Result1 : DWord; + Result2 : Pointer; + MsgPort : TMsgPort; + + { * Don't touch!!!!!!!!!..there'll be an interface + * sooner than later. + * New Entries...most of the above entries + * are only their for structure compatability. + * They have no meaning as the OS never supported + * them. + * } + + { * A Task Pool for the task. + * } + MemPool: Pointer; + + { * PPC's Stack Lower Ptr + * The initial stack is allocated through + * AllocVec, so a FreeVec(ETask^.PPCSPLower); + * would work. + * If you use PPCStackSwap you must allocate + * your stack block with AllocVec(); + * } + PPCSPLower: Pointer; + + { * PPC's Stack Upper Ptr + * } + PPCSPUpper : Pointer; + PPCRegFrame: Pointer; + PPCLibData : Pointer; + + { * On a PPC exception this msgport + * is sent an exception msg... + * the task is stopped until somebody + * wakes it up again. + * (asynchron exception interface) + * If this Port is NULL the message is + * sent to SysBase->ex_PPCTrapMsgPort. + * } + PPCTrapMsgPort: PMsgPort; + PPCTrapMessage: PTaskTrapMessage; + + { * This is undiscovered land... + * never assume a size of this structure + * } + end; + + +type + PTaskInitExtension = ^TTaskInitExtension; + TTaskInitExtension = packed record + { * Must be filled with TRAP_PPCTASK + * } + Trap : Word; + Extension: Word; { * Must be set to 0 * } + Tags : Pointer; + end; + +{ * This is normally in utility headers, but in Pascal that would + * cause a circular dependency, so have it duplicated here... (KB) } +const + TAG_USER = 1 Shl 31; + +const + TASKTAG_DUMMY = (TAG_USER + $100000); + + { * Ptr to an ULONG Errorfield where a better error description + * can be stored. + * } + TASKTAG_ERROR = (TASKTAG_DUMMY + $0); + + { * Code type + * can be stored. + * } + TASKTAG_CODETYPE = (TASKTAG_DUMMY + $1); + + { * Start PC + * code must be of TASKTAG_CODETYPE + * } + TASKTAG_PC = (TASKTAG_DUMMY + $2); + + { * Final PC + * code must be of TASKTAG_CODETYPE + * } + TASKTAG_FINALPC = (TASKTAG_DUMMY + $3); + + { * Stacksize...Default 8192 + * } + TASKTAG_STACKSIZE = (TASKTAG_DUMMY + $4); + + { * Std Stacksize... + * Default(use the stack defined by tc_SPLower..tc_SPUpper) + * } + TASKTAG_STACKSIZE_M68K = (TASKTAG_DUMMY + $5); + + { * specify task name, name is copied + * } + TASKTAG_NAME = (TASKTAG_DUMMY + $6); + + { * tc_UserData + * } + TASKTAG_USERDATA = (TASKTAG_DUMMY + $7); + + { * Task priority + * } + TASKTAG_PRI = (TASKTAG_DUMMY + $8); + + { * Pool's Puddlesize + * } + TASKTAG_POOLPUDDLE = (TASKTAG_DUMMY + $9); + + { * Pool's ThreshSize + * } + TASKTAG_POOLTHRESH = (TASKTAG_DUMMY + $a); + + { * PPC First Argument..gpr3 + * } + TASKTAG_PPC_ARG1 = (TASKTAG_DUMMY + $10); + + { * PPC First Argument..gpr4 + * } + TASKTAG_PPC_ARG2 = (TASKTAG_DUMMY + $11); + + { * PPC First Argument..gpr5 + * } + TASKTAG_PPC_ARG3 = (TASKTAG_DUMMY + $12); + + { * PPC First Argument..gpr6 + * } + TASKTAG_PPC_ARG4 = (TASKTAG_DUMMY + $13); + + { * PPC First Argument..gpr7 + * } + TASKTAG_PPC_ARG5 = (TASKTAG_DUMMY + $14); + + { * PPC First Argument..gpr8 + * } + TASKTAG_PPC_ARG6 = (TASKTAG_DUMMY + $15); + + { * PPC First Argument..gpr9 + * } + TASKTAG_PPC_ARG7 = (TASKTAG_DUMMY + $16); + + { * PPC First Argument..gpr10 + * } + TASKTAG_PPC_ARG8 = (TASKTAG_DUMMY + $17); + + { * + * Startup message to be passed to task/process, ReplyMsg'd at RemTask() + * ti_Data: struct Message * + * } + TASKTAG_STARTUPMSG = (TASKTAG_DUMMY + $18); + + { * + * Create internal MsgPort for task/process, deleted at RemTask() + * ti_Data: struct MsgPort **, can be NULL + * } + TASKTAG_TASKMSGPORT = (TASKTAG_DUMMY + $19); + + +const + CODETYPE_M68K = $0; + { * + * System V4 ABI + * } + CODETYPE_PPC = $1; + +const + TASKERROR_OK = 0; + TASKERROR_NOMEMORY = 1; + + + { * + * Stack swap structure as passed to StackSwap() and PPCStackSwap() + * } +type + PStackSwapStruct = ^TStackSwapStruct; + TStackSwapStruct = packed record + stk_Lower : Pointer; { * Lowest byte of stack * } + stk_Upper : Pointer; { * Upper end of stack (size + Lowert) * } + stk_Pointer: Pointer; { * Stack pointer at switch point * } + end; + +type + PPPCStackSwapArgs = ^TPPCStackSwapArgs; + TPPCStackSwapArgs = packed record + Args: Array[0..7] Of DWord; { * The C register arguments from gpr3..gpr11 * } + end; + + + { * + * NewGetTaskAttrsA(), NewSetTaskAttrsA() tags + * } +const + TASKINFOTYPE_ALLTASK = $0; + TASKINFOTYPE_NAME = $1; + TASKINFOTYPE_PRI = $2; + TASKINFOTYPE_TYPE = $3; + TASKINFOTYPE_STATE = $4; + TASKINFOTYPE_FLAGS = $5; + TASKINFOTYPE_SIGALLOC = $6; + TASKINFOTYPE_SIGWAIT = $7; + TASKINFOTYPE_SIGRECVD = $8; + TASKINFOTYPE_SIGEXCEPT = $9; + TASKINFOTYPE_EXCEPTDATA = $a; + TASKINFOTYPE_EXCEPTCODE = $b; + TASKINFOTYPE_TRAPDATA = $c; + TASKINFOTYPE_TRAPCODE = $d; + TASKINFOTYPE_STACKSIZE_M68K = $e; + TASKINFOTYPE_STACKSIZE = $f; + TASKINFOTYPE_USEDSTACKSIZE_M68K = $10; + TASKINFOTYPE_USEDSTACKSIZE = $11; + TASKINFOTYPE_TRAPMSGPORT = $12; + TASKINFOTYPE_STARTUPMSG = $13; + TASKINFOTYPE_TASKMSGPORT = $14; + TASKINFOTYPE_POOLPTR = $15; + TASKINFOTYPE_POOLMEMFLAGS = $16; + TASKINFOTYPE_POOLPUDDLESIZE = $17; + TASKINFOTYPE_POOLTHRESHSIZE = $18; + + { * + * Task Scheduler statistics (exec 50.42) + * } + TASKINFOTYPE_NICE = $19; + TASKINFOTYPE_AGETICKS = $1a; + TASKINFOTYPE_CPUTIME = $1b; + TASKINFOTYPE_LASTSECCPUTIME = $1c; + TASKINFOTYPE_RECENTCPUTIME = $1d; + TASKINFOTYPE_VOLUNTARYCSW = $1e; + TASKINFOTYPE_INVOLUNTARYCSW = $1f; + TASKINFOTYPE_LASTSECVOLUNTARYCSW = $20; + TASKINFOTYPE_LASTSECINVOLUNTARYCSW = $21; + { * Added in exec 50.45 * } + TASKINFOTYPE_LAUNCHTIMETICKS = $22; + TASKINFOTYPE_LAUNCHTIMETICKS1978 = $23; + TASKINFOTYPE_PID = $24; + + TASKINFOTYPE_68K_NEWFRAME = $50; + + TASKINFOTYPE_PPC_SRR0 = $100; + TASKINFOTYPE_PPC_SRR1 = $101; + TASKINFOTYPE_PPC_LR = $102; + TASKINFOTYPE_PPC_CTR = $103; + TASKINFOTYPE_PPC_CR = $104; + TASKINFOTYPE_PPC_XER = $105; + TASKINFOTYPE_PPC_GPR = $106; + TASKINFOTYPE_PPC_FPR = $107; + TASKINFOTYPE_PPC_FPSCR = $108; + TASKINFOTYPE_PPC_VSCR = $109; + TASKINFOTYPE_PPC_VMX = $10a; + TASKINFOTYPE_PPC_VSAVE = $10b; + TASKINFOTYPE_PPC_FRAME = $10c; + TASKINFOTYPE_PPC_FRAMESIZE = $10d; + TASKINFOTYPE_PPC_NEWFRAME = $10e; + + TASKINFOTAG_DUMMY = (TAG_USER + $110000); + { * Used with TASKINFOTYPE_ALLTASK + * } + TASKINFOTAG_HOOK = (TASKINFOTAG_DUMMY + $0); + { * Used with TASKINFOTYPE_PPC_GPR,TASKINFOTYPE_PPC_FPR,TASKINFOTYPE_PPC_VMX + * to define the copy area + * } + TASKINFOTAG_REGSTART = (TASKINFOTAG_DUMMY + $1); + { * Used with TASKINFOTYPE_PPC_GPR,TASKINFOTYPE_PPC_FPR,TASKINFOTYPE_PPC_VMX + * to define the copy area + * } + TASKINFOTAG_REGCOUNT = (TASKINFOTAG_DUMMY + $2); + + + { * + * NewSetTaskAttrsA(..,@TaskFrame68k,sizeof(TTaskFrame68k),TASKINFOTYPE_68K_NEWFRAME,...); + * } +type + PTaskFrame68k = ^TTaskFrame68k; + TTaskFrame68k = packed record + PC: Pointer; + SR: Word; + Xn: Array[0..14] Of LongInt; + end; + + + { * + * Don't depend on these + * } +const + DEFAULT_PPCSTACKSIZE = 32768; + DEFAULT_M68KSTACKSIZE = 2048; + DEFAULT_TASKPUDDLESIZE = 4096; + DEFAULT_TASKTHRESHSIZE = 4096; + + +{ * exec interrupt definitions (V50) + ********************************************************************* + * } + + +type + PInterrupt = ^TInterrupt; + TInterrupt = packed record + is_Node: TNode; + is_Data: Pointer; + is_Code: Pointer; + end; + +type + PIntVector = ^TIntVector; + TIntVector = packed record + iv_Data: Pointer; + iv_Code: Pointer; + iv_Node: PNode; + end; + +type + PSoftIntList = ^TSoftIntList; + TSoftIntList = packed record + sh_List: TList; + sh_Pad : Word; + end; + + +const + SIH_PRIMASK = $f0; + + INTB_NMI = 15; + INTF_NMI = (1 Shl INTB_NMI); + + + +{ * exec semaphore definitions (V50) + ********************************************************************* + * } + + + { * + * Shouldn't be available public.. + * } +type + PSemaphoreRequest = ^TSemaphoreRequest; + TSemaphoreRequest = packed record + sr_Link : TMinNode; + sr_Waiter: PTask; + end; + +type + PSignalSemaphore = ^TSignalSemaphore; + TSignalSemaphore = packed record + ss_Link : TNode; + ss_NestCount : SmallInt; + ss_WaitQueue : TMinList; + ss_MultipleLink: TSemaphoreRequest; + ss_Owner : PTask; + ss_QueueCount : SmallInt; + end; + +type + PSemaphoreMessage = ^TSemaphoreMessage; + TSemaphoreMessage = packed record + ssm_Message : TMessage; + ssm_Semaphore: PSignalSemaphore; + end; + + +const + SM_SHARED = 1; + SM_EXCLUSIVE = 0; + + + +{ * exec machine definitions (V50) + ********************************************************************* + * } + + +const + MACHINE_M68k = $0; + MACHINE_PPC = $1; + MACHINE_NO = $ffffffff; + + + +{ * exec library definitions (V50) + ********************************************************************* + * } + + +const + LIB_VECTSIZE = 6; + LIB_RESERVED = 4; + LIB_BASE = (-LIB_VECTSIZE); + LIB_USERDEF = (LIB_BASE - (LIB_RESERVED * LIB_VECTSIZE)); + LIB_NONSTD = (LIB_USERDEF); + + LIB_OPEN = -6; + LIB_CLOSE = -12; + LIB_EXPUNGE = -18; + LIB_EXTFUNC = -24; + LIB_GETQUERYATTR = -24; { * LIBF_QUERY * } + + +type + PLibrary = ^TLibrary; + TLibrary = packed record + lib_Node : TNode; + lib_Flags : Byte; + lib_pad : Byte; + lib_MegSize : Word; + lib_PosSize : Word; + lib_Version : Word; + lib_Revision: Word; + lib_IdString: PChar; + lib_Sum : DWord; + lib_OpenCnt : Word; + end; + + +const + LIBF_SUMMING = (1 Shl 0); + LIBF_CHANGED = (1 Shl 1); + LIBF_SUMUSED = (1 Shl 2); + LIBF_DELEXP = (1 Shl 3); + { * + * private + * } + LIBF_RAMLIB = (1 Shl 4); + { * + * Needs to be set if the GetQueryAttr function is legal + * } + LIBF_QUERYINFO = (1 Shl 5); + { * + * The remaining bits are reserved and aren`t allowed to be touched + * } + + + { * NewSetFunction extensions + * } +const + SETFUNCTAG_Dummy = (TAG_USER +$01000000); + + { * Set the machine type of the function + * Default is 68k + * } + SETFUNCTAG_MACHINE = (SETFUNCTAG_Dummy + $1); + + { * Function type specifier + * } + SETFUNCTAG_TYPE = (SETFUNCTAG_Dummy + $2); + + { * ID String + * } + SETFUNCTAG_IDNAME = (SETFUNCTAG_Dummy + $3); + + { * + * Set to TRUE if the replaced function will never be used + * again. + * } + SETFUNCTAG_DELETE = (SETFUNCTAG_Dummy + $4); + + + { * See emul/emulinterface.h for more informations + * } + + { * Save Emulation PPC Registers + * Call Function + * Restore Emulation PPC Registers + * REG_D0 = Result + * } +const + SETFUNCTYPE_NORMAL = 0; + { * Call Function + * Must use the global register settings of the emulation + * REG_D0 = Result + * } + SETFUNCTYPE_QUICK = 1; + { * Save Emulation PPC Registers + * Call Function + * Restore Emulation PPC Registers + * No Result + * Needed to replace functions like + * forbid,obtainsemaphores which are + * defined as trashing no registers + * } + SETFUNCTYPE_NORMALNR = 2; + { * Call Function + * Must use the global register settings of the emulation + * No Result + * Needed to replace functions like + * forbid,obtainsemaphores which are + * defined as trashing no registers + * } + SETFUNCTYPE_QUICKNR = 3; + SETFUNCTYPE_NORMALSR = 4; + SETFUNCTYPE_NORMALSRNR = 5; + SETFUNCTYPE_NORMALD0_D1 = 6; + SETFUNCTYPE_NORMALRESTORE = 7; + SETFUNCTYPE_SYSTEMV = 8; + SETFUNCTYPE_NORMALD0D1SR = 9; + SETFUNCTYPE_NORMALD0D1A0A1SR = 10; + + + { * CreateLibrary extensions + * } + LIBTAG_BASE = (TAG_USER + $01000100); + + { * + * Function/Vector Array + * } + LIBTAG_FUNCTIONINIT = (LIBTAG_BASE+$0); + { * + * Struct Init + * } + LIBTAG_STRUCTINIT = (LIBTAG_BASE+$1); + { * + * Library Init + * } + LIBTAG_LIBRARYINIT = (LIBTAG_BASE+$2); + { * + * Init Code Type + * } + LIBTAG_MACHINE = (LIBTAG_BASE+$3); + { * + * Library Base Size + * } + LIBTAG_BASESIZE = (LIBTAG_BASE+$4); + { * + * SegList Ptr + * } + LIBTAG_SEGLIST = (LIBTAG_BASE+$5); + { * + * Library Priority + * } + LIBTAG_PRI = (LIBTAG_BASE+$6); + { * + * Library Type..Library,Device,Resource,whatever + * } + LIBTAG_TYPE = (LIBTAG_BASE+$7); + { * + * Library Version + * (UWORD) + * } + LIBTAG_VERSION = (LIBTAG_BASE+$8); + { * + * Library Flags + * } + LIBTAG_FLAGS = (LIBTAG_BASE+$9); + { * + * Library Name + * } + LIBTAG_NAME = (LIBTAG_BASE+$a); + { * + * Library IDString + * } + LIBTAG_IDSTRING = (LIBTAG_BASE+$b); + { * + * AddDevice(),AddLibrary(),AddResource().. + * depends on LibNode.ln_Type field which + * can be set by some Init function, Struct Scripts + * or LIBTAG_TYPE. + * If you set LIBTAG_PUBLIC the library + * is added to the right system list. + * } + LIBTAG_PUBLIC = (LIBTAG_BASE+$c); + { * + * Library Revision + * (UWORD) + * } + LIBTAG_REVISION = (LIBTAG_BASE+$d); + { * + * Library QueryInfo Flag + * (Boolean) + * } + LIBTAG_QUERYINFO = (LIBTAG_BASE+$e); + + { * Private + * don`t touch...floating design + * } +type + PFuncEntry = ^TFuncEntry; + TFuncEntry = packed record + EmulLibEntry : TEmulLibEntry; + OldFunction : Pointer; { * Needed for bookkeeping * } + end; + + PFuncOldEntry = ^TFuncOldEntry; + TFuncOldEntry = packed record + Command : Word; + FuncEntry: PFuncEntry; + end; + + + { * + * EmulLibEntry.Extension + * } +const + FUNCENTRYEXTF_LIBRARY = $1; { * Entry created by the OS * } + + { * + * Functionarray first ULONG ID defines the format + * of the functionarray for MakeFunctions()/MakeLibrary(). + * + * If there`s not such id the functionarray is a + * 32Bit 68k function ptr array. + * (ULONG) $ffffffff stops it + * } + + { * 68k 16bit relative functionarray ptrs + * (UWORD) $ffff stops it + * } + + FUNCARRAY_16BIT_OLD = $ffffffff; + + { * PPC 32bit functionarray ptrs + * (ULONG) $ffff stops it + * } + FUNCARRAY_32BIT_NATIVE = $fffefffe; + + { * Starts a functionarray block. + * This way it`s possible to mix 68k and PPC + * function definitions. + * BASE: + * FUNCTIONARRAY_BEGIN + * FUNCARRAY_32BIT_NATIVE + * FUNC0 + * FUNC1 + * . + * FUNCn + * $ffffffff + * FUNCn+1 (No ID->32Bit 68k) + * FUNCn+2 + * . + * FUNCm + * $ffffffff + * FUNCARRAY_16BIT_OLD + * FUNCm+1-BASE + * FUNCm+2-BASE + * . + * FUNCo-BASE + * $ffff + * FUNCTIONARRAY_END + * } + + FUNCARRAY_BEGIN = $fffdfffd; + + { * Ends a functionarray block. + * } + FUNCARRAY_END = $fffcfffc; + + { * PPC 32bit Quick functionarray ptrs. + * These functions must comply to the emulation's + * register layout which is defined inside the + * emul/emulregs.h. That means the register layout + * MUST also be valid during interrupts/task switches. + * You can't just destroy A7(r31), SR or PC. + * + * You shouldn't use this for any normal code + * as there's no real reason to do so. If you + * really think you need to use it please ask + * us first on the dev mailinglist. + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_QUICK_NATIVE = $fffbfffb; + + { * PPC 32bit QuickNR(No Result) functionarray ptrs + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_QUICKNR_NATIVE = $fffafffa; + + { * PPC 32bit no result functionarray ptrs + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_NR_NATIVE = $fff9fff9; + + { * PPC 32bit SR functionarray ptrs + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_SR_NATIVE = $fff8fff8; + + { * PPC 32bit SR(no result) functionarray ptrs + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_SRNR_NATIVE = $fff7fff7; + + { * PPC 32bit D0_D1 functionarray ptrs + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_D0D1_NATIVE = $fff6fff6; + + { * PPC 32bit Restore1 functionarray ptrs + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_RESTORE_NATIVE = $fff5fff5; + + { * PPC 32bit SystemV ABI entry + * these function entries DON'T comply + * to the amiga register modell REG_D0-A6 + * but comply to the PPC SystemV ABI so + * you can directly use PPC C Argument + * parsing. That way you're also not limited + * with the register count. + * Such library functions can't be used + * by 68k emulation, so you can only use + * them for new code. + * As we allow these new functions to be + * used with old functions we keep the + * 6 bytes function entry steps in the library. + * Layout is + * + * CODE_JMP, &FuncEntry ; Old Entry + * CODE_ILLEGAL, Function ; SystemV ABI Entry + * + * + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_SYSTEMV = $fff4fff4; + + { * PPC 32bit D0D1SR functionarray ptrs + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_D0D1SR_NATIVE = $fff3fff3; + + { * PPC 32bit D0D1A0A1SR functionarray ptrs + * (ULONG) $ffffffff stops it + * } + FUNCARRAY_32BIT_D0D1A0A1SR_NATIVE = $fff2fff2; + + + +{ * exec device definitions (V50) + ********************************************************************* + * } + + +type + PDevice = ^TDevice; + TDevice = packed record + dd_Library: TLibrary; + end; + +type + PUnit = ^TUnit; + TUnit = packed record + unit_MsgPort: TMsgPort; + unit_flags : Byte; + unit_pad : Byte; + unit_OpenCnt: Word; + end; + + +const + UNITF_ACTIVE = (1 Shl 0); + UNITF_INTASK = (1 Shl 1); + + + +{ * exec io definitions (V50) + ********************************************************************* + * } + + +type + PIORequest = ^TIORequest; + TIORequest = packed record + io_Message: TMessage; + io_Device : PDevice; + io_Unit : PUnit; + io_Command: Word; + io_Flags : Byte; + io_Error : ShortInt; + end; + +type + PIOStdReq = ^TIOStdReq; + TIOStdReq = packed record + io_Message: TMessage; + io_Device : PDevice; + io_Unit : PUnit; + io_Command: Word; + io_Flags : Byte; + io_Error : ShortInt; + io_Actual : DWord; + io_Length : DWord; + io_Data : Pointer; + io_Offset : DWord; + end; + + +const + DEV_BEGINIO = -30; + DEV_ABORTIO = -36; + + IOB_QUICK = 0; + IOF_QUICK = (1 Shl IOB_QUICK); + + CMD_INVALID = 0; + CMD_RESET = 1; + CMD_READ = 2; + CMD_WRITE = 3; + CMD_UPDATE = 4; + CMD_CLEAR = 5; + CMD_STOP = 6; + CMD_START = 7; + CMD_FLUSH = 8; + CMD_NONSTD = 9; + + + +{ * exec include (V50) + ********************************************************************* + * } + + +type + PExecBase = ^TExecBase; + TExecBase = packed record + LIbNode : TLibrary; + SoftVer : Word; + LowMemChkSum: SmallInt; + ChkBase : DWord; + ColdCapture : Pointer; + CoolCapture : Pointer; + WarmCapture : Pointer; + SysStkUpper : Pointer; + SysStkLower : Pointer; + MaxLocMem : DWord; + DebugEntry : Pointer; + DebugData : Pointer; + AlertData : Pointer; + MaxExtMem : Pointer; + ChkSum : Word; + IntVects : Array[0..15] Of TIntVector; + ThisTask : PTask; + IdleCount : DWord; + DispCount : DWord; + Quantum : Word; + Elapsed : Word; + SysFlags : Word; + IDNestCnt : ShortInt; + TDNestCnt : ShortInt; + AttnFlags : Word; + AttnResched : Word; + ResModules : Pointer; + + TaskTrapCode : Pointer; + TaskExceptCode: Pointer; + TaskExitCode : Pointer; + TaskSigAlloc : DWord; + TaskTrapAlloc : Word; + + MemList : TList; + ResourceList: TList; + DeviceList : TList; + IntrList : TList; + LibList : TList; + PortList : TList; + TaskReady : TList; + TaskWait : TList; + SoftInts : Array[0..5] Of TSoftIntList; + LastAlert : Array[0..3] Of LongInt; + + VBlankFrequency : Byte; + PowerSupplyFrequency: Byte; + SemaphoreList : TList; + KickMemPtr : Pointer; + KickTagPtr : Pointer; + KickCheckSum : Pointer; + ex_Pad0 : Word; + ex_LaunchPoint : DWord; + ex_RamLibPrivate : Pointer; + ex_EClockFrequency : DWord; + ex_CacheControl : DWord; + ex_TaskID : DWord; + + { * New ABox Emulation Entries + * } + ex_EmulHandleSize : DWord; { * PPC EmulHandleSize..*private* * } + ex_PPCTrapMsgPort : PMsgPort; { * PPC ABox Exception MsgPort..*private* * } + ex_Reserved1 : Array[0..2] Of DWord; + ex_MMULock : Pointer; + ex_PatchPool : Pointer; { * PatchPool Ptr needed by SetFunction..*private* * } + ex_PPCTaskExitCode : Pointer; { * PPC Task exit function * } + ex_DebugFlags : DWord; { * Exec Debug Flags..*private* * } + + ex_MemHandlers : TMinList; + ex_MemHandler : Pointer; + end; + + + { * + * Outdated 68k cpu informations + * + * } +const + AFB_68010 = 0; + AFB_68020 = 1; + AFB_68030 = 2; + AFB_68040 = 3; + AFB_68881 = 4; + AFB_68882 = 5; + AFB_FPU40 = 6; + AFB_68060 = 7; + AFB_PRIVATE = 15; + + AFF_68010 = (1 Shl AFB_68010); + AFF_68020 = (1 Shl AFB_68020); + AFF_68030 = (1 Shl AFB_68030); + AFF_68040 = (1 Shl AFB_68040); + AFF_68881 = (1 Shl AFB_68881); + AFF_68882 = (1 Shl AFB_68882); + AFF_FPU40 = (1 Shl AFB_FPU40); + AFF_68060 = (1 Shl AFB_68060); + AFF_PRIVATE = (1 Shl AFB_PRIVATE); + + { * + * Outdated 68k cache functionality + * Mostly without function. + * } +const + CACRF_EnableI = (1 Shl 0); + CACRF_FreezeI = (1 Shl 1); + CACRF_ClearI = (1 Shl 3); + CACRF_IBE = (1 Shl 4); + CACRF_EnableD = (1 Shl 8); + CACRF_FreezeD = (1 Shl 9); + CACRF_ClearD = (1 Shl 11); + CACRF_DBE = (1 Shl 12); + CACRF_WriteAllocate = (1 Shl 13); + CACRF_EnableE = (1 Shl 30); + CACRF_CopyBack = (1 Shl 31); + + DMA_Continue = (1 Shl 1); + DMA_NoModify = (1 Shl 2); + DMA_ReadFromRAM = (1 Shl 3); + + SB_SAR = 15; + SB_TQE = 14; + SB_SINT = 13; + + SF_SAR = (1 Shl SB_SAR); + SF_TQE = (1 Shl SB_TQE); + SF_SINT = (1 Shl SB_SINT); + + + { ****** Debug Flags...(don`t depend on them) ********** } +const + EXECDEBUGF_INITRESIDENT = $1; + EXECDEBUGF_INITCODE = $2; + EXECDEBUGF_FINDRESIDENT = $4; + + EXECDEBUGF_CREATELIBRARY = $10; + EXECDEBUGF_SETFUNCTION = $20; + EXECDEBUGF_NEWSETFUNCTION = $40; + EXECDEBUGF_CHIPRAM = $80; + + EXECDEBUGF_ADDTASK = $100; + EXECDEBUGF_REMTASK = $200; + EXECDEBUGF_GETTASKATTR = $400; + EXECDEBUGF_SETTASKATTR = $800; + + EXECDEBUGF_EXCEPTHANDLER = $1000; + EXECDEBUGF_ADDDOSNODE = $2000; + EXECDEBUGF_PCI = $4000; + EXECDEBUGF_RAMLIB = $8000; + + EXECDEBUGF_NOLOGSERVER = $10000; + EXECDEBUGF_NOLOGWINDOW = $20000; + + { * + * "env:MorphOS/LogPath" contains the logfile path, + * If not specified it`s using "ram:.morphoslog" + * } + EXECDEBUGF_LOGFILE = $40000; + EXECDEBUGF_LOGKPRINTF = $80000; + + { * Memory Tracking Flags + * } + EXECDEBUGF_PERMMEMTRACK = $100000; + EXECDEBUGF_MEMTRACK = $200000; + + { * CyberGuardPPC Flags + * } + EXECDEBUGF_CYBERGUARDDEADLY = $400000; + + { * PPCLib Flags + * } + EXECDEBUGF_LOADSEG = $01000000; + EXECDEBUGF_UNLOADSEG = $02000000; + EXECDEBUGF_PPCSTART = $04000000; + + { * UserFlags + * } + + { * + * Enables debug output for cybergraphx + * } +const + EXECDEBUGF_CGXDEBUG = $08000000; + + { * + * Should be used to control user LibInit/DevInit Debug output + * } + EXECDEBUGF_INIT = $40000000; + + { * + * Should be used to control logging + * } + EXECDEBUGF_LOG = $80000000; + + { * + * Execbase list IDs + * } + EXECLIST_DEVICE = 0; + EXECLIST_INTERRUPT = 1; + EXECLIST_LIBRARY = 2; + EXECLIST_MEMHANDLER = 3; + EXECLIST_MEMHEADER = 4; + EXECLIST_PORT = 5; + EXECLIST_RESOURCE = 6; + EXECLIST_SEMAPHORE = 7; + EXECLIST_TASK = 8; + + + { * + * Execnotify hook message + * } +type + PExecNotifyMessage = ^TExecNotifyMessage; + TExecNotifyMessage = packed record + MType : DWord; + Flags : DWord; + Extra : DWord; + Extension: Pointer; + end; + + +const + EXECNOTIFYF_REMOVE = (1 Shl 0); { * if clear, is ADD * } + EXECNOTIFYF_POST = (1 Shl 1); { * if clear, is PRE * } + + + { * + * AddExecNodeTagList tags + * } +const + SAL_Dummy = (TAG_USER + 1000); + SAL_Type = (SAL_Dummy + 1); + SAL_Priority = (SAL_Dummy + 2); + SAL_Name = (SAL_Dummy + 3); + + +function Supervisor(userFunction: Pointer location 'a5'): Cardinal; +SysCall MOS_ExecBase 030; + +procedure InitCode(startClass: Cardinal location 'd0'; + version : Cardinal location 'd1'); +SysCall MOS_ExecBase 072; + +procedure InitStruct(initTable: Pointer location 'a1'; + memory : Pointer location 'a2'; + size : Cardinal location 'd0'); +SysCall MOS_ExecBase 078; + +function MakeLibrary(funcInit : Pointer location 'a0'; + structInit: Pointer location 'a1'; + libInit : Pointer location 'a2'; + dataSize : Cardinal location 'd0'; + segList : Cardinal location 'd1'): PLibrary; +SysCall MOS_ExecBase 084; + +procedure MakeFunctions(target : Pointer location 'a0'; + functionArray: Pointer location 'a1'; + funcDispBase : Pointer location 'a2'); +SysCall MOS_ExecBase 090; + +function FindResident(name: PChar location 'a1'): PResident; +SysCall MOS_ExecBase 096; + +function InitResident(resident: PResident location 'a1'; + segList : Cardinal location 'd1'): Pointer; +SysCall MOS_ExecBase 102; + +procedure Alert(alertNum: Cardinal location 'd7'); +SysCall MOS_ExecBase 108; + +procedure Debug(flags: Cardinal location 'd0'); +SysCall MOS_ExecBase 114; + +procedure Disable; +SysCall MOS_ExecBase 120; + +procedure Enable; +SysCall MOS_ExecBase 126; + +procedure Forbid; +SysCall MOS_ExecBase 132; + +procedure Permit; +SysCall MOS_ExecBase 138; + +function SetSR(newSR: Cardinal location 'd0'; + mask : Cardinal location 'd1'): Cardinal; +SysCall MOS_ExecBase 144; + +function SuperState : Pointer; +SysCall MOS_ExecBase 150; + +procedure UserState(sysStack: Pointer location 'd0'); +SysCall MOS_ExecBase 156; + +function SetIntVector(intNumber: LongInt location 'd0'; + interrupt: PInterrupt location 'a1'): PInterrupt; +SysCall MOS_ExecBase 162; + +procedure AddIntServer(intNumber: LongInt location 'd0'; + interrupt: PInterrupt location 'a1'); +SysCall MOS_ExecBase 168; + +procedure RemIntServer(intNumber: LongInt location 'd0'; + interrupt: PInterrupt location 'a1'); +SysCall MOS_ExecBase 174; + +procedure Cause(interrupt: PInterrupt location 'a1'); +SysCall MOS_ExecBase 180; + +function Allocate(freeList: PMemHeader location 'a0'; + byteSize: Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 186; + +procedure Deallocate(freeList : PMemHeader location 'a0'; + memoryBlock: Pointer location 'a1'; + byteSize : Cardinal location 'd0'); +SysCall MOS_ExecBase 192; + +{ * Name changed to avoid conflict with heap manager... * } +function execAllocMem(byteSize : Cardinal location 'd0'; + requirements: Cardinal location 'd1'): Pointer; +SysCall MOS_ExecBase 198; + +function AllocAbs(byteSize: Cardinal location 'd0'; + location: Pointer location 'a1'): Pointer; +SysCall MOS_ExecBase 204; + +{ * Name changed to avoid conflict with heap manager... * } +procedure execFreeMem(memoryBlock: Pointer location 'a1'; + byteSize : Cardinal location 'd0'); +SysCall MOS_ExecBase 210; + +function AvailMem(requirements: Cardinal location 'd1'): Cardinal; +SysCall MOS_ExecBase 216; + +function AllocEntry(entry: PMemList location 'a0'): PMemList; +SysCall MOS_ExecBase 222; + +procedure FreeEntry(entry: PMemList location 'a0'); +SysCall MOS_ExecBase 228; + +{ * Name changed to avoid conflict with other System unit call... * } +procedure execInsert(list: PList location 'a0'; + node: PNode location 'a1'; + pred: PNode location 'a2'); +SysCall MOS_ExecBase 234; + +procedure AddHead(list: PList location 'a0'; + node: PNode location 'a1'); +SysCall MOS_ExecBase 240; + +procedure AddTail(list: PList location 'a0'; + node: PNode location 'a1'); +SysCall MOS_ExecBase 246; + +procedure Remove(node: PNode location 'a1'); +SysCall MOS_ExecBase 252; + +function RemHead(list: PList location 'a0'): PNode; +SysCall MOS_ExecBase 258; + +function RemTail(list: PList location 'a0'): PNode; +SysCall MOS_ExecBase 264; + +procedure Enqueue(list: PList location 'a0'; + node: PNode location 'a1'); +SysCall MOS_ExecBase 270; + +function FindName(list: PList location 'a0'; + name: PChar location 'a1'): PNode; +SysCall MOS_ExecBase 276; + +function AddTask(task : PTask location 'a1'; + initPC : Pointer location 'a2'; + finalPC: Pointer location 'a3'): Pointer; +SysCall MOS_ExecBase 282; + +procedure RemTask(task: PTask location 'a1'); +SysCall MOS_ExecBase 288; + +function FindTask(name: PChar location 'a1'): PTask; +SysCall MOS_ExecBase 294; + +function SetTaskPri(task : PTask location 'a1'; + priority: LongInt location 'd0'): ShortInt; +SysCall MOS_ExecBase 300; + +function SetSignal(newSignals: Cardinal location 'd0'; + signalSet : Cardinal location 'd1'): Cardinal; +SysCall MOS_ExecBase 306; + +function SetExcept(newSignals: Cardinal location 'd0'; + signalSet : Cardinal location 'd1'): Cardinal; +SysCall MOS_ExecBase 312; + +function Wait(signalSet: Cardinal location 'd0'): Cardinal; +SysCall MOS_ExecBase 318; + +procedure Signal(task : PTask location 'a1'; + signalSet: Cardinal location 'd0'); +SysCall MOS_ExecBase 324; + +function AllocSignal(signalNum: LongInt location 'd0'): ShortInt; +SysCall MOS_ExecBase 330; + +procedure FreeSignal(signalNum: LongInt location 'd0'); +SysCall MOS_ExecBase 336; + +function AllocTrap(trapNum: LongInt location 'd0'): LongInt; +SysCall MOS_ExecBase 342; + +procedure FreeTrap(trapNum: LongInt location 'd0'); +SysCall MOS_ExecBase 348; + +procedure AddPort(port: PMsgPort location 'a1'); +SysCall MOS_ExecBase 354; + +procedure RemPort(port: PMsgPort location 'a1'); +SysCall MOS_ExecBase 360; + +procedure PutMsg(port : PMsgPort location 'a0'; + message: PMessage location 'a1'); +SysCall MOS_ExecBase 366; + +function GetMsg(port: PMsgPort location 'a0'): PMessage; +SysCall MOS_ExecBase 372; + +procedure ReplyMsg(message : PMessage location 'a1'); +SysCall MOS_ExecBase 378; + +function WaitPort(port: PMsgPort location 'a0'): PMessage; +SysCall MOS_ExecBase 384; + +function FindPort(name: PChar location 'a1'): PMsgPort; +SysCall MOS_ExecBase 390; + +procedure AddLibrary(libHandle: PLibrary location 'a1'); +SysCall MOS_ExecBase 396; + +procedure RemLibrary(libHandle: PLibrary location 'a1'); +SysCall MOS_ExecBase 402; + +function OldOpenLibrary(libName: PChar location 'a1'): PLibrary; +SysCall MOS_ExecBase 408; + +procedure CloseLibrary(libHandle: PLibrary location 'a1'); +SysCall MOS_ExecBase 414; + +function SetFunction(libHandle : PLibrary location 'a1'; + funcOffset : LongInt location 'a0'; + newFunction: Pointer location 'd0'): Pointer; +SysCall MOS_ExecBase 420; + +procedure SumLibrary(libHandle: PLibrary location 'a1'); +SysCall MOS_ExecBase 426; + +procedure AddDevice(device: PDevice location 'a1'); +SysCall MOS_ExecBase 432; + +procedure RemDevice(device: PDevice location 'a1'); +SysCall MOS_ExecBase 438; + +function OpenDevice(devName : PChar location 'a0'; + numunit : Cardinal location 'd0'; + ioRequest: pIORequest location 'a1'; + flags : Cardinal location 'd1'): ShortInt; +SysCall MOS_ExecBase 444; + +procedure CloseDevice(ioRequest: PIORequest location 'a1'); +SysCall MOS_ExecBase 450; + +function DoIO(ioRequest: PIORequest location 'a1'): ShortInt; +SysCall MOS_ExecBase 456; + +procedure SendIO(ioRequest: PIORequest location 'a1'); +SysCall MOS_ExecBase 462; + +function CheckIO(ioRequest: PIORequest location 'a1'): PIORequest; +SysCall MOS_ExecBase 468; + +function WaitIO(ioRequest: PIORequest location 'a1'): ShortInt; +SysCall MOS_ExecBase 474; + +procedure AbortIO(ioRequest: PIORequest location 'a1'); +SysCall MOS_ExecBase 480; + +procedure AddResource(resource: Pointer location 'a1'); +SysCall MOS_ExecBase 486; + +procedure RemResource(resource: Pointer location 'a1'); +SysCall MOS_ExecBase 492; + +function OpenResource(resName: PChar location 'a1'): Pointer; +SysCall MOS_ExecBase 498; + +procedure RawIOInit; +SysCall MOS_ExecBase 504; + +function RawMayGetChar: Char; +SysCall MOS_ExecBase 510; + +procedure RawPutChar(d0arg: Char location 'd0'); +SysCall MOS_ExecBase 516; + +function RawDoFmt(formatString: PChar location 'a0'; + dataStream : Pointer location 'a1'; + putChProc : Pointer location 'a2'; + putChData : Pointer location 'a3'): Pointer; +SysCall MOS_ExecBase 522; + +function GetCC: Cardinal; +SysCall MOS_ExecBase 528; + +function TypeOfMem(address: Pointer location 'a1'): Cardinal; +SysCall MOS_ExecBase 534; + +function Procure(sigSem: PSignalSemaphore location 'a0'; + bidMsg: PSemaphoreMessage location 'a1'): Cardinal; +SysCall MOS_ExecBase 540; + +procedure Vacate(sigSem: PSignalSemaphore location 'a0'; + bidMsg: PSemaphoreMessage location 'a1'); +SysCall MOS_ExecBase 546; + +function OpenLibrary(libname: PChar location 'a1'; + libver : Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 552; + +procedure InitSemaphore(sigSem: PSignalSemaphore location 'a0'); +SysCall MOS_ExecBase 558; + +procedure ObtainSemaphore(sigSem: PSignalSemaphore location 'a0'); +SysCall MOS_ExecBase 564; + +procedure ReleaseSemaphore(sigSem: PSignalSemaphore location 'a0'); +SysCall MOS_ExecBase 570; + +function AttemptSemaphore(sigSem: PSignalSemaphore location 'a0'): Cardinal; +SysCall MOS_ExecBase 576; + +procedure ObtainSemaphoreList(sigSem: PList location 'a0'); +SysCall MOS_ExecBase 582; + +procedure ReleaseSemaphoreList(sigSem: PList location 'a0'); +SysCall MOS_ExecBase 588; + +function FindSemaphore(sigSem: PChar location 'a1'): PSignalSemaphore; +SysCall MOS_ExecBase 594; + +procedure AddSemaphore(sigSem: PSignalSemaphore location 'a1'); +SysCall MOS_ExecBase 600; + +procedure RemSemaphore(sigSem: PSignalSemaphore location 'a1'); +SysCall MOS_ExecBase 606; + +function SumKickData: Cardinal; +SysCall MOS_ExecBase 612; + +procedure AddMemList(size : Cardinal location 'd0'; + attributes: Cardinal location 'd1'; + pri : LongInt location 'd2'; + base : Pointer location 'a0'; + name : PChar location 'a1'); +SysCall MOS_ExecBase 618; + +procedure CopyMem(source: Pointer location 'a0'; + dest : Pointer location 'a1'; + size : Cardinal location 'd0'); +SysCall MOS_ExecBase 624; + +procedure CopyMemQuick(source: Pointer location 'a0'; + dest : Pointer location 'a1'; + size : Cardinal location 'd0'); +SysCall MOS_ExecBase 630; + +procedure CacheClearU; +SysCall MOS_ExecBase 636; + +procedure CacheClearE(address: Pointer location 'a0'; + length : Cardinal location 'd0'; + caches : Cardinal location 'd1'); +SysCall MOS_ExecBase 642; + +function CacheControl(cacheBits: Cardinal location 'd0'; + cacheMask: Cardinal location 'd1'): Cardinal; +SysCall MOS_ExecBase 648; + +function CreateIORequest(port: PMsgPort location 'a0'; + size: Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 654; + +procedure DeleteIORequest(iorequest: Pointer location 'a0'); +SysCall MOS_ExecBase 660; + +function CreateMsgPort: PMsgPort; +SysCall MOS_ExecBase 666; + +procedure DeleteMsgPort(port: PMsgPort location 'a0'); +SysCall MOS_ExecBase 672; + +procedure ObtainSemaphoreShared(sigSem: PSignalSemaphore location 'a0'); +SysCall MOS_ExecBase 678; + +function AllocVec(byteSize : Cardinal location 'd0'; + requirements: Cardinal location 'd1'): Pointer; +SysCall MOS_ExecBase 684; + +procedure FreeVec(memoryBlock: Pointer location 'a1'); +SysCall MOS_ExecBase 690; + +function CreatePool(requirements: Cardinal location 'd0'; + puddleSize : Cardinal location 'd1'; + threshSize : Cardinal location 'd2'): Pointer; +SysCall MOS_ExecBase 696; + +procedure DeletePool(poolHeader: Pointer location 'a0'); +SysCall MOS_ExecBase 702; + +function AllocPooled(poolHeader: Pointer location 'a0'; + memSize : Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 708; + +function FreePooled(poolHeader: Pointer location 'a0'; + memory : Pointer location 'a1'; + memSize : Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 714; + +function AttemptSemaphoreShared(sigSem: pSignalSemaphore location 'a0'): Cardinal; +SysCall MOS_ExecBase 720; + +procedure ColdReboot; +SysCall MOS_ExecBase 726; + +procedure StackSwap(newStack: PStackSwapStruct location 'a0'); +SysCall MOS_ExecBase 732; + +function NewGetTaskAttrsA(Task : PTask location 'a0'; + Data : Pointer location 'a1'; + DataSize: Cardinal location 'd0'; + TType : Cardinal location 'd1'; + Tags : PTagItem location 'a2'): Cardinal; +SysCall MOS_ExecBase 738; + +function NewSetTaskAttrsA(Task : PTask location 'a0'; + Data : Pointer location 'a1'; + DataSize: Cardinal location 'd0'; + TType : Cardinal location 'd1'; + Tags : PTagItem location 'a2'): Cardinal; +SysCall MOS_ExecBase 744; + +function CachePreDMA(address : Pointer location 'a0'; + var length: Cardinal location 'a1'; + flags : Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 762; + +procedure CachePostDMA(address : Pointer location 'a0'; + var length: Cardinal location 'a1'; + flags : Cardinal location 'd0'); +SysCall MOS_ExecBase 768; + +procedure AddMemHandler(memhand: PInterrupt location 'a1'); +SysCall MOS_ExecBase 774; + +procedure RemMemHandler(memhand: PInterrupt location 'a1'); +SysCall MOS_ExecBase 780; + +function ObtainQuickVector(interruptCode: Pointer location 'a0'): Cardinal; +SysCall MOS_ExecBase 786; + +function NewSetFunction(libHandle : PLibrary location 'a0'; + newfunction: Pointer location 'a1'; + offset : LongInt location 'd0'; + tags : PTagItem location 'a2'): Pointer; +SysCall MOS_ExecBase 792; + +function NewCreateLibrary(tags: PTagItem location 'a0'): PLibrary; +SysCall MOS_ExecBase 798; + +function NewPPCStackSwap(newStack : PStackSwapStruct location 'a0'; + sfunction: Pointer location 'a1'; + args : PPPCStackSwapArgs location 'a2'): Cardinal; +SysCall MOS_ExecBase 804; + +function TaggedOpenLibrary(d0arg: LongInt location 'd0'): Pointer; +SysCall MOS_ExecBase 810; + +function ReadGayle: Cardinal; +SysCall MOS_ExecBase 816; + +function VNewRawDoFmt(FmtString: PChar; + PutChProc: Pointer; + PutChData: PChar; + args : PChar): PChar; +SysCall BaseSysV MOS_ExecBase 822; + +procedure CacheFlushDataArea(Address: Pointer location 'a0'; + Size : Cardinal location 'd0'); +SysCall MOS_ExecBase 828; + +procedure CacheInvalidInstArea(Address: Pointer location 'a0'; + Size : Cardinal location 'd0'); +SysCall MOS_ExecBase 834; + +procedure CacheInvalidDataArea(Address: Pointer location 'a0'; + Size : Cardinal location 'd0'); +SysCall MOS_ExecBase 840; + +procedure CacheFlushDataInstArea(Address: Pointer location 'a0'; + Size : Cardinal location 'd0'); +SysCall MOS_ExecBase 846; + +procedure CacheTrashCacheArea(Address: Pointer location 'a0'; + Size : Cardinal location 'd0'); +SysCall MOS_ExecBase 852; + +function AllocTaskPooled(Size: Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 858; + +procedure FreeTaskPooled(Address: Pointer location 'a1'; + Size : Cardinal location 'd0'); +SysCall MOS_ExecBase 864; + +function AllocVecTaskPooled(Size: Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 870; + +procedure FreeVecTaskPooled(Address: Pointer location 'a1'); +SysCall MOS_ExecBase 876; + +procedure FlushPool(poolHeader: Pointer location 'a0'); +SysCall MOS_ExecBase 882; + +procedure FlushTaskPool; +SysCall MOS_ExecBase 888; + +function AllocVecPooled(poolHeader: Pointer location 'a0'; + memSize : Cardinal location 'd0'): Pointer; +SysCall MOS_ExecBase 894; + +function NewGetSystemAttrsA(Data : Pointer location 'a0'; + DataSize: Cardinal location 'd0'; + TType : Cardinal location 'd1'; + Tags : PTagItem location 'a1'): Cardinal; +SysCall MOS_ExecBase 906; + +function NewSetSystemAttrsA(Data : Pointer location 'a0'; + DataSize: Cardinal location 'd0'; + TType : Cardinal location 'd1'; + Tags : PTagItem location 'a1'): Cardinal; +SysCall MOS_ExecBase 912; + +function NewCreateTaskA(Tags: PTagItem location 'a0'): PTask; +SysCall MOS_ExecBase 918; + +function AllocateAligned(memHeader : pMemHeader; + byteSize : Cardinal; + alignSize : Cardinal; + alignOffset: Cardinal): Pointer; +SysCall BaseSysV MOS_ExecBase 930; + +function AllocMemAligned(byteSize : Cardinal; + attributes : Cardinal; + alignSize : Cardinal; + alignOffset: Cardinal): Pointer; +SysCall BaseSysV MOS_ExecBase 936; + +function AllocVecAligned(byteSize : Cardinal; + attributes : Cardinal; + alignSize : Cardinal; + alignOffset: Cardinal): Pointer; +SysCall BaseSysV MOS_ExecBase 942; + +procedure AddExecNotify(hook: PHook); +SysCall BaseSysV MOS_ExecBase 948; + +procedure RemExecNotify(hook: PHook); +SysCall BaseSysV MOS_ExecBase 954; + +function FindExecNode(ttype: Cardinal location 'd0'; + name : PChar location 'a0'): PNode; +SysCall MOS_ExecBase 960; + +function AddExecNodeA(innode : Pointer location 'a0'; + TagItems: PTagItem location 'a1'): Pointer; +SysCall MOS_ExecBase 966; + +function AllocVecDMA(byteSize : Cardinal location 'd0'; + requirements: Cardinal location 'd1'): Pointer; +SysCall MOS_ExecBase 972; + +procedure FreeVecDMA(memoryBlock: Pointer location 'a1'); +SysCall MOS_ExecBase 978; + +function AllocPooledAligned(poolHeader : Pointer; + byteSize : Cardinal; + alignSize : Cardinal; + alignOffset: Cardinal): Pointer; +SysCall BaseSysV MOS_ExecBase 984; + +function AddResident(resident: pResident location 'd0'): LongInt; +SysCall BaseSysV MOS_ExecBase 990; + +function FindTaskByPID(processID: Cardinal): PTask; +SysCall BaseSysV MOS_ExecBase 996; + +function NewGetTaskAttrs(Task : PTask; + Data : Pointer; + DataSize: Cardinal; + TType : Cardinal; + Tags : array of DWord): Cardinal; Inline; + +implementation + +function NewGetTaskAttrs(Task : PTask; + Data : Pointer; + DataSize: Cardinal; + TType : Cardinal; + Tags : array of DWord): Cardinal; Inline; +begin + NewGetTaskAttrs:=NewGetTaskAttrsA(Task,Data,DataSize,TType,@Tags); +end; + + +begin + ExecBase:=MOS_ExecBase; +end. diff --git a/rtl/morphos/get9.pas b/packages/morphunits/src/get9.pas similarity index 100% rename from rtl/morphos/get9.pas rename to packages/morphunits/src/get9.pas diff --git a/rtl/morphos/hardware.pas b/packages/morphunits/src/hardware.pas similarity index 100% rename from rtl/morphos/hardware.pas rename to packages/morphunits/src/hardware.pas diff --git a/rtl/morphos/inputevent.pas b/packages/morphunits/src/inputevent.pas similarity index 100% rename from rtl/morphos/inputevent.pas rename to packages/morphunits/src/inputevent.pas diff --git a/rtl/morphos/intuition.pas b/packages/morphunits/src/intuition.pas similarity index 99% rename from rtl/morphos/intuition.pas rename to packages/morphunits/src/intuition.pas index 41ae073b3e..cfe5d92196 100644 --- a/rtl/morphos/intuition.pas +++ b/packages/morphunits/src/intuition.pas @@ -25,7 +25,7 @@ unit intuition; interface uses - exec, graphics, utility, inputevent, timer, layers; + exec, agraphics, utility, inputevent, timer, layers; { diff --git a/rtl/morphos/keymap.pas b/packages/morphunits/src/keymap.pas similarity index 100% rename from rtl/morphos/keymap.pas rename to packages/morphunits/src/keymap.pas diff --git a/rtl/morphos/kvm.pp b/packages/morphunits/src/kvm.pas similarity index 98% rename from rtl/morphos/kvm.pp rename to packages/morphunits/src/kvm.pas index a16d920821..8cd471ca7d 100644 --- a/rtl/morphos/kvm.pp +++ b/packages/morphunits/src/kvm.pas @@ -19,7 +19,7 @@ unit kvm; interface uses - exec, intuition, graphics; + exec, intuition, agraphics; function initKVM: boolean; diff --git a/rtl/morphos/layers.pas b/packages/morphunits/src/layers.pas similarity index 99% rename from rtl/morphos/layers.pas rename to packages/morphunits/src/layers.pas index 8621b07ac1..0082e07fe2 100644 --- a/rtl/morphos/layers.pas +++ b/packages/morphunits/src/layers.pas @@ -24,7 +24,7 @@ unit layers; interface -uses exec, graphics, utility; +uses exec, agraphics, utility; const LAYERSIMPLE = 1; diff --git a/rtl/morphos/mui.pas b/packages/morphunits/src/mui.pas similarity index 99% rename from rtl/morphos/mui.pas rename to packages/morphunits/src/mui.pas index a47a37d717..ffa590c1f8 100644 --- a/rtl/morphos/mui.pas +++ b/packages/morphunits/src/mui.pas @@ -129,7 +129,7 @@ interface Items marked with "Custom Class" are for use in custom classes only! } -uses exec, intuition,utility,graphics{,iffparse}; +uses exec, intuition,utility,agraphics{,iffparse}; {$WARNING IffParse required, look for FIX ME!!!} var diff --git a/rtl/morphos/muihelper.pas b/packages/morphunits/src/muihelper.pas similarity index 99% rename from rtl/morphos/muihelper.pas rename to packages/morphunits/src/muihelper.pas index b456788741..8c85f567e5 100644 --- a/rtl/morphos/muihelper.pas +++ b/packages/morphunits/src/muihelper.pas @@ -23,7 +23,7 @@ unit muihelper; interface -uses intuition, mui, doslib, utility; +uses intuition, mui, amigados, utility; const diff --git a/packages/morphunits/src/timer.pas b/packages/morphunits/src/timer.pas new file mode 100644 index 0000000000..f7846b6237 --- /dev/null +++ b/packages/morphunits/src/timer.pas @@ -0,0 +1,101 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. + + timer.device interface unit for MorphOS/PowerPC + + MorphOS port was done on a free Pegasos II/G4 machine + provided by Genesi S.a.r.l. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +unit timer; + +interface + +uses + exec; + +var + TimerBase : Pointer; + + +{ * timer.device definitions (V50) + ********************************************************************* + * } + + +const + UNIT_MICROHZ = 0; + UNIT_VBLANK = 1; + UNIT_ECLOCK = 2; + UNIT_WAITUNTIL = 3; + UNIT_WAITECLOCK = 4; + { *** V50 *** } + UNIT_CPUCLOCK = 5; + UNIT_WAITCPUCLOCK = 6; + +const + TIMERNAME = 'timer.device'; + + +type + PTimeVal = ^TTimeVal; + TTimeVal = packed record + tv_secs : DWord; + tv_micro: DWord; + end; + +type + PEClockVal = ^TEClockVal; + TEClockVal = packed record + ev_hi: DWord; + ev_lo: DWord; + end; + +type + PTimeRequest = ^TTimeRequest; + TTimeRequest = packed record + tr_node: TIORequest; + tr_time: TTimeVal; + end; + + +const + TR_ADDREQUEST = (CMD_NONSTD); + TR_GETSYSTIME = (CMD_NONSTD + 1); + TR_SETSYSTIME = (CMD_NONSTD + 2); + + +procedure AddTime(Dest : PTimeVal location 'a0'; + Source: PTimeVal location 'a1'); +SysCall TimerBase 42; + +procedure SubTime(Dest : PTimeVal location 'a0'; + Source: PTimeVal location 'a1'); +SysCall TimerBase 48; + +function CmpTime(Dest : PTimeVal location 'a0'; + Source: PTimeVal location 'a1'): LongInt; +SysCall TimerBase 54; + +function ReadEClock(Dest: PTimeVal location 'a0'): DWord; +SysCall TimerBase 60; + +procedure GetSysTime(Dest: PTimeVal location 'a0'); +SysCall TimerBase 66; + +{.$include timerd.inc} +{.$include timerf.inc} + +implementation + +begin +end. diff --git a/rtl/morphos/tinygl.pp b/packages/morphunits/src/tinygl.pas similarity index 100% rename from rtl/morphos/tinygl.pp rename to packages/morphunits/src/tinygl.pas diff --git a/packages/morphunits/src/utility.pas b/packages/morphunits/src/utility.pas new file mode 100644 index 0000000000..5005b30666 --- /dev/null +++ b/packages/morphunits/src/utility.pas @@ -0,0 +1,366 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. + + utility.library interface unit for MorphOS/PowerPC + + MorphOS port was done on a free Pegasos II/G4 machine + provided by Genesi S.a.r.l. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +{$inline on} +unit utility; + +interface + +uses + exec; + +var + UtilityBase: Pointer; + + +{ * utility.library date defines + ********************************************************************* + * } + + +type + PClockData = ^TClockData; + TClockData = packed record + sec : Word; + min : Word; + hour : Word; + mday : Word; + month: Word; + year : Word; + wday : Word; + end; + + + +{ * utility.library tagitem defines + ********************************************************************* + * } + + +type + Tag = Cardinal; + +type + PPTagItem = ^PTagItem; + PTagItem = ^TTagItem; + TTagItem = packed record + ti_Tag : Tag; + ti_Data: Cardinal; + end; + + +const + TAG_DONE = 0; + TAG_END = 0; + TAG_IGNORE = 1; + TAG_MORE = 2; + TAG_SKIP = 3; + +const + TAG_USER = 1 Shl 31; + +const + TAGFILTER_AND = 0; + TAGFILTER_NOT = 1; + +const + MAP_REMOVE_NOT_FOUND = 0; + MAP_KEEP_NOT_FOUND = 1; + + + +{ * utility.library namespace defines + ********************************************************************* + * } + + +type + PNamedObject = ^TNamedObject; + TNamedObject = packed record + no_Object: Pointer; + end; + + +const + ANO_NameSpace = 4000; + ANO_UserSpace = 4001; + ANO_Priority = 4002; + ANO_Flags = 4003; + + NSB_NODUPS = 0; + NSB_CASE = 1; + + NSF_NODUPS = 1 Shl NSB_NODUPS; + NSF_CASE = 1 Shl NSB_CASE; + + + +{ * utility.library pack attributes and macros + ********************************************************************* + * } + + +const + PSTB_SIGNED = 31; + PSTB_UNPACK = 30; + PSTB_PACK = 29; + PSTB_EXISTS = 26; + + PSTF_SIGNED = (1 Shl PSTB_SIGNED); + PSTF_UNPACK = (1 Shl PSTB_UNPACK); + PSTF_PACK = (1 Shl PSTB_PACK); + PSTF_EXISTS = (1 Shl PSTB_EXISTS); + +const + PKCTRL_PACKUNPACK = $00000000; + PKCTRL_PACKONLY = $40000000; + PKCTRL_UNPACKONLY = $20000000; + + PKCTRL_BYTE = $80000000; + PKCTRL_WORD = $88000000; + PKCTRL_LONG = $90000000; + + PKCTRL_UBYTE = $00000000; + PKCTRL_UWORD = $08000000; + PKCTRL_ULONG = $10000000; + + PKCTRL_BIT = $18000000; + PKCTRL_FLIPBIT = $98000000; + +{$WARNING FIX ME!!! Some macros to convert} +{ + PK_BITNUM1(flg) ((flg) == 0x01 ? 0 : (flg) == 0x02 ? 1 : (flg) == 0x04 ? 2 : (flg) == 0x08 ? 3 : (flg) == 0x10 ? 4 : (flg) == 0x20 ? 5 : (flg) == 0x40 ? 6 : 7) + PK_BITNUM2(flg) ((flg < 0x100 ? PK_BITNUM1(flg) : 8 + PK_BITNUM1(flg >> 8))) + PK_BITNUM(flg) ((flg < 0x10000 ? PK_BITNUM2(flg) : 16 + PK_BITNUM2(flg >> 16))) + PK_WORDOFFSET(flg) ((flg) < 0x100 ? 1 : 0) + PK_LONGOFFSET(flg) ((flg) < 0x100 ? 3 : (flg) < 0x10000 ? 2 : (flg) < 0x1000000 ? 1 : 0) + PK_CALCOFFSET(type,field) ((ULONG)(&((struct type *)0)->field)) + + + PACK_STARTTABLE(tagbase) (tagbase) + PACK_NEWOFFSET(tagbase) (-1L),(tagbase) + PACK_ENDTABLE 0 + PACK_ENTRY(tagbase,tag,type,field,control) (control | ((tag-tagbase) << 16L) | PK_CALCOFFSET(type,field)) + PACK_BYTEBIT(tagbase,tag,type,field,control,flags) (control | ((tag-tagbase) << 16L) | PK_CALCOFFSET(type,field) | (PK_BITNUM(flags) << 13L)) + PACK_WORDBIT(tagbase,tag,type,field,control,flags) (control | ((tag-tagbase) << 16L) | (PK_CALCOFFSET(type,field) + PK_WORDOFFSET(flags)) | ((PK_BITNUM(flags) & 7) << 13L)) + PACK_LONGBIT(tagbase,tag,type,field,control,flags) (control | ((tag-tagbase) << 16L) | (PK_CALCOFFSET(type,field) + PK_LONGOFFSET(flags)) | ((PK_BITNUM(flags) & 7) << 13L)) +} + +{ * utility.library include + ********************************************************************* + * } + + +const + UtilityName = 'utility.library'; + + +type + PUtilityBase = ^TUtilityName; + TUtilityName = packed record + ub_LibNode : TLibrary; + ub_Language: Byte; + ub_Reserved: Byte; + end; + + + +{ * utility.library hook defines + ********************************************************************* + * } + + +type + PHook = ^THook; + THook = packed record + h_MinNode : TMinNode; + h_Entry : Cardinal; + h_SubEntry: Cardinal; + h_Data : Pointer; + end; + + +function FindTagItem(tagVal : Cardinal location 'd0'; + tagList: PTagItem location 'a0'): PTagItem; +SysCall MOS_UtilityBase 030; + +function GetTagData(tagValue : Cardinal location 'd0'; + defaultVal: Cardinal location 'd1'; + tagList : PTagItem location 'a0'): Cardinal; +SysCall MOS_UtilityBase 036; + +function PackBoolTags(initialFlags: Cardinal location 'd0'; + tagList : PTagItem location 'a0'; + boolMap : PTagItem location 'a1'): Cardinal; +SysCall MOS_UtilityBase 042; + +function NextTagItem(tagListPtr: pPTagItem location 'a0'): PTagItem; +SysCall MOS_UtilityBase 048; + +procedure FilterTagChanges(changeList : PTagItem location 'a0'; + originalList: PTagItem location 'a1'; + apply : Cardinal location 'd0'); +SysCall MOS_UtilityBase 054; + +procedure MapTags(tagList: PTagItem location 'a0'; + mapList: PTagItem location 'a1'; + mapType: Cardinal location 'd0'); +SysCall MOS_UtilityBase 060; + +function AllocateTagItems(numTags: Cardinal location 'd0'): PTagItem; +SysCall MOS_UtilityBase 066; + +function CloneTagItems(tagList: PTagItem location 'a0'): PTagItem; +SysCall MOS_UtilityBase 072; + +procedure FreeTagItems(tagList: PTagItem location 'a0'); +SysCall MOS_UtilityBase 078; + +procedure RefreshTagItemClones(clone : PTagItem location 'a0'; + original: PTagItem location 'a1'); +SysCall MOS_UtilityBase 084; + +function TagInArray(tagValue : Cardinal location 'd0'; + var tagArray: Cardinal location 'a0'): Boolean; +SysCall MOS_UtilityBase 090; + +function FilterTagItems(tagList : PTagItem location 'a0'; + var filterArray: Cardinal location 'a1'; + logic : Cardinal location 'd0'): Cardinal; +SysCall MOS_UtilityBase 096; + +function CallHookPkt(hook : PHook location 'a0'; + hobject : Pointer location 'a2'; + paramPacket: Pointer location 'a1'): Cardinal; +SysCall MOS_UtilityBase 102; + +procedure Amiga2Date(seconds: Cardinal location 'd0'; + result : PClockData location 'a0'); +SysCall MOS_UtilityBase 120; + +function Date2Amiga(date: PClockData location 'a0'): Cardinal; +SysCall MOS_UtilityBase 126; + +function CheckDate(date: PClockData location 'a0'): Cardinal; +SysCall MOS_UtilityBase 132; + +function SMult32(arg1: LongInt location 'd0'; + arg2: LongInt location 'd1'): LongInt; +SysCall MOS_UtilityBase 138; + +function UMult32(arg1: Cardinal location 'd0'; + arg2: Cardinal location 'd1'): Cardinal; +SysCall MOS_UtilityBase 144; + +function SDivMod32(dividend: LongInt location 'd0'; + divisor: LongInt location 'd1'): LongInt; +SysCall MOS_UtilityBase 150; + +function UDivMod32(dividend: Cardinal location 'd0'; + divisor : Cardinal location 'd1'): Cardinal; +SysCall MOS_UtilityBase 156; + +function Stricmp(string1: PChar location 'a0'; + string2: PChar location 'a1'): LongInt; +SysCall MOS_UtilityBase 162; + +function Strnicmp(string1: PChar location 'a0'; + string2: PChar location 'a1'; + length : LongInt location 'd0'): LongInt; +SysCall MOS_UtilityBase 168; + +function ToUpper(character: Cardinal location 'd0'): Char; +SysCall MOS_UtilityBase 174; + +function ToLower(character: Cardinal location 'd0'): Char; +SysCall MOS_UtilityBase 180; + +procedure ApplyTagChanges(list : PTagItem location 'a0'; + changeList: PTagItem location 'a1'); +SysCall MOS_UtilityBase 186; + +function SMult64(arg1: LongInt location 'd0'; + arg2: LongInt location 'd1'): LongInt; +SysCall MOS_UtilityBase 198; + +function UMult64(arg1: Cardinal location 'd0'; + arg2: Cardinal location 'd1'): Cardinal; +SysCall MOS_UtilityBase 204; + +function PackStructureTags(pack : Pointer location 'a0'; + var packTable: Cardinal location 'a1'; + tagList : PTagItem location 'a2'): Cardinal; +SysCall MOS_UtilityBase 210; + +function UnpackStructureTags(pack : Pointer location 'a0'; + var packTable: Cardinal location 'a1'; + tagList : PTagItem location 'a2'): Cardinal; +SysCall MOS_UtilityBase 216; + +function AddNamedObject(nameSpace: PNamedObject location 'a0'; + nobject : PNamedObject location 'a1'): Boolean; +SysCall MOS_UtilityBase 222; + +function AllocNamedObjectA(name : PChar location 'a0'; + tagList: PTagItem location 'a1'): PNamedObject; +SysCall MOS_UtilityBase 228; + +function AttemptRemNamedObject(nobject: PNamedObject location 'a0'): LongInt; +SysCall MOS_UtilityBase 234; + +function FindNamedObject(nameSpace : PNamedObject location 'a0'; + name : PChar location 'a1'; + lastObject: PNamedObject location 'a2'): PNamedObject; +SysCall MOS_UtilityBase 240; + +procedure FreeNamedObject(nobject: PNamedObject location 'a0'); +SysCall MOS_UtilityBase 246; + +function NamedObjectName(nobject: PNamedObject location 'a0'): PChar; +SysCall MOS_UtilityBase 252; + +procedure ReleaseNamedObject(nobject: pNamedObject location 'a0'); +SysCall MOS_UtilityBase 258; + +procedure RemNamedObject(nobject: PNamedObject location 'a0'; + message: PMessage location 'a1'); +SysCall MOS_UtilityBase 264; + +function GetUniqueID: Cardinal; +SysCall MOS_UtilityBase 270; + + +function TAG_(value: pointer): longword; inline; +function TAG_(value: pchar): longword; inline; + + +implementation + +function TAG_(value: pointer): longword; inline; +begin + TAG_:=longword(value); +end; + +function TAG_(value: pchar): longword; inline; +begin + TAG_:=longword(value); +end; + + +begin + UtilityBase:=MOS_UtilityBase; +end. diff --git a/packages/opengl/fpmake.pp b/packages/opengl/fpmake.pp index 79e4f74c10..4253cc7b88 100644 --- a/packages/opengl/fpmake.pp +++ b/packages/opengl/fpmake.pp @@ -22,6 +22,7 @@ begin P.Dependencies.Add('x11',AllUnixOSes-[darwin,iphonesim]); if Defaults.CPU<>arm then P.Dependencies.Add('x11',[darwin]); + P.Dependencies.Add('morphunits',[morphos]); P.SourcePath.Add('src'); P.IncludePath.Add('src'); diff --git a/packages/rtl-console/fpmake.pp b/packages/rtl-console/fpmake.pp index a9ce4796d4..8e43e596d7 100644 --- a/packages/rtl-console/fpmake.pp +++ b/packages/rtl-console/fpmake.pp @@ -44,6 +44,7 @@ begin P.Description := 'Rtl-console, console abstraction'; P.NeedLibC:= false; P.Dependencies.Add('rtl-extra'); // linux,android gpm. + P.Dependencies.Add('morphunits',[morphos]); P.SourcePath.Add('src/inc'); P.SourcePath.Add('src/$(OS)'); diff --git a/packages/rtl-console/src/morphos/video.pp b/packages/rtl-console/src/morphos/video.pp index 826424b22f..92217e467d 100644 --- a/packages/rtl-console/src/morphos/video.pp +++ b/packages/rtl-console/src/morphos/video.pp @@ -37,7 +37,7 @@ var implementation uses - exec, graphics; + exec, agraphics; {$i video.inc} diff --git a/packages/rtl-extra/fpmake.pp b/packages/rtl-extra/fpmake.pp index c1d0872727..df19677d02 100644 --- a/packages/rtl-extra/fpmake.pp +++ b/packages/rtl-extra/fpmake.pp @@ -52,6 +52,7 @@ begin P.Email := ''; P.Description := 'Rtl-extra, RTL not needed for bootstrapping'; P.NeedLibC:= false; + P.Dependencies.Add('morphunits',[morphos]); P.SourcePath.Add('src/inc'); P.SourcePath.Add('src/$(OS)'); diff --git a/packages/sdl/fpmake.pp b/packages/sdl/fpmake.pp index 9a777cecab..f0a88d11e9 100644 --- a/packages/sdl/fpmake.pp +++ b/packages/sdl/fpmake.pp @@ -21,6 +21,7 @@ begin P.IncludePath.Add('src'); P.Dependencies.Add('x11',AllUnixOSes); P.Dependencies.Add('pthreads',AllUnixOSes); + P.Dependencies.Add('morphunits',[morphos]); if Defaults.CPU=arm then P.OSes := P.OSes - [darwin]; P.OSes := P.OSes - [iphonesim,os2,emx,go32v2,watcom,nativent,embedded,android,amiga,aros,msdos]; diff --git a/rtl/morphos/Makefile b/rtl/morphos/Makefile index 2884761da6..2e27ae3bf5 100644 --- a/rtl/morphos/Makefile +++ b/rtl/morphos/Makefile @@ -342,232 +342,232 @@ endif OBJPASDIR=$(RTL)/objpas GRAPHDIR=$(INC)/graph ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-win32) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-os2) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-beos) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-netware) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-emx) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-wince) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-android) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-aros) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc-aix) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),x86_64-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),x86_64-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-wince) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-gba) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-nds) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),arm-android) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),powerpc64-aix) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),mips-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),mipsel-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),mipsel-android) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),jvm-java) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),jvm-android) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i8086-msdos) -override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm clipboard datatypes asl ahi tinygl get9 muihelper +override TARGET_UNITS+=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl math typinfo charset cpall getopts types rtlconsts sysconst endif ifeq ($(FULL_TARGET),i386-linux) override TARGET_IMPLICITUNITS+=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852 diff --git a/rtl/morphos/Makefile.fpc b/rtl/morphos/Makefile.fpc index 6595b440e9..99f0c57076 100644 --- a/rtl/morphos/Makefile.fpc +++ b/rtl/morphos/Makefile.fpc @@ -11,15 +11,16 @@ units=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings \ dos heaptrc ctypes \ sysutils classes fgl math typinfo \ charset cpall getopts \ - types rtlconsts sysconst \ - exec timer doslib utility hardware inputevent keymap graphics layers \ - intuition aboxlib mui \ + types rtlconsts sysconst + +# exec timer doslib utility hardware inputevent keymap graphics layers +# intuition aboxlib mui # these units are here, because they depend on system interface units above - kvm \ +# kvm \ # disabled temporarily because it doesn't build # sockets \ # these can be moved to packages later - clipboard datatypes asl ahi tinygl get9 muihelper +# clipboard datatypes asl ahi tinygl get9 muihelper #implicitunits=exeinfo\ implicitunits=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \ cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852 diff --git a/rtl/morphos/doslib.pp b/rtl/morphos/doslib.pp deleted file mode 100644 index 68c72371f5..0000000000 --- a/rtl/morphos/doslib.pp +++ /dev/null @@ -1,136 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. - - dos.library interface unit for MorphOS/PowerPC - - MorphOS port was done on a free Pegasos II/G4 machine - provided by Genesi S.a.r.l. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{$INLINE ON} - -unit doslib; - -interface - -uses Exec, Timer; - -var - DosBase: Pointer; - - -{$include doslibd.inc} -{$include doslibf.inc} - - -{ * dos global definitions (V50) - ********************************************************************* - * } - -function BADDR(x: LongInt): Pointer; Inline; -function MKBADDR(x: Pointer): LongInt; Inline; - - -{ * dos stdio definitions - ********************************************************************* - * } - -function ReadChar: LongInt; Inline; -function WriteChar(ch: Char): LongInt; Inline; -function UnReadChar(ch: Char): LongInt; Inline; -function ReadChars(buf: Pointer; num: LongInt): LongInt; Inline; -function dosReadLn(buf: PChar; num: LongInt): PChar; Inline; -function WriteStr(str: PChar): LongInt; Inline; -procedure VWritef(format: PChar; argv: Pointer); Inline; - - -{ * calls with tags workarounds (should be removed later) - ********************************************************************* - * } - -function CreateNewProcTags(tags: array of dword): PProcess; Inline; - - - -implementation - - -{ * dos stdio definitions - ********************************************************************* - * } - -function ReadChar: LongInt; Inline; -begin - ReadChar:=FGetC(dosInput); -end; - -function WriteChar(ch: Char): LongInt; Inline; -begin - WriteChar:=FPutC(dosOutput,Byte(ch)); -end; - -function UnReadChar(ch: Char): LongInt; Inline; -begin - UnReadChar:=UnGetC(dosInput,Byte(ch)); -end; - -function ReadChars(buf: Pointer; num: LongInt): LongInt; Inline; -begin - ReadChars:=FRead(dosInput,buf,1,num); -end; - -function dosReadLn(buf: PChar; num: LongInt): PChar; Inline; -begin - dosReadLn:=FGets(dosInput,buf,num); -end; - -function WriteStr(str: PChar): LongInt; Inline; -begin - WriteStr:=FPuts(dosOutput,str); -end; - -procedure VWritef(format: PChar; argv: Pointer); Inline; -begin - VFWritef(dosOutput,format,argv); -end; - - - -{ * dos global definitions (V50) - ********************************************************************* - * } - - -function BADDR(x: LongInt): Pointer; Inline; -begin - BADDR:=Pointer(x Shl 2); -end; - -function MKBADDR(x: Pointer): LongInt; Inline; -begin - MKBADDR:=LongInt(x) Shr 2; -end; - - - -{ * calls with tags workarounds (should be removed later) - ********************************************************************* - * } - -function CreateNewProcTags(tags: array of DWord): PProcess; Inline; -begin - CreateNewProcTags:=CreateNewProc(@tags); -end; - - -begin - DosBase:=MOS_DOSBase; -end. diff --git a/rtl/morphos/exec.pp b/rtl/morphos/exec.pp deleted file mode 100644 index 60b27d690a..0000000000 --- a/rtl/morphos/exec.pp +++ /dev/null @@ -1,51 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. - - exec.library interface unit for MorphOS/PowerPC - - MorphOS port was done on a free Pegasos II/G4 machine - provided by Genesi S.a.r.l. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -unit exec; - -interface - -var - ExecBase: Pointer; - -{$include execd.inc} -{$include execf.inc} - - -function NewGetTaskAttrs(Task : PTask; - Data : Pointer; - DataSize: Cardinal; - TType : Cardinal; - Tags : array of DWord): Cardinal; Inline; - -implementation - - -function NewGetTaskAttrs(Task : PTask; - Data : Pointer; - DataSize: Cardinal; - TType : Cardinal; - Tags : array of DWord): Cardinal; Inline; -begin - NewGetTaskAttrs:=NewGetTaskAttrsA(Task,Data,DataSize,TType,@Tags); -end; - - -begin - ExecBase:=MOS_ExecBase; -end. diff --git a/rtl/morphos/timer.pp b/rtl/morphos/timer.pp deleted file mode 100644 index 47f74ee60a..0000000000 --- a/rtl/morphos/timer.pp +++ /dev/null @@ -1,35 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. - - timer.device interface unit for MorphOS/PowerPC - - MorphOS port was done on a free Pegasos II/G4 machine - provided by Genesi S.a.r.l. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -unit timer; - -interface - -uses - exec; - -var - TimerBase : Pointer; - -{$include timerd.inc} -{$include timerf.inc} - -implementation - -begin -end. diff --git a/rtl/morphos/utility.pp b/rtl/morphos/utility.pp deleted file mode 100644 index 9db0b0e75b..0000000000 --- a/rtl/morphos/utility.pp +++ /dev/null @@ -1,52 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 2004 Karoly Balogh for Genesi S.a.r.l. - - utility.library interface unit for MorphOS/PowerPC - - MorphOS port was done on a free Pegasos II/G4 machine - provided by Genesi S.a.r.l. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{$inline on} -unit utility; - -interface - -uses - exec; - -var - UtilityBase: Pointer; - -{$include utild1.inc} -{$include utild2.inc} -{$include utilf.inc} - -function TAG_(value: pointer): longword; inline; -function TAG_(value: pchar): longword; inline; - - -implementation - -function TAG_(value: pointer): longword; inline; -begin - TAG_:=longword(value); -end; - -function TAG_(value: pchar): longword; inline; -begin - TAG_:=longword(value); -end; - - -begin - UtilityBase:=MOS_UtilityBase; -end.