Update C bootstrap sources

This commit is contained in:
David Brown 2016-11-27 16:49:12 +00:00
parent 6a7cba23a7
commit c630f86399
185 changed files with 310 additions and 245 deletions

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -60,6 +60,7 @@ export ADDRESS *Files_FileDesc__typ;
export ADDRESS *Files_BufDesc__typ; export ADDRESS *Files_BufDesc__typ;
export ADDRESS *Files_Rider__typ; export ADDRESS *Files_Rider__typ;
static void Files_Assert (BOOLEAN truth);
export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ);
static Files_File Files_CacheEntry (Platform_FileIdentity identity); static Files_File Files_CacheEntry (Platform_FileIdentity identity);
export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res);
@ -111,6 +112,14 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS
#define Files_IdxTrap() __HALT(-1) #define Files_IdxTrap() __HALT(-1)
#define Files_ToAdr(x) (ADDRESS)x #define Files_ToAdr(x) (ADDRESS)x
static void Files_Assert (BOOLEAN truth)
{
if (!truth) {
Out_Ln();
__ASSERT(truth, 0);
}
}
static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
{ {
__DUP(s, s__len, CHAR); __DUP(s, s__len, CHAR);
@ -526,7 +535,7 @@ void Files_GetDate (Files_File f, INT32 *t, INT32 *d)
INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ) INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ)
{ {
__ASSERT((*r).offset <= 4096, 0); Files_Assert((*r).offset <= 4096);
return (*r).org + (*r).offset; return (*r).org + (*r).offset;
} }
@ -585,7 +594,7 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos)
org = 0; org = 0;
offset = 0; offset = 0;
} }
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
(*r).buf = buf; (*r).buf = buf;
(*r).org = org; (*r).org = org;
(*r).offset = offset; (*r).offset = offset;
@ -604,7 +613,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset <= buf->size, 0); Files_Assert(offset <= buf->size);
if (offset < buf->size) { if (offset < buf->size) {
*x = buf->data[offset]; *x = buf->data[offset];
(*r).offset = offset + 1; (*r).offset = offset + 1;
@ -649,7 +658,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x
(*r).offset = offset; (*r).offset = offset;
xpos += min; xpos += min;
n -= min; n -= min;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
} }
(*r).res = 0; (*r).res = 0;
(*r).eof = 0; (*r).eof = 0;
@ -666,13 +675,13 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x)
INT32 offset; INT32 offset;
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if ((*r).org != buf->org || offset >= 4096) { if ((*r).org != buf->org || offset >= 4096) {
Files_Set(&*r, r__typ, buf->f, (*r).org + offset); Files_Set(&*r, r__typ, buf->f, (*r).org + offset);
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset < 4096, 0); Files_Assert(offset < 4096);
buf->data[offset] = x; buf->data[offset] = x;
buf->chg = 1; buf->chg = 1;
if (offset == buf->size) { if (offset == buf->size) {
@ -694,13 +703,13 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
while (n > 0) { while (n > 0) {
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if ((*r).org != buf->org || offset >= 4096) { if ((*r).org != buf->org || offset >= 4096) {
Files_Set(&*r, r__typ, buf->f, (*r).org + offset); Files_Set(&*r, r__typ, buf->f, (*r).org + offset);
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
restInBuf = 4096 - offset; restInBuf = 4096 - offset;
if (n > restInBuf) { if (n > restInBuf) {
min = restInBuf; min = restInBuf;
@ -710,7 +719,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
__MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min);
offset += min; offset += min;
(*r).offset = offset; (*r).offset = offset;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if (offset > buf->size) { if (offset > buf->size) {
buf->f->len += offset - buf->size; buf->f->len += offset - buf->size;
buf->size = offset; buf->size = offset;
@ -919,7 +928,7 @@ void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__
Files_Read(&*R, R__typ, (void*)&b); Files_Read(&*R, R__typ, (void*)&b);
} }
q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s); q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s);
__ASSERT(x__len <= 8, 0); Files_Assert(x__len <= 8);
__MOVE((ADDRESS)&q, (ADDRESS)x, x__len); __MOVE((ADDRESS)&q, (ADDRESS)x, x__len);
} }

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -269,7 +269,11 @@ void Modules_AssertFail (INT32 code)
Modules_errstring((CHAR*)".", 2); Modules_errstring((CHAR*)".", 2);
} }
Modules_errstring(Platform_NL, 3); Modules_errstring(Platform_NL, 3);
Platform_Exit(code); if (code > 0) {
Platform_Exit(code);
} else {
Platform_Exit(-1);
}
} }
__TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}}; __TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}};

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef VT100__h #ifndef VT100__h
#define VT100__h #define VT100__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -60,6 +60,7 @@ export ADDRESS *Files_FileDesc__typ;
export ADDRESS *Files_BufDesc__typ; export ADDRESS *Files_BufDesc__typ;
export ADDRESS *Files_Rider__typ; export ADDRESS *Files_Rider__typ;
static void Files_Assert (BOOLEAN truth);
export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ);
static Files_File Files_CacheEntry (Platform_FileIdentity identity); static Files_File Files_CacheEntry (Platform_FileIdentity identity);
export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res);
@ -111,6 +112,14 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS
#define Files_IdxTrap() __HALT(-1) #define Files_IdxTrap() __HALT(-1)
#define Files_ToAdr(x) (ADDRESS)x #define Files_ToAdr(x) (ADDRESS)x
static void Files_Assert (BOOLEAN truth)
{
if (!truth) {
Out_Ln();
__ASSERT(truth, 0);
}
}
static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
{ {
__DUP(s, s__len, CHAR); __DUP(s, s__len, CHAR);
@ -526,7 +535,7 @@ void Files_GetDate (Files_File f, INT32 *t, INT32 *d)
INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ) INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ)
{ {
__ASSERT((*r).offset <= 4096, 0); Files_Assert((*r).offset <= 4096);
return (*r).org + (*r).offset; return (*r).org + (*r).offset;
} }
@ -585,7 +594,7 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos)
org = 0; org = 0;
offset = 0; offset = 0;
} }
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
(*r).buf = buf; (*r).buf = buf;
(*r).org = org; (*r).org = org;
(*r).offset = offset; (*r).offset = offset;
@ -604,7 +613,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset <= buf->size, 0); Files_Assert(offset <= buf->size);
if (offset < buf->size) { if (offset < buf->size) {
*x = buf->data[offset]; *x = buf->data[offset];
(*r).offset = offset + 1; (*r).offset = offset + 1;
@ -649,7 +658,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x
(*r).offset = offset; (*r).offset = offset;
xpos += min; xpos += min;
n -= min; n -= min;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
} }
(*r).res = 0; (*r).res = 0;
(*r).eof = 0; (*r).eof = 0;
@ -666,13 +675,13 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x)
INT32 offset; INT32 offset;
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if ((*r).org != buf->org || offset >= 4096) { if ((*r).org != buf->org || offset >= 4096) {
Files_Set(&*r, r__typ, buf->f, (*r).org + offset); Files_Set(&*r, r__typ, buf->f, (*r).org + offset);
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset < 4096, 0); Files_Assert(offset < 4096);
buf->data[offset] = x; buf->data[offset] = x;
buf->chg = 1; buf->chg = 1;
if (offset == buf->size) { if (offset == buf->size) {
@ -694,13 +703,13 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
while (n > 0) { while (n > 0) {
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if ((*r).org != buf->org || offset >= 4096) { if ((*r).org != buf->org || offset >= 4096) {
Files_Set(&*r, r__typ, buf->f, (*r).org + offset); Files_Set(&*r, r__typ, buf->f, (*r).org + offset);
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
restInBuf = 4096 - offset; restInBuf = 4096 - offset;
if (n > restInBuf) { if (n > restInBuf) {
min = restInBuf; min = restInBuf;
@ -710,7 +719,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
__MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min);
offset += min; offset += min;
(*r).offset = offset; (*r).offset = offset;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if (offset > buf->size) { if (offset > buf->size) {
buf->f->len += offset - buf->size; buf->f->len += offset - buf->size;
buf->size = offset; buf->size = offset;
@ -919,7 +928,7 @@ void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__
Files_Read(&*R, R__typ, (void*)&b); Files_Read(&*R, R__typ, (void*)&b);
} }
q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s); q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s);
__ASSERT(x__len <= 8, 0); Files_Assert(x__len <= 8);
__MOVE((ADDRESS)&q, (ADDRESS)x, x__len); __MOVE((ADDRESS)&q, (ADDRESS)x, x__len);
} }

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -269,7 +269,11 @@ void Modules_AssertFail (INT32 code)
Modules_errstring((CHAR*)".", 2); Modules_errstring((CHAR*)".", 2);
} }
Modules_errstring(Platform_NL, 3); Modules_errstring(Platform_NL, 3);
Platform_Exit(code); if (code > 0) {
Platform_Exit(code);
} else {
Platform_Exit(-1);
}
} }
__TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}}; __TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}};

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef VT100__h #ifndef VT100__h
#define VT100__h #define VT100__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -60,6 +60,7 @@ export ADDRESS *Files_FileDesc__typ;
export ADDRESS *Files_BufDesc__typ; export ADDRESS *Files_BufDesc__typ;
export ADDRESS *Files_Rider__typ; export ADDRESS *Files_Rider__typ;
static void Files_Assert (BOOLEAN truth);
export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ);
static Files_File Files_CacheEntry (Platform_FileIdentity identity); static Files_File Files_CacheEntry (Platform_FileIdentity identity);
export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res);
@ -111,6 +112,14 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS
#define Files_IdxTrap() __HALT(-1) #define Files_IdxTrap() __HALT(-1)
#define Files_ToAdr(x) (ADDRESS)x #define Files_ToAdr(x) (ADDRESS)x
static void Files_Assert (BOOLEAN truth)
{
if (!truth) {
Out_Ln();
__ASSERT(truth, 0);
}
}
static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
{ {
__DUP(s, s__len, CHAR); __DUP(s, s__len, CHAR);
@ -526,7 +535,7 @@ void Files_GetDate (Files_File f, INT32 *t, INT32 *d)
INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ) INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ)
{ {
__ASSERT((*r).offset <= 4096, 0); Files_Assert((*r).offset <= 4096);
return (*r).org + (*r).offset; return (*r).org + (*r).offset;
} }
@ -585,7 +594,7 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos)
org = 0; org = 0;
offset = 0; offset = 0;
} }
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
(*r).buf = buf; (*r).buf = buf;
(*r).org = org; (*r).org = org;
(*r).offset = offset; (*r).offset = offset;
@ -604,7 +613,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset <= buf->size, 0); Files_Assert(offset <= buf->size);
if (offset < buf->size) { if (offset < buf->size) {
*x = buf->data[offset]; *x = buf->data[offset];
(*r).offset = offset + 1; (*r).offset = offset + 1;
@ -649,7 +658,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x
(*r).offset = offset; (*r).offset = offset;
xpos += min; xpos += min;
n -= min; n -= min;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
} }
(*r).res = 0; (*r).res = 0;
(*r).eof = 0; (*r).eof = 0;
@ -666,13 +675,13 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x)
INT32 offset; INT32 offset;
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if ((*r).org != buf->org || offset >= 4096) { if ((*r).org != buf->org || offset >= 4096) {
Files_Set(&*r, r__typ, buf->f, (*r).org + offset); Files_Set(&*r, r__typ, buf->f, (*r).org + offset);
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset < 4096, 0); Files_Assert(offset < 4096);
buf->data[offset] = x; buf->data[offset] = x;
buf->chg = 1; buf->chg = 1;
if (offset == buf->size) { if (offset == buf->size) {
@ -694,13 +703,13 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
while (n > 0) { while (n > 0) {
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if ((*r).org != buf->org || offset >= 4096) { if ((*r).org != buf->org || offset >= 4096) {
Files_Set(&*r, r__typ, buf->f, (*r).org + offset); Files_Set(&*r, r__typ, buf->f, (*r).org + offset);
buf = (*r).buf; buf = (*r).buf;
offset = (*r).offset; offset = (*r).offset;
} }
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
restInBuf = 4096 - offset; restInBuf = 4096 - offset;
if (n > restInBuf) { if (n > restInBuf) {
min = restInBuf; min = restInBuf;
@ -710,7 +719,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
__MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min);
offset += min; offset += min;
(*r).offset = offset; (*r).offset = offset;
__ASSERT(offset <= 4096, 0); Files_Assert(offset <= 4096);
if (offset > buf->size) { if (offset > buf->size) {
buf->f->len += offset - buf->size; buf->f->len += offset - buf->size;
buf->size = offset; buf->size = offset;
@ -919,7 +928,7 @@ void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__
Files_Read(&*R, R__typ, (void*)&b); Files_Read(&*R, R__typ, (void*)&b);
} }
q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s); q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s);
__ASSERT(x__len <= 8, 0); Files_Assert(x__len <= 8);
__MOVE((ADDRESS)&q, (ADDRESS)x, x__len); __MOVE((ADDRESS)&q, (ADDRESS)x, x__len);
} }

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -269,7 +269,11 @@ void Modules_AssertFail (INT32 code)
Modules_errstring((CHAR*)".", 2); Modules_errstring((CHAR*)".", 2);
} }
Modules_errstring(Platform_NL, 3); Modules_errstring(Platform_NL, 3);
Platform_Exit(code); if (code > 0) {
Platform_Exit(code);
} else {
Platform_Exit(-1);
}
} }
__TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 64), {0, 32, -24}}; __TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 64), {0, 32, -24}};

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

Some files were not shown because too many files have changed in this diff Show more