From 6842928bf8b435966f625a699fa8186c3fd26900 Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 4 Jan 2019 18:54:55 +0000 Subject: [PATCH 1/5] Integrate rangechecked casting correction from @svorkoetter. --- .gitignore | 4 +++ bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 30 ++++++++++----------- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 4 +-- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 8 +++--- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 12 ++++----- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 24 ++++++++--------- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 10 +++---- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 12 ++++----- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 7 +++-- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 18 ++++++------- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 20 +++++++------- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 6 ++--- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 28 +++++++++---------- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 4 +-- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 4 +-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 30 ++++++++++----------- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 4 +-- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 8 +++--- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 12 ++++----- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 24 ++++++++--------- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 10 +++---- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 12 ++++----- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 7 +++-- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 18 ++++++------- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 20 +++++++------- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 6 ++--- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 28 +++++++++---------- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 4 +-- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 4 +-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 30 ++++++++++----------- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 4 +-- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 8 +++--- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 12 ++++----- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 24 ++++++++--------- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 10 +++---- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 12 ++++----- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 7 +++-- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 18 ++++++------- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 20 +++++++------- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 6 ++--- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 28 +++++++++---------- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 4 +-- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 4 +-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 30 ++++++++++----------- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 4 +-- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 8 +++--- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 12 ++++----- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 24 ++++++++--------- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 10 +++---- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 12 ++++----- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 7 +++-- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 18 ++++++------- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 20 +++++++------- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 6 ++--- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 28 +++++++++---------- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 4 +-- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 4 +-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 30 ++++++++++----------- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 4 +-- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 8 +++--- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 12 ++++----- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 24 ++++++++--------- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 10 +++---- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 12 ++++----- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 7 +++-- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 18 ++++++------- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 20 +++++++------- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 6 ++--- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 28 +++++++++---------- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 4 +-- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 4 +-- bootstrap/windows-88/extTools.h | 2 +- src/compiler/OPV.Mod | 9 ++++--- src/tools/make/oberon.mk | 40 ++++++++++++++-------------- 188 files changed, 614 insertions(+), 614 deletions(-) diff --git a/.gitignore b/.gitignore index cce16916..22c5a97d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ **/.tmp.* /*.pdb /*.ilk +/t/* +/triage/BasicTypeSize.md +/triage/Roadmap.md +triage/system/* diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 867c33a4..8f2c5d55 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -206,7 +206,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -214,7 +214,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index f0e783a2..f0a69373 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index bd4ed5a8..31e05d3d 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 8d7eb8e5..6ab10893 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 8ae1f5fb..0e237dea 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 9d10f4ac..6dc9bb50 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index e6b33367..3f9ab009 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 54a9f7c8..3c2474d3 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index bc38d46b..a60c37a0 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index ebe18cc4..a56a7417 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index fc5b46c6..5bb316dd 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(1, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 5e716822..9b4b1656 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 3c3d06cb..f19b815c 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 6d66b07b..74d010d1 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index c706a783..060cd98a 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 867c33a4..8f2c5d55 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -206,7 +206,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -214,7 +214,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index f0e783a2..f0a69373 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index bd4ed5a8..31e05d3d 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 8d7eb8e5..6ab10893 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 8ae1f5fb..0e237dea 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 9d10f4ac..6dc9bb50 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index e6b33367..3f9ab009 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 54a9f7c8..3c2474d3 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 1897f024..1bf52545 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index ebe18cc4..a56a7417 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index fc5b46c6..5bb316dd 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(1, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 5e716822..9b4b1656 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 3c3d06cb..f19b815c 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 2726593a..8096bc1d 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 714d9ac5..f7b5d487 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index dd5e8a22..9b17254c 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -206,7 +206,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -214,7 +214,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index f74b89a5..441c4007 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index eb19a612..9e3f5ae9 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index ab574eed..5db19e82 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 3c88874e..b0840e01 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 3f97dc19..be398042 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 28e1ec4b..7079d9d3 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 7508ac7a..bfbc425e 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 57dfaa59..fe093273 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index bad459b6..777dee8c 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index fc5b46c6..5bb316dd 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(1, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index e578c349..0e52a0fe 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index fefe3da8..13166a06 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 6a06c85c..9fb45ce9 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index e4aa3a7d..93a7b381 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index b6b62f3c..923a2d90 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -206,7 +206,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -214,7 +214,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 2e6b98b9..5524bb64 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index bd4ed5a8..31e05d3d 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 8d7eb8e5..6ab10893 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 276b9857..917d5517 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 9d10f4ac..6dc9bb50 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index e6b33367..3f9ab009 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 54a9f7c8..3c2474d3 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 1897f024..1bf52545 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index ebe18cc4..a56a7417 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 2407ec4e..c1cc48bd 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(Platform_StdOut, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 9e7d70ee..1e9d3fdd 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 9c125f90..e7e58fb1 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 2726593a..8096bc1d 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 714d9ac5..f7b5d487 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index c473c7b3..4c53ff0e 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -207,7 +207,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -215,7 +215,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -949,18 +949,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -969,10 +969,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1003,10 +1003,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 032d28c2..96331322 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index eb19a612..9e3f5ae9 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index ab574eed..5db19e82 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index b3c05745..294e8d2f 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 3f97dc19..be398042 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 28e1ec4b..7079d9d3 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 7508ac7a..bfbc425e 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 57dfaa59..fe093273 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index bad459b6..777dee8c 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 2407ec4e..c1cc48bd 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(Platform_StdOut, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 6f55e803..36884101 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index ba866b78..1544c29b 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 6a06c85c..9fb45ce9 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index e4aa3a7d..93a7b381 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index 3c561714..964f60e1 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -204,7 +204,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 END; END Precedence; - PROCEDURE^ expr (n: OPT.Node; prec: INTEGER); + PROCEDURE^ expr (n: OPT.Node; prec: INTEGER); PROCEDURE^ design(n: OPT.Node; prec: INTEGER); PROCEDURE Len(n: OPT.Node; dim: SYSTEM.INT64); @@ -241,7 +241,8 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 ELSE IF (n.typ.size # to) & ((n.typ.size > OPM.CIntSize) OR (to # OPM.CIntSize)) THEN OPM.WriteString("(INT"); OPM.WriteInt(to*8); OPM.WriteString(")") - END + END; + Entier(n, 9) END END SizeCast; @@ -250,13 +251,13 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 BEGIN from := n^.typ^.form; to := newtype.form; IF to = OPT.Set THEN IF from = OPT.Set THEN (* Sets of different size *) - SizeCast(n, newtype.size); Entier(n, 9) + SizeCast(n, newtype.size); ELSE (* Set from integer *) OPM.WriteString("__SETOF("); Entier(n, MinPrec); OPM.WriteString(","); OPM.WriteInt(newtype.size*8); OPM.Write(CloseParen) END ELSIF to = OPT.Int THEN (* integers of different size *) - SizeCast(n, newtype.size); Entier(n, 9) + SizeCast(n, newtype.size); ELSIF to = OPT.Char THEN IF OPM.ranchk IN OPM.Options THEN OPM.WriteString("__CHR"); IF SideEffects(n) THEN OPM.Write("F") END ; diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 581f3117..20654d40 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -60,7 +60,7 @@ assemble: @printf ' DATAMODEL: %s\n' "$(DATAMODEL)" cd $(BUILDDIR) && $(COMPILE) -c SYSTEM.c Configuration.c Platform.c Heap.c - cd $(BUILDDIR) && $(COMPILE) -c Out.c Reals.c Strings.c Modules.c + cd $(BUILDDIR) && $(COMPILE) -c Out.c Reals.c Strings.c Modules.c cd $(BUILDDIR) && $(COMPILE) -c Files.c Texts.c VT100.c cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c @@ -103,25 +103,25 @@ translate: @mkdir -p $(BUILDDIR) @rm -f $(BUILDDIR)/*.sym - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../Configuration.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Platform$(PLATFORM).Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsFapx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Heap.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Strings.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Out.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Modules.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/extTools.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPT.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPC.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPV.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPB.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPP.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Ssm -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/Compiler.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../Configuration.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Platform$(PLATFORM).Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrFapx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Heap.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Strings.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Out.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Modules.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/extTools.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPT.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPC.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPV.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPB.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPP.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Ssrm -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/Compiler.Mod cp src/runtime/*.[ch] $(BUILDDIR) cp src/runtime/*.Txt $(BUILDDIR) From 2e93bc09098e750e8c4f7b5ffa97893d9ed8b352 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 7 Jan 2019 18:10:33 +0000 Subject: [PATCH 2/5] Correct the other reference to the windows installation doc. --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index d159399c..66265334 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -95,7 +95,7 @@ For reference this will be: | Just `make full` | `export PATH="your-repository-clone/install/bin:$PATH"` | | `make install` on Linux | `export PATH="/opt/voc/bin:$PATH"` | | `make install` on BSD | `export PATH="/usr/local/share/voc/bin:$PATH"` | -| `make install` on Windows | See [**Windows installation**](/doc/WInstallation.md) | +| `make install` on Windows | See [**Windows installation**](/doc/Winstallation.md) | | `make install` on Termux | `export PATH="/data/data/com.termux/files/opt/voc/bin:$PATH"` | Also see [**Installation**](/doc/Installation.md). From 5e903cb3d9372729d65026adb1e8db5a4b6c80df Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 7 Jan 2019 18:47:15 +0000 Subject: [PATCH 3/5] Trigger build --- src/tools/autobuild/trigger-build | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/tools/autobuild/trigger-build diff --git a/src/tools/autobuild/trigger-build b/src/tools/autobuild/trigger-build new file mode 100644 index 00000000..e69de29b From e07c1250170e95bf27f55af6f67b7cabea69b94b Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 7 Jan 2019 18:58:35 +0000 Subject: [PATCH 4/5] Trigger again --- src/tools/autobuild/trigger-build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/autobuild/trigger-build b/src/tools/autobuild/trigger-build index e69de29b..a15e1851 100644 --- a/src/tools/autobuild/trigger-build +++ b/src/tools/autobuild/trigger-build @@ -0,0 +1 @@ +again From e3a07e77fa3a04555c3774934ab503d56181509d Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 7 Jan 2019 19:17:34 +0000 Subject: [PATCH 5/5] Trigger again --- src/tools/autobuild/trigger-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/autobuild/trigger-build b/src/tools/autobuild/trigger-build index a15e1851..9b24da92 100644 --- a/src/tools/autobuild/trigger-build +++ b/src/tools/autobuild/trigger-build @@ -1 +1 @@ -again +another