Use SYSTEM.ADDRESS in libraries. Build all with -O2. Support INC(a,b) for any int a,b that support a:=a+b.

This commit is contained in:
David Brown 2016-09-23 13:04:24 +01:00
parent f1cbbdba28
commit 22a4f8e263
92 changed files with 2752 additions and 2695 deletions

View file

@ -7,75 +7,75 @@
typedef
struct Platform_FileIdentity {
int64 volume, index, mtime;
int32 volume, index, mtime;
} Platform_FileIdentity;
typedef
void (*Platform_HaltProcedure)(int64);
void (*Platform_HaltProcedure)(int32);
typedef
void (*Platform_SignalHandler)(int32);
void (*Platform_SignalHandler)(int16);
import BOOLEAN Platform_LittleEndian;
import address Platform_MainStackFrame;
import int64 Platform_HaltCode;
import int32 Platform_PID;
import int32 Platform_HaltCode;
import int16 Platform_PID;
import CHAR Platform_CWD[256];
import int32 Platform_ArgCount;
import int16 Platform_ArgCount;
import address Platform_ArgVector;
import int32 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd;
import int16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd;
import CHAR Platform_nl[3];
import address *Platform_FileIdentity__typ;
import BOOLEAN Platform_Absent (int32 e);
import int32 Platform_ArgPos (CHAR *s, LONGINT s__len);
import void Platform_AssertFail (int64 code);
import int32 Platform_Chdir (CHAR *n, LONGINT n__len);
import int32 Platform_Close (int64 h);
import BOOLEAN Platform_ConnectionFailed (int32 e);
import void Platform_Delay (int64 ms);
import BOOLEAN Platform_DifferentFilesystems (int32 e);
import int32 Platform_Error (void);
import void Platform_Exit (int32 code);
import void Platform_GetArg (int32 n, CHAR *val, LONGINT val__len);
import void Platform_GetClock (int64 *t, int64 *d);
import BOOLEAN Platform_Absent (int16 e);
import int16 Platform_ArgPos (CHAR *s, LONGINT s__len);
import void Platform_AssertFail (int32 code);
import int16 Platform_Chdir (CHAR *n, LONGINT n__len);
import int16 Platform_Close (int32 h);
import BOOLEAN Platform_ConnectionFailed (int16 e);
import void Platform_Delay (int32 ms);
import BOOLEAN Platform_DifferentFilesystems (int16 e);
import int16 Platform_Error (void);
import void Platform_Exit (int16 code);
import void Platform_GetArg (int16 n, CHAR *val, LONGINT val__len);
import void Platform_GetClock (int32 *t, int32 *d);
import void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len);
import void Platform_GetIntArg (int32 n, int64 *val);
import void Platform_GetTimeOfDay (int64 *sec, int64 *usec);
import void Platform_Halt (int64 code);
import int32 Platform_Identify (int64 h, Platform_FileIdentity *identity, address *identity__typ);
import int32 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, address *identity__typ);
import BOOLEAN Platform_Inaccessible (int32 e);
import void Platform_Init (int32 argc, address argvadr);
import void Platform_MTimeAsClock (Platform_FileIdentity i, int64 *t, int64 *d);
import int32 Platform_New (CHAR *n, LONGINT n__len, int64 *h);
import BOOLEAN Platform_NoSuchDirectory (int32 e);
import void Platform_GetIntArg (int16 n, int32 *val);
import void Platform_GetTimeOfDay (int32 *sec, int32 *usec);
import void Platform_Halt (int32 code);
import int16 Platform_Identify (int32 h, Platform_FileIdentity *identity, address *identity__typ);
import int16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, address *identity__typ);
import BOOLEAN Platform_Inaccessible (int16 e);
import void Platform_Init (int16 argc, address argvadr);
import void Platform_MTimeAsClock (Platform_FileIdentity i, int32 *t, int32 *d);
import int16 Platform_New (CHAR *n, LONGINT n__len, int32 *h);
import BOOLEAN Platform_NoSuchDirectory (int16 e);
import address Platform_OSAllocate (address size);
import void Platform_OSFree (address address);
import int32 Platform_OldRO (CHAR *n, LONGINT n__len, int64 *h);
import int32 Platform_OldRW (CHAR *n, LONGINT n__len, int64 *h);
import int32 Platform_Read (int64 h, address p, int64 l, int64 *n);
import int32 Platform_ReadBuf (int64 h, SYSTEM_BYTE *b, LONGINT b__len, int64 *n);
import int32 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len);
import int16 Platform_OldRO (CHAR *n, LONGINT n__len, int32 *h);
import int16 Platform_OldRW (CHAR *n, LONGINT n__len, int32 *h);
import int16 Platform_Read (int32 h, address p, int32 l, int32 *n);
import int16 Platform_ReadBuf (int32 h, SYSTEM_BYTE *b, LONGINT b__len, int32 *n);
import int16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len);
import BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2);
import BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2);
import int32 Platform_Seek (int64 h, int64 offset, int32 whence);
import int16 Platform_Seek (int32 h, int32 offset, int16 whence);
import void Platform_SetBadInstructionHandler (Platform_SignalHandler handler);
import void Platform_SetHalt (Platform_HaltProcedure p);
import void Platform_SetInterruptHandler (Platform_SignalHandler handler);
import void Platform_SetMTime (Platform_FileIdentity *target, address *target__typ, Platform_FileIdentity source);
import void Platform_SetQuitHandler (Platform_SignalHandler handler);
import int32 Platform_Size (int64 h, int64 *l);
import int32 Platform_Sync (int64 h);
import int32 Platform_System (CHAR *cmd, LONGINT cmd__len);
import int64 Platform_Time (void);
import BOOLEAN Platform_TimedOut (int32 e);
import BOOLEAN Platform_TooManyFiles (int32 e);
import int32 Platform_Truncate (int64 h, int64 l);
import int32 Platform_Unlink (CHAR *n, LONGINT n__len);
import int32 Platform_Write (int64 h, address p, address l);
import int16 Platform_Size (int32 h, int32 *l);
import int16 Platform_Sync (int32 h);
import int16 Platform_System (CHAR *cmd, LONGINT cmd__len);
import int32 Platform_Time (void);
import BOOLEAN Platform_TimedOut (int16 e);
import BOOLEAN Platform_TooManyFiles (int16 e);
import int16 Platform_Truncate (int32 h, int32 l);
import int16 Platform_Unlink (CHAR *n, LONGINT n__len);
import int16 Platform_Write (int32 h, address p, int32 l);
import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len);
import void *Platform__init(void);