mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 23:22:25 +00:00
Integrate rangechecked casting correction from @svorkoetter.
This commit is contained in:
parent
8890fe1336
commit
6842928bf8
188 changed files with 614 additions and 614 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -35,3 +35,7 @@
|
|||
**/.tmp.*
|
||||
/*.pdb
|
||||
/*.ilk
|
||||
/t/*
|
||||
/triage/BasicTypeSize.md
|
||||
/triage/Roadmap.md
|
||||
triage/system/*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue