bootstrap c sources.

This commit is contained in:
Norayr Chilingarian 2026-07-10 04:05:39 +04:00
parent 49f9e55630
commit 93c0198f18
185 changed files with 889 additions and 647 deletions

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __MOVE("2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -82,6 +82,7 @@ OPT_Node OPB_NewLeaf (OPT_Object obj)
break; break;
case 2: case 2:
node = OPT_NewNode(1); node = OPT_NewNode(1);
node->readonly = obj->vis == 3;
break; break;
case 3: case 3:
node = OPT_NewNode(7); node = OPT_NewNode(7);
@ -253,7 +254,7 @@ OPT_Node OPB_NewString (OPS_String str, INT64 len)
x->conval->intval = -1; x->conval->intval = -1;
x->conval->intval2 = OPM_Longint(len); x->conval->intval2 = OPM_Longint(len);
x->conval->ext = OPT_NewExt(); x->conval->ext = OPT_NewExt();
__MOVE(str, *x->conval->ext, 256); __MOVE(str, *x->conval->ext, 1024);
return x; return x;
} }
@ -1626,7 +1627,6 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
if (x == y) { if (x == y) {
} else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) {
} else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) {
OPB_err(113);
} else if (x->BaseTyp == OPT_chartyp) { } else if (x->BaseTyp == OPT_chartyp) {
if (g == 8) { if (g == 8) {
if (ynode->conval->intval2 > x->n) { if (ynode->conval->intval2 > x->n) {
@ -2423,7 +2423,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
} else { } else {
OPB_CheckLeaf(ap, 0); OPB_CheckLeaf(ap, 0);
} }
if (ap->readonly) { if ((ap->readonly && fp->vis != 3)) {
OPB_err(76); OPB_err(76);
} }
if (fp->typ->comp == 3) { if (fp->typ->comp == 3) {

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -738,7 +738,7 @@ static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len)
INT16 i; INT16 i;
__DUP(y, y__len, CHAR); __DUP(y, y__len, CHAR);
i = 0; i = 0;
while ((*x)[__X(i + 1, 256)] == y[__X(i, y__len)]) { while ((*x)[__X(i + 1, 1024)] == y[__X(i, y__len)]) {
i += 1; i += 1;
} }
__DEL(y); __DEL(y);
@ -764,7 +764,7 @@ static void OPC_CProcDefs (OPT_Object obj, INT16 vis)
_for__7 = (INT16)(*obj->conval->ext)[0]; _for__7 = (INT16)(*obj->conval->ext)[0];
i = i; i = i;
while (i <= _for__7) { while (i <= _for__7) {
OPM_Write((*obj->conval->ext)[__X(i, 256)]); OPM_Write((*obj->conval->ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
OPM_WriteLn(); OPM_WriteLn();
@ -1909,7 +1909,7 @@ void OPC_Constant (OPT_Const con, INT16 form)
} }
break; break;
case 8: case 8:
OPC_StringLiteral(*con->ext, 256, con->intval2 - 1); OPC_StringLiteral(*con->ext, 1024, con->intval2 - 1);
break; break;
case 9: case 9:
OPM_WriteString((CHAR*)"NIL", 4); OPM_WriteString((CHAR*)"NIL", 4);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,7 +19,7 @@ typedef
CHAR OPM_FileName[32]; CHAR OPM_FileName[32];
static CHAR OPM_currentComment[256]; static CHAR OPM_currentComment[1024];
static BOOLEAN OPM_hasComment; static BOOLEAN OPM_hasComment;
static CHAR OPM_SourceFileName[256]; static CHAR OPM_SourceFileName[256];
static CHAR OPM_GlobalModel[10]; static CHAR OPM_GlobalModel[10];
@ -166,11 +166,11 @@ void OPM_StoreComment (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
__DUP(text, text__len, CHAR); __DUP(text, text__len, CHAR);
i = 0; i = 0;
while ((i < 255 && text[__X(i, text__len)] != 0x00)) { while ((i < 1023 && text[__X(i, text__len)] != 0x00)) {
OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)]; OPM_currentComment[__X(i, 1024)] = text[__X(i, text__len)];
i += 1; i += 1;
} }
OPM_currentComment[__X(i, 256)] = 0x00; OPM_currentComment[__X(i, 1024)] = 0x00;
OPM_hasComment = 1; OPM_hasComment = 1;
__DEL(text); __DEL(text);
} }
@ -180,8 +180,8 @@ void OPM_GetComment (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
if (OPM_hasComment) { if (OPM_hasComment) {
i = 0; i = 0;
while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) { while ((((i < text__len && i < 1024)) && OPM_currentComment[__X(i, 1024)] != 0x00)) {
text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)]; text[__X(i, text__len)] = OPM_currentComment[__X(i, 1024)];
i += 1; i += 1;
} }
text[__X(i, text__len)] = 0x00; text[__X(i, text__len)] = 0x00;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -365,7 +365,17 @@ static void OPP_FormalParameters (OPT_Object *firstPar, OPT_Struct *resTyp)
if (OPP_sym == 38) { if (OPP_sym == 38) {
OPT_Insert(OPS_name, &par); OPT_Insert(OPS_name, &par);
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);
par->mode = mode; if (OPP_sym == 7) {
if (mode == 2) {
OPP_err(246);
}
OPS_Get(&OPP_sym);
par->mode = 2;
par->vis = 3;
} else {
par->mode = mode;
par->vis = 0;
}
par->link = NIL; par->link = NIL;
if (first == NIL) { if (first == NIL) {
first = par; first = par;
@ -939,8 +949,8 @@ static void GetCode__19 (void)
(*ProcedureDeclaration__16_s->proc)->conval->ext = ext; (*ProcedureDeclaration__16_s->proc)->conval->ext = ext;
n = 0; n = 0;
if (OPP_sym == 37) { if (OPP_sym == 37) {
while (OPS_str[__X(n, 256)] != 0x00) { while (OPS_str[__X(n, 1024)] != 0x00) {
(*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; (*ext)[__X(n + 1, 1024)] = OPS_str[__X(n, 1024)];
n += 1; n += 1;
} }
(*ext)[0] = __CHR(n); (*ext)[0] = __CHR(n);
@ -950,13 +960,13 @@ static void GetCode__19 (void)
if (OPP_sym == 35) { if (OPP_sym == 35) {
c = OPS_intval; c = OPS_intval;
n += 1; n += 1;
if ((c < 0 || c > 255) || n == 256) { if ((c < 0 || c > 255) || n == 1024) {
OPP_err(64); OPP_err(64);
c = 1; c = 1;
n = 1; n = 1;
} }
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);
(*ext)[__X(n, 256)] = __CHR(c); (*ext)[__X(n, 1024)] = __CHR(c);
} }
if (OPP_sym == 19) { if (OPP_sym == 19) {
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -12,7 +12,7 @@ typedef
CHAR OPS_Name[256]; CHAR OPS_Name[256];
typedef typedef
CHAR OPS_String[256]; CHAR OPS_String[1024];
export OPS_Name OPS_name; export OPS_Name OPS_name;
@ -52,15 +52,15 @@ static void OPS_Str (INT8 *sym)
OPS_err(3); OPS_err(3);
break; break;
} }
if (i == 255) { if (i == 1023) {
OPS_err(241); OPS_err(241);
break; break;
} }
OPS_str[__X(i, 256)] = OPS_ch; OPS_str[__X(i, 1024)] = OPS_ch;
i += 1; i += 1;
} }
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
OPS_str[__X(i, 256)] = 0x00; OPS_str[__X(i, 1024)] = 0x00;
OPS_intval = i + 1; OPS_intval = i + 1;
if (OPS_intval == 2) { if (OPS_intval == 2) {
*sym = 35; *sym = 35;
@ -280,12 +280,12 @@ static void Comment__2 (void);
static void Comment__2 (void) static void Comment__2 (void)
{ {
BOOLEAN isExported; BOOLEAN isExported;
CHAR commentText[256]; CHAR commentText[1024];
INT16 i, nestLevel; INT16 i, nestLevel;
CHAR prevCh, nextCh; CHAR prevCh;
i = 0; i = 0;
while (i <= 255) { while (i <= 1023) {
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
i += 1; i += 1;
} }
isExported = 0; isExported = 0;
@ -298,7 +298,7 @@ static void Comment__2 (void)
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
if (OPS_ch == ')') { if (OPS_ch == ')') {
commentText[0] = 0x00; commentText[0] = 0x00;
OPM_StoreComment(commentText, 256); OPM_StoreComment(commentText, 1024);
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
return; return;
} }
@ -306,47 +306,65 @@ static void Comment__2 (void)
while ((nestLevel > 0 && OPS_ch != 0x00)) { while ((nestLevel > 0 && OPS_ch != 0x00)) {
if ((prevCh == '(' && OPS_ch == '*')) { if ((prevCh == '(' && OPS_ch == '*')) {
nestLevel += 1; nestLevel += 1;
prevCh = 0x00; prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} else if ((prevCh == '*' && OPS_ch == ')')) { } else if ((prevCh == '*' && OPS_ch == ')')) {
nestLevel -= 1; nestLevel -= 1;
if (nestLevel == 0) { if (nestLevel == 0) {
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
} else { } else {
prevCh = 0x00; prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
} else { } else {
if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { if ((isExported && nestLevel == 1)) {
if (i < 255) { if (i < 1023) {
commentText[__X(i, 256)] = prevCh; if (OPS_ch == 0x0d || OPS_ch == 0x0a) {
i += 1; if (i == 0 || commentText[__X(i - 1, 1024)] != 0x0a) {
commentText[__X(i, 1024)] = 0x0a;
i += 1;
}
if (OPS_ch == 0x0d) {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
if (OPS_ch == 0x0a) {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else if (OPS_ch >= ' ') {
commentText[__X(i, 1024)] = OPS_ch;
i += 1;
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
prevCh = OPS_ch;
}
if (nestLevel > 0) {
OPM_Get(&OPS_ch);
} }
} }
if (OPS_ch == 0x00) { if (OPS_ch == 0x00) {
OPS_err(5); OPS_err(5);
} }
if ((((((isExported && nestLevel == 0)) && prevCh != 0x00)) && prevCh != '*')) {
if (i < 255) {
commentText[__X(i, 256)] = prevCh;
i += 1;
} else {
OPM_LogWStr((CHAR*)"Truncating final comment character", 35);
OPM_LogWLn();
}
}
if (isExported) { if (isExported) {
if (i >= 256) { if (i >= 1024) {
OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30);
OPM_LogWLn(); OPM_LogWLn();
i = 255; i = 1023;
} }
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
OPM_StoreComment(commentText, 256); OPM_StoreComment(commentText, 1024);
} }
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h
@ -9,7 +9,7 @@ typedef
CHAR OPS_Name[256]; CHAR OPS_Name[256];
typedef typedef
CHAR OPS_String[256]; CHAR OPS_String[1024];
import OPS_Name OPS_name; import OPS_Name OPS_name;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -423,7 +423,7 @@ OPT_Node OPT_NewNode (INT8 class)
OPT_ConstExt OPT_NewExt (void) OPT_ConstExt OPT_NewExt (void)
{ {
OPT_ConstExt ext = NIL; OPT_ConstExt ext = NIL;
ext = __NEWARR(NIL, 1, 1, 1, 0, 256); ext = __NEWARR(NIL, 1, 1, 1, 0, 1024);
return ext; return ext;
} }
@ -560,7 +560,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
OPT_Object ob0 = NIL, ob1 = NIL; OPT_Object ob0 = NIL, ob1 = NIL;
BOOLEAN left; BOOLEAN left;
INT8 mnolev; INT8 mnolev;
CHAR commentText[256]; CHAR commentText[1024];
INT16 j; INT16 j;
ob0 = OPT_topScope; ob0 = OPT_topScope;
ob1 = ob0->right; ob1 = ob0->right;
@ -593,15 +593,15 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
__COPY(name, ob1->name, 256); __COPY(name, ob1->name, 256);
mnolev = OPT_topScope->mnolev; mnolev = OPT_topScope->mnolev;
ob1->mnolev = mnolev; ob1->mnolev = mnolev;
OPM_GetComment((void*)commentText, 256); OPM_GetComment((void*)commentText, 1024);
if (commentText[0] != 0x00) { if (commentText[0] != 0x00) {
ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024);
j = 0; j = 0;
while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { while ((j < 1023 && commentText[__X(j, 1024)] != 0x00)) {
(*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; (*ob1->comment)[__X(j, 1024)] = commentText[__X(j, 1024)];
j += 1; j += 1;
} }
(*ob1->comment)[__X(j, 256)] = 0x00; (*ob1->comment)[__X(j, 1024)] = 0x00;
} }
break; break;
} }
@ -868,7 +868,7 @@ void OPT_FPrintObj (OPT_Object obj)
OPM_FPrintLReal(&fprint, obj->conval->realval); OPM_FPrintLReal(&fprint, obj->conval->realval);
break; break;
case 8: case 8:
OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 256); OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 1024);
break; break;
case 9: case 9:
break; break;
@ -889,7 +889,7 @@ void OPT_FPrintObj (OPT_Object obj)
f = 1; f = 1;
OPM_FPrint(&fprint, m); OPM_FPrint(&fprint, m);
while (f <= m) { while (f <= m) {
OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 256)]); OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 1024)]);
f += 1; f += 1;
} }
} else if (obj->mode == 5) { } else if (obj->mode == 5) {
@ -1096,7 +1096,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval)
i = 0; i = 0;
do { do {
OPM_SymRCh(&ch); OPM_SymRCh(&ch);
(*ext)[__X(i, 256)] = ch; (*ext)[__X(i, 1024)] = ch;
i += 1; i += 1;
} while (!(ch == 0x00)); } while (!(ch == 0x00));
conval->intval2 = i; conval->intval2 = i;
@ -1109,6 +1109,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval)
OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37); OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37);
OPM_LogWNum(f, 0); OPM_LogWNum(f, 0);
OPM_LogWLn(); OPM_LogWLn();
OPM_err(155);
break; break;
} }
} }
@ -1137,6 +1138,9 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par)
} }
if (tag == 23) { if (tag == 23) {
new->mode = 1; new->mode = 1;
} else if (tag == 42) {
new->mode = 2;
new->vis = 3;
} else { } else {
new->mode = 2; new->mode = 2;
} }
@ -1210,6 +1214,8 @@ static OPT_Struct OPT_InTyp (INT32 tag)
return OPT_IntType(OPM_SymRInt()); return OPT_IntType(OPM_SymRInt());
} else if (tag == 7) { } else if (tag == 7) {
return OPT_SetType(OPM_SymRInt()); return OPT_SetType(OPM_SymRInt());
} else if (tag == 12) {
return OPT_adrtyp;
} else { } else {
return OPT_impCtxt.ref[__X(tag, 255)]; return OPT_impCtxt.ref[__X(tag, 255)];
} }
@ -1406,7 +1412,7 @@ static OPT_Object OPT_InObj (INT8 mno)
OPT_Struct typ = NIL; OPT_Struct typ = NIL;
INT32 tag; INT32 tag;
OPT_ConstExt ext = NIL; OPT_ConstExt ext = NIL;
OPS_Name commentText; CHAR commentText[1024];
BOOLEAN hasComment; BOOLEAN hasComment;
INT16 j; INT16 j;
INT32 len; INT32 len;
@ -1417,19 +1423,22 @@ static OPT_Object OPT_InObj (INT8 mno)
if (len < 0) { if (len < 0) {
len = 0; len = 0;
} }
if (len > 255) { if (len > 1023) {
len = 255; len = 1023;
} }
i = 0; i = 0;
while (i < len) { while (i < len) {
OPM_SymRCh(&commentText[__X(i, 256)]); OPM_SymRCh(&commentText[__X(i, 1024)]);
i += 1; i += 1;
} }
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
hasComment = 1; hasComment = 1;
tag = OPM_SymRInt(); tag = OPM_SymRInt();
} }
OPT_impCtxt.nextTag = tag; if ((tag <= 11 && tag == 0)) {
OPM_err(155);
return NIL;
}
if (tag < 0 || tag > 50) { if (tag < 0 || tag > 50) {
OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30);
OPM_LogWNum(tag, 0); OPM_LogWNum(tag, 0);
@ -1471,7 +1480,7 @@ static OPT_Object OPT_InObj (INT8 mno)
(*ext)[0] = __CHR(s); (*ext)[0] = __CHR(s);
i = 1; i = 1;
while (i <= s) { while (i <= s) {
OPM_SymRCh(&(*ext)[__X(i, 256)]); OPM_SymRCh(&(*ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
break; break;
@ -1502,13 +1511,13 @@ static OPT_Object OPT_InObj (INT8 mno)
OPT_InName((void*)obj->name, 256); OPT_InName((void*)obj->name, 256);
} }
if ((hasComment && obj != NIL)) { if ((hasComment && obj != NIL)) {
obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024);
j = 0; j = 0;
while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { while ((((j < 1023 && j < len)) && commentText[__X(j, 1024)] != 0x00)) {
(*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; (*obj->comment)[__X(j, 1024)] = commentText[__X(j, 1024)];
j += 1; j += 1;
} }
(*obj->comment)[__X(j, 256)] = 0x00; (*obj->comment)[__X(j, 1024)] = 0x00;
} }
OPT_FPrintObj(obj); OPT_FPrintObj(obj);
if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) {
@ -1688,6 +1697,8 @@ static void OPT_OutSign (OPT_Struct result, OPT_Object par)
while (par != NIL) { while (par != NIL) {
if (par->mode == 1) { if (par->mode == 1) {
OPM_SymWInt(23); OPM_SymWInt(23);
} else if (par->vis == 3) {
OPM_SymWInt(42);
} else { } else {
OPM_SymWInt(24); OPM_SymWInt(24);
} }
@ -1842,7 +1853,7 @@ static void OPT_OutConstant (OPT_Object obj)
OPM_SymWLReal(obj->conval->realval); OPM_SymWLReal(obj->conval->realval);
break; break;
case 8: case 8:
OPT_OutName((void*)*obj->conval->ext, 256); OPT_OutName((void*)*obj->conval->ext, 1024);
break; break;
case 9: case 9:
break; break;
@ -1857,7 +1868,7 @@ static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
__DUP(text, text__len, CHAR); __DUP(text, text__len, CHAR);
i = 0; i = 0;
while ((i < 255 && text[__X(i, text__len)] != 0x00)) { while ((i < 1023 && text[__X(i, text__len)] != 0x00)) {
OPM_SymWCh(text[__X(i, text__len)]); OPM_SymWCh(text[__X(i, text__len)]);
i += 1; i += 1;
} }
@ -1874,16 +1885,18 @@ static void OPT_OutObj (OPT_Object obj)
OPT_OutObj(obj->left); OPT_OutObj(obj->left);
if (__IN(obj->mode, 0x06ea, 32)) { if (__IN(obj->mode, 0x06ea, 32)) {
if (obj->comment != NIL) { if (obj->comment != NIL) {
OPM_SymWInt(41); if ((__IN(obj->mode, 0x06aa, 32) && obj->vis != 0)) {
k = 0; OPM_SymWInt(41);
while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) { k = 0;
k += 1; while ((k < 1023 && (*obj->comment)[__X(k, 1024)] != 0x00)) {
} k += 1;
OPM_SymWInt(k); }
l = 0; OPM_SymWInt(k);
while (l < k) { l = 0;
OPM_SymWCh((*obj->comment)[__X(l, 256)]); while (l < k) {
l += 1; OPM_SymWCh((*obj->comment)[__X(l, 1024)]);
l += 1;
}
} }
} }
if (obj->history == 4) { if (obj->history == 4) {
@ -1952,7 +1965,7 @@ static void OPT_OutObj (OPT_Object obj)
i = 1; i = 1;
OPM_SymWInt(j); OPM_SymWInt(j);
while (i <= j) { while (i <= j) {
OPM_SymWCh((*ext)[__X(i, 256)]); OPM_SymWCh((*ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
OPT_OutName((void*)obj->name, 256); OPT_OutName((void*)obj->name, 256);
@ -2191,6 +2204,7 @@ export void *OPT__init(void)
OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp); OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp);
OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp); OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp);
OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp); OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp);
OPT_adrtyp->ref = 12;
OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ); OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ);
OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ); OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ);
OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ); OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -676,7 +676,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp)
} }
} }
} else { } else {
if ((((mode == 2 && typ != n->typ)) && prec == -1)) { if (((((mode == 2 || typ->BaseTyp->form == 13) && typ != n->typ)) && prec == -1)) {
OPM_WriteString((CHAR*)"(void*)", 8); OPM_WriteString((CHAR*)"(void*)", 8);
} }
} }
@ -1299,7 +1299,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
OPM_WriteInt(r->conval->intval2); OPM_WriteInt(r->conval->intval2);
} else if (r->typ->comp == 3) { } else if (r->typ->comp == 3) {
OPM_WriteString((CHAR*)"__X(", 5); OPM_WriteString((CHAR*)"__X(", 5);
OPC_Len(r->obj, r->typ, 0); OPV_Len(r, 0);
OPM_WriteString((CHAR*)" * ", 4); OPM_WriteString((CHAR*)" * ", 4);
OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteInt(r->typ->BaseTyp->size);
OPM_WriteString((CHAR*)", ", 3); OPM_WriteString((CHAR*)", ", 3);
@ -1327,10 +1327,16 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
} }
if (l->typ == r->typ) { if (l->typ == r->typ) {
OPV_expr(r, -1); OPV_expr(r, -1);
} else if ((((l->typ->form == 11 && r->typ->form != 9)) && l->typ->strobj != NIL)) { } else if ((l->typ->form == 11 && r->typ->form != 9)) {
OPM_Write('('); if (l->typ->strobj != NIL) {
OPC_Ident(l->typ->strobj); OPM_Write('(');
OPM_Write(')'); OPC_Ident(l->typ->strobj);
OPM_Write(')');
} else if ((((l->typ->BaseTyp != NIL && l->typ->BaseTyp->strobj != NIL)) && l->typ->BaseTyp != r->typ->BaseTyp)) {
OPM_Write('(');
OPC_Ident(l->typ->BaseTyp->strobj);
OPM_WriteString((CHAR*)"*)", 3);
}
OPV_expr(r, -1); OPV_expr(r, -1);
} else if (l->typ->comp == 4) { } else if (l->typ->comp == 4) {
OPM_WriteString((CHAR*)"*(", 3); OPM_WriteString((CHAR*)"*(", 3);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef VT100__h #ifndef VT100__h
#define VT100__h #define VT100__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -73,7 +73,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len)
{ {
__DUP(additionalopts, additionalopts__len, CHAR); __DUP(additionalopts, additionalopts__len, CHAR);
__COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len); __COPY("gcc -fPIC -g -Wno-stringop-overflow -std=gnu11", s, s__len);
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __MOVE("2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -82,6 +82,7 @@ OPT_Node OPB_NewLeaf (OPT_Object obj)
break; break;
case 2: case 2:
node = OPT_NewNode(1); node = OPT_NewNode(1);
node->readonly = obj->vis == 3;
break; break;
case 3: case 3:
node = OPT_NewNode(7); node = OPT_NewNode(7);
@ -253,7 +254,7 @@ OPT_Node OPB_NewString (OPS_String str, INT64 len)
x->conval->intval = -1; x->conval->intval = -1;
x->conval->intval2 = OPM_Longint(len); x->conval->intval2 = OPM_Longint(len);
x->conval->ext = OPT_NewExt(); x->conval->ext = OPT_NewExt();
__MOVE(str, *x->conval->ext, 256); __MOVE(str, *x->conval->ext, 1024);
return x; return x;
} }
@ -1626,7 +1627,6 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
if (x == y) { if (x == y) {
} else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) {
} else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) {
OPB_err(113);
} else if (x->BaseTyp == OPT_chartyp) { } else if (x->BaseTyp == OPT_chartyp) {
if (g == 8) { if (g == 8) {
if (ynode->conval->intval2 > x->n) { if (ynode->conval->intval2 > x->n) {
@ -2423,7 +2423,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
} else { } else {
OPB_CheckLeaf(ap, 0); OPB_CheckLeaf(ap, 0);
} }
if (ap->readonly) { if ((ap->readonly && fp->vis != 3)) {
OPB_err(76); OPB_err(76);
} }
if (fp->typ->comp == 3) { if (fp->typ->comp == 3) {

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -738,7 +738,7 @@ static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len)
INT16 i; INT16 i;
__DUP(y, y__len, CHAR); __DUP(y, y__len, CHAR);
i = 0; i = 0;
while ((*x)[__X(i + 1, 256)] == y[__X(i, y__len)]) { while ((*x)[__X(i + 1, 1024)] == y[__X(i, y__len)]) {
i += 1; i += 1;
} }
__DEL(y); __DEL(y);
@ -764,7 +764,7 @@ static void OPC_CProcDefs (OPT_Object obj, INT16 vis)
_for__7 = (INT16)(*obj->conval->ext)[0]; _for__7 = (INT16)(*obj->conval->ext)[0];
i = i; i = i;
while (i <= _for__7) { while (i <= _for__7) {
OPM_Write((*obj->conval->ext)[__X(i, 256)]); OPM_Write((*obj->conval->ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
OPM_WriteLn(); OPM_WriteLn();
@ -1909,7 +1909,7 @@ void OPC_Constant (OPT_Const con, INT16 form)
} }
break; break;
case 8: case 8:
OPC_StringLiteral(*con->ext, 256, con->intval2 - 1); OPC_StringLiteral(*con->ext, 1024, con->intval2 - 1);
break; break;
case 9: case 9:
OPM_WriteString((CHAR*)"NIL", 4); OPM_WriteString((CHAR*)"NIL", 4);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,7 +19,7 @@ typedef
CHAR OPM_FileName[32]; CHAR OPM_FileName[32];
static CHAR OPM_currentComment[256]; static CHAR OPM_currentComment[1024];
static BOOLEAN OPM_hasComment; static BOOLEAN OPM_hasComment;
static CHAR OPM_SourceFileName[256]; static CHAR OPM_SourceFileName[256];
static CHAR OPM_GlobalModel[10]; static CHAR OPM_GlobalModel[10];
@ -166,11 +166,11 @@ void OPM_StoreComment (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
__DUP(text, text__len, CHAR); __DUP(text, text__len, CHAR);
i = 0; i = 0;
while ((i < 255 && text[__X(i, text__len)] != 0x00)) { while ((i < 1023 && text[__X(i, text__len)] != 0x00)) {
OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)]; OPM_currentComment[__X(i, 1024)] = text[__X(i, text__len)];
i += 1; i += 1;
} }
OPM_currentComment[__X(i, 256)] = 0x00; OPM_currentComment[__X(i, 1024)] = 0x00;
OPM_hasComment = 1; OPM_hasComment = 1;
__DEL(text); __DEL(text);
} }
@ -180,8 +180,8 @@ void OPM_GetComment (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
if (OPM_hasComment) { if (OPM_hasComment) {
i = 0; i = 0;
while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) { while ((((i < text__len && i < 1024)) && OPM_currentComment[__X(i, 1024)] != 0x00)) {
text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)]; text[__X(i, text__len)] = OPM_currentComment[__X(i, 1024)];
i += 1; i += 1;
} }
text[__X(i, text__len)] = 0x00; text[__X(i, text__len)] = 0x00;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -365,7 +365,17 @@ static void OPP_FormalParameters (OPT_Object *firstPar, OPT_Struct *resTyp)
if (OPP_sym == 38) { if (OPP_sym == 38) {
OPT_Insert(OPS_name, &par); OPT_Insert(OPS_name, &par);
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);
par->mode = mode; if (OPP_sym == 7) {
if (mode == 2) {
OPP_err(246);
}
OPS_Get(&OPP_sym);
par->mode = 2;
par->vis = 3;
} else {
par->mode = mode;
par->vis = 0;
}
par->link = NIL; par->link = NIL;
if (first == NIL) { if (first == NIL) {
first = par; first = par;
@ -939,8 +949,8 @@ static void GetCode__19 (void)
(*ProcedureDeclaration__16_s->proc)->conval->ext = ext; (*ProcedureDeclaration__16_s->proc)->conval->ext = ext;
n = 0; n = 0;
if (OPP_sym == 37) { if (OPP_sym == 37) {
while (OPS_str[__X(n, 256)] != 0x00) { while (OPS_str[__X(n, 1024)] != 0x00) {
(*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; (*ext)[__X(n + 1, 1024)] = OPS_str[__X(n, 1024)];
n += 1; n += 1;
} }
(*ext)[0] = __CHR(n); (*ext)[0] = __CHR(n);
@ -950,13 +960,13 @@ static void GetCode__19 (void)
if (OPP_sym == 35) { if (OPP_sym == 35) {
c = OPS_intval; c = OPS_intval;
n += 1; n += 1;
if ((c < 0 || c > 255) || n == 256) { if ((c < 0 || c > 255) || n == 1024) {
OPP_err(64); OPP_err(64);
c = 1; c = 1;
n = 1; n = 1;
} }
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);
(*ext)[__X(n, 256)] = __CHR(c); (*ext)[__X(n, 1024)] = __CHR(c);
} }
if (OPP_sym == 19) { if (OPP_sym == 19) {
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -12,7 +12,7 @@ typedef
CHAR OPS_Name[256]; CHAR OPS_Name[256];
typedef typedef
CHAR OPS_String[256]; CHAR OPS_String[1024];
export OPS_Name OPS_name; export OPS_Name OPS_name;
@ -52,15 +52,15 @@ static void OPS_Str (INT8 *sym)
OPS_err(3); OPS_err(3);
break; break;
} }
if (i == 255) { if (i == 1023) {
OPS_err(241); OPS_err(241);
break; break;
} }
OPS_str[__X(i, 256)] = OPS_ch; OPS_str[__X(i, 1024)] = OPS_ch;
i += 1; i += 1;
} }
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
OPS_str[__X(i, 256)] = 0x00; OPS_str[__X(i, 1024)] = 0x00;
OPS_intval = i + 1; OPS_intval = i + 1;
if (OPS_intval == 2) { if (OPS_intval == 2) {
*sym = 35; *sym = 35;
@ -280,12 +280,12 @@ static void Comment__2 (void);
static void Comment__2 (void) static void Comment__2 (void)
{ {
BOOLEAN isExported; BOOLEAN isExported;
CHAR commentText[256]; CHAR commentText[1024];
INT16 i, nestLevel; INT16 i, nestLevel;
CHAR prevCh, nextCh; CHAR prevCh;
i = 0; i = 0;
while (i <= 255) { while (i <= 1023) {
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
i += 1; i += 1;
} }
isExported = 0; isExported = 0;
@ -298,7 +298,7 @@ static void Comment__2 (void)
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
if (OPS_ch == ')') { if (OPS_ch == ')') {
commentText[0] = 0x00; commentText[0] = 0x00;
OPM_StoreComment(commentText, 256); OPM_StoreComment(commentText, 1024);
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
return; return;
} }
@ -306,47 +306,65 @@ static void Comment__2 (void)
while ((nestLevel > 0 && OPS_ch != 0x00)) { while ((nestLevel > 0 && OPS_ch != 0x00)) {
if ((prevCh == '(' && OPS_ch == '*')) { if ((prevCh == '(' && OPS_ch == '*')) {
nestLevel += 1; nestLevel += 1;
prevCh = 0x00; prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} else if ((prevCh == '*' && OPS_ch == ')')) { } else if ((prevCh == '*' && OPS_ch == ')')) {
nestLevel -= 1; nestLevel -= 1;
if (nestLevel == 0) { if (nestLevel == 0) {
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
} else { } else {
prevCh = 0x00; prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
} else { } else {
if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { if ((isExported && nestLevel == 1)) {
if (i < 255) { if (i < 1023) {
commentText[__X(i, 256)] = prevCh; if (OPS_ch == 0x0d || OPS_ch == 0x0a) {
i += 1; if (i == 0 || commentText[__X(i - 1, 1024)] != 0x0a) {
commentText[__X(i, 1024)] = 0x0a;
i += 1;
}
if (OPS_ch == 0x0d) {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
if (OPS_ch == 0x0a) {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else if (OPS_ch >= ' ') {
commentText[__X(i, 1024)] = OPS_ch;
i += 1;
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
prevCh = OPS_ch;
}
if (nestLevel > 0) {
OPM_Get(&OPS_ch);
} }
} }
if (OPS_ch == 0x00) { if (OPS_ch == 0x00) {
OPS_err(5); OPS_err(5);
} }
if ((((((isExported && nestLevel == 0)) && prevCh != 0x00)) && prevCh != '*')) {
if (i < 255) {
commentText[__X(i, 256)] = prevCh;
i += 1;
} else {
OPM_LogWStr((CHAR*)"Truncating final comment character", 35);
OPM_LogWLn();
}
}
if (isExported) { if (isExported) {
if (i >= 256) { if (i >= 1024) {
OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30);
OPM_LogWLn(); OPM_LogWLn();
i = 255; i = 1023;
} }
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
OPM_StoreComment(commentText, 256); OPM_StoreComment(commentText, 1024);
} }
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h
@ -9,7 +9,7 @@ typedef
CHAR OPS_Name[256]; CHAR OPS_Name[256];
typedef typedef
CHAR OPS_String[256]; CHAR OPS_String[1024];
import OPS_Name OPS_name; import OPS_Name OPS_name;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -423,7 +423,7 @@ OPT_Node OPT_NewNode (INT8 class)
OPT_ConstExt OPT_NewExt (void) OPT_ConstExt OPT_NewExt (void)
{ {
OPT_ConstExt ext = NIL; OPT_ConstExt ext = NIL;
ext = __NEWARR(NIL, 1, 1, 1, 0, 256); ext = __NEWARR(NIL, 1, 1, 1, 0, 1024);
return ext; return ext;
} }
@ -560,7 +560,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
OPT_Object ob0 = NIL, ob1 = NIL; OPT_Object ob0 = NIL, ob1 = NIL;
BOOLEAN left; BOOLEAN left;
INT8 mnolev; INT8 mnolev;
CHAR commentText[256]; CHAR commentText[1024];
INT16 j; INT16 j;
ob0 = OPT_topScope; ob0 = OPT_topScope;
ob1 = ob0->right; ob1 = ob0->right;
@ -593,15 +593,15 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
__COPY(name, ob1->name, 256); __COPY(name, ob1->name, 256);
mnolev = OPT_topScope->mnolev; mnolev = OPT_topScope->mnolev;
ob1->mnolev = mnolev; ob1->mnolev = mnolev;
OPM_GetComment((void*)commentText, 256); OPM_GetComment((void*)commentText, 1024);
if (commentText[0] != 0x00) { if (commentText[0] != 0x00) {
ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024);
j = 0; j = 0;
while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { while ((j < 1023 && commentText[__X(j, 1024)] != 0x00)) {
(*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; (*ob1->comment)[__X(j, 1024)] = commentText[__X(j, 1024)];
j += 1; j += 1;
} }
(*ob1->comment)[__X(j, 256)] = 0x00; (*ob1->comment)[__X(j, 1024)] = 0x00;
} }
break; break;
} }
@ -868,7 +868,7 @@ void OPT_FPrintObj (OPT_Object obj)
OPM_FPrintLReal(&fprint, obj->conval->realval); OPM_FPrintLReal(&fprint, obj->conval->realval);
break; break;
case 8: case 8:
OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 256); OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 1024);
break; break;
case 9: case 9:
break; break;
@ -889,7 +889,7 @@ void OPT_FPrintObj (OPT_Object obj)
f = 1; f = 1;
OPM_FPrint(&fprint, m); OPM_FPrint(&fprint, m);
while (f <= m) { while (f <= m) {
OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 256)]); OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 1024)]);
f += 1; f += 1;
} }
} else if (obj->mode == 5) { } else if (obj->mode == 5) {
@ -1096,7 +1096,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval)
i = 0; i = 0;
do { do {
OPM_SymRCh(&ch); OPM_SymRCh(&ch);
(*ext)[__X(i, 256)] = ch; (*ext)[__X(i, 1024)] = ch;
i += 1; i += 1;
} while (!(ch == 0x00)); } while (!(ch == 0x00));
conval->intval2 = i; conval->intval2 = i;
@ -1109,6 +1109,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval)
OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37); OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37);
OPM_LogWNum(f, 0); OPM_LogWNum(f, 0);
OPM_LogWLn(); OPM_LogWLn();
OPM_err(155);
break; break;
} }
} }
@ -1137,6 +1138,9 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par)
} }
if (tag == 23) { if (tag == 23) {
new->mode = 1; new->mode = 1;
} else if (tag == 42) {
new->mode = 2;
new->vis = 3;
} else { } else {
new->mode = 2; new->mode = 2;
} }
@ -1210,6 +1214,8 @@ static OPT_Struct OPT_InTyp (INT32 tag)
return OPT_IntType(OPM_SymRInt()); return OPT_IntType(OPM_SymRInt());
} else if (tag == 7) { } else if (tag == 7) {
return OPT_SetType(OPM_SymRInt()); return OPT_SetType(OPM_SymRInt());
} else if (tag == 12) {
return OPT_adrtyp;
} else { } else {
return OPT_impCtxt.ref[__X(tag, 255)]; return OPT_impCtxt.ref[__X(tag, 255)];
} }
@ -1406,7 +1412,7 @@ static OPT_Object OPT_InObj (INT8 mno)
OPT_Struct typ = NIL; OPT_Struct typ = NIL;
INT32 tag; INT32 tag;
OPT_ConstExt ext = NIL; OPT_ConstExt ext = NIL;
OPS_Name commentText; CHAR commentText[1024];
BOOLEAN hasComment; BOOLEAN hasComment;
INT16 j; INT16 j;
INT32 len; INT32 len;
@ -1417,19 +1423,22 @@ static OPT_Object OPT_InObj (INT8 mno)
if (len < 0) { if (len < 0) {
len = 0; len = 0;
} }
if (len > 255) { if (len > 1023) {
len = 255; len = 1023;
} }
i = 0; i = 0;
while (i < len) { while (i < len) {
OPM_SymRCh(&commentText[__X(i, 256)]); OPM_SymRCh(&commentText[__X(i, 1024)]);
i += 1; i += 1;
} }
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
hasComment = 1; hasComment = 1;
tag = OPM_SymRInt(); tag = OPM_SymRInt();
} }
OPT_impCtxt.nextTag = tag; if ((tag <= 11 && tag == 0)) {
OPM_err(155);
return NIL;
}
if (tag < 0 || tag > 50) { if (tag < 0 || tag > 50) {
OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30);
OPM_LogWNum(tag, 0); OPM_LogWNum(tag, 0);
@ -1471,7 +1480,7 @@ static OPT_Object OPT_InObj (INT8 mno)
(*ext)[0] = __CHR(s); (*ext)[0] = __CHR(s);
i = 1; i = 1;
while (i <= s) { while (i <= s) {
OPM_SymRCh(&(*ext)[__X(i, 256)]); OPM_SymRCh(&(*ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
break; break;
@ -1502,13 +1511,13 @@ static OPT_Object OPT_InObj (INT8 mno)
OPT_InName((void*)obj->name, 256); OPT_InName((void*)obj->name, 256);
} }
if ((hasComment && obj != NIL)) { if ((hasComment && obj != NIL)) {
obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024);
j = 0; j = 0;
while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { while ((((j < 1023 && j < len)) && commentText[__X(j, 1024)] != 0x00)) {
(*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; (*obj->comment)[__X(j, 1024)] = commentText[__X(j, 1024)];
j += 1; j += 1;
} }
(*obj->comment)[__X(j, 256)] = 0x00; (*obj->comment)[__X(j, 1024)] = 0x00;
} }
OPT_FPrintObj(obj); OPT_FPrintObj(obj);
if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) {
@ -1688,6 +1697,8 @@ static void OPT_OutSign (OPT_Struct result, OPT_Object par)
while (par != NIL) { while (par != NIL) {
if (par->mode == 1) { if (par->mode == 1) {
OPM_SymWInt(23); OPM_SymWInt(23);
} else if (par->vis == 3) {
OPM_SymWInt(42);
} else { } else {
OPM_SymWInt(24); OPM_SymWInt(24);
} }
@ -1842,7 +1853,7 @@ static void OPT_OutConstant (OPT_Object obj)
OPM_SymWLReal(obj->conval->realval); OPM_SymWLReal(obj->conval->realval);
break; break;
case 8: case 8:
OPT_OutName((void*)*obj->conval->ext, 256); OPT_OutName((void*)*obj->conval->ext, 1024);
break; break;
case 9: case 9:
break; break;
@ -1857,7 +1868,7 @@ static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
__DUP(text, text__len, CHAR); __DUP(text, text__len, CHAR);
i = 0; i = 0;
while ((i < 255 && text[__X(i, text__len)] != 0x00)) { while ((i < 1023 && text[__X(i, text__len)] != 0x00)) {
OPM_SymWCh(text[__X(i, text__len)]); OPM_SymWCh(text[__X(i, text__len)]);
i += 1; i += 1;
} }
@ -1874,16 +1885,18 @@ static void OPT_OutObj (OPT_Object obj)
OPT_OutObj(obj->left); OPT_OutObj(obj->left);
if (__IN(obj->mode, 0x06ea, 32)) { if (__IN(obj->mode, 0x06ea, 32)) {
if (obj->comment != NIL) { if (obj->comment != NIL) {
OPM_SymWInt(41); if ((__IN(obj->mode, 0x06aa, 32) && obj->vis != 0)) {
k = 0; OPM_SymWInt(41);
while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) { k = 0;
k += 1; while ((k < 1023 && (*obj->comment)[__X(k, 1024)] != 0x00)) {
} k += 1;
OPM_SymWInt(k); }
l = 0; OPM_SymWInt(k);
while (l < k) { l = 0;
OPM_SymWCh((*obj->comment)[__X(l, 256)]); while (l < k) {
l += 1; OPM_SymWCh((*obj->comment)[__X(l, 1024)]);
l += 1;
}
} }
} }
if (obj->history == 4) { if (obj->history == 4) {
@ -1952,7 +1965,7 @@ static void OPT_OutObj (OPT_Object obj)
i = 1; i = 1;
OPM_SymWInt(j); OPM_SymWInt(j);
while (i <= j) { while (i <= j) {
OPM_SymWCh((*ext)[__X(i, 256)]); OPM_SymWCh((*ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
OPT_OutName((void*)obj->name, 256); OPT_OutName((void*)obj->name, 256);
@ -2191,6 +2204,7 @@ export void *OPT__init(void)
OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp); OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp);
OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp); OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp);
OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp); OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp);
OPT_adrtyp->ref = 12;
OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ); OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ);
OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ); OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ);
OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ); OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -676,7 +676,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp)
} }
} }
} else { } else {
if ((((mode == 2 && typ != n->typ)) && prec == -1)) { if (((((mode == 2 || typ->BaseTyp->form == 13) && typ != n->typ)) && prec == -1)) {
OPM_WriteString((CHAR*)"(void*)", 8); OPM_WriteString((CHAR*)"(void*)", 8);
} }
} }
@ -1299,7 +1299,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
OPM_WriteInt(r->conval->intval2); OPM_WriteInt(r->conval->intval2);
} else if (r->typ->comp == 3) { } else if (r->typ->comp == 3) {
OPM_WriteString((CHAR*)"__X(", 5); OPM_WriteString((CHAR*)"__X(", 5);
OPC_Len(r->obj, r->typ, 0); OPV_Len(r, 0);
OPM_WriteString((CHAR*)" * ", 4); OPM_WriteString((CHAR*)" * ", 4);
OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteInt(r->typ->BaseTyp->size);
OPM_WriteString((CHAR*)", ", 3); OPM_WriteString((CHAR*)", ", 3);
@ -1327,10 +1327,16 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
} }
if (l->typ == r->typ) { if (l->typ == r->typ) {
OPV_expr(r, -1); OPV_expr(r, -1);
} else if ((((l->typ->form == 11 && r->typ->form != 9)) && l->typ->strobj != NIL)) { } else if ((l->typ->form == 11 && r->typ->form != 9)) {
OPM_Write('('); if (l->typ->strobj != NIL) {
OPC_Ident(l->typ->strobj); OPM_Write('(');
OPM_Write(')'); OPC_Ident(l->typ->strobj);
OPM_Write(')');
} else if ((((l->typ->BaseTyp != NIL && l->typ->BaseTyp->strobj != NIL)) && l->typ->BaseTyp != r->typ->BaseTyp)) {
OPM_Write('(');
OPC_Ident(l->typ->BaseTyp->strobj);
OPM_WriteString((CHAR*)"*)", 3);
}
OPV_expr(r, -1); OPV_expr(r, -1);
} else if (l->typ->comp == 4) { } else if (l->typ->comp == 4) {
OPM_WriteString((CHAR*)"*(", 3); OPM_WriteString((CHAR*)"*(", 3);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef VT100__h #ifndef VT100__h
#define VT100__h #define VT100__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -73,7 +73,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len)
{ {
__DUP(additionalopts, additionalopts__len, CHAR); __DUP(additionalopts, additionalopts__len, CHAR);
__COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len); __COPY("gcc -fPIC -g -Wno-stringop-overflow -std=gnu11", s, s__len);
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __MOVE("2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -82,6 +82,7 @@ OPT_Node OPB_NewLeaf (OPT_Object obj)
break; break;
case 2: case 2:
node = OPT_NewNode(1); node = OPT_NewNode(1);
node->readonly = obj->vis == 3;
break; break;
case 3: case 3:
node = OPT_NewNode(7); node = OPT_NewNode(7);
@ -253,7 +254,7 @@ OPT_Node OPB_NewString (OPS_String str, INT64 len)
x->conval->intval = -1; x->conval->intval = -1;
x->conval->intval2 = OPM_Longint(len); x->conval->intval2 = OPM_Longint(len);
x->conval->ext = OPT_NewExt(); x->conval->ext = OPT_NewExt();
__MOVE(str, *x->conval->ext, 256); __MOVE(str, *x->conval->ext, 1024);
return x; return x;
} }
@ -1626,7 +1627,6 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
if (x == y) { if (x == y) {
} else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) {
} else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) {
OPB_err(113);
} else if (x->BaseTyp == OPT_chartyp) { } else if (x->BaseTyp == OPT_chartyp) {
if (g == 8) { if (g == 8) {
if (ynode->conval->intval2 > x->n) { if (ynode->conval->intval2 > x->n) {
@ -2423,7 +2423,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
} else { } else {
OPB_CheckLeaf(ap, 0); OPB_CheckLeaf(ap, 0);
} }
if (ap->readonly) { if ((ap->readonly && fp->vis != 3)) {
OPB_err(76); OPB_err(76);
} }
if (fp->typ->comp == 3) { if (fp->typ->comp == 3) {

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -738,7 +738,7 @@ static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len)
INT16 i; INT16 i;
__DUP(y, y__len, CHAR); __DUP(y, y__len, CHAR);
i = 0; i = 0;
while ((*x)[__X(i + 1, 256)] == y[__X(i, y__len)]) { while ((*x)[__X(i + 1, 1024)] == y[__X(i, y__len)]) {
i += 1; i += 1;
} }
__DEL(y); __DEL(y);
@ -764,7 +764,7 @@ static void OPC_CProcDefs (OPT_Object obj, INT16 vis)
_for__7 = (INT16)(*obj->conval->ext)[0]; _for__7 = (INT16)(*obj->conval->ext)[0];
i = i; i = i;
while (i <= _for__7) { while (i <= _for__7) {
OPM_Write((*obj->conval->ext)[__X(i, 256)]); OPM_Write((*obj->conval->ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
OPM_WriteLn(); OPM_WriteLn();
@ -1909,7 +1909,7 @@ void OPC_Constant (OPT_Const con, INT16 form)
} }
break; break;
case 8: case 8:
OPC_StringLiteral(*con->ext, 256, con->intval2 - 1); OPC_StringLiteral(*con->ext, 1024, con->intval2 - 1);
break; break;
case 9: case 9:
OPM_WriteString((CHAR*)"NIL", 4); OPM_WriteString((CHAR*)"NIL", 4);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,7 +19,7 @@ typedef
CHAR OPM_FileName[32]; CHAR OPM_FileName[32];
static CHAR OPM_currentComment[256]; static CHAR OPM_currentComment[1024];
static BOOLEAN OPM_hasComment; static BOOLEAN OPM_hasComment;
static CHAR OPM_SourceFileName[256]; static CHAR OPM_SourceFileName[256];
static CHAR OPM_GlobalModel[10]; static CHAR OPM_GlobalModel[10];
@ -166,11 +166,11 @@ void OPM_StoreComment (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
__DUP(text, text__len, CHAR); __DUP(text, text__len, CHAR);
i = 0; i = 0;
while ((i < 255 && text[__X(i, text__len)] != 0x00)) { while ((i < 1023 && text[__X(i, text__len)] != 0x00)) {
OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)]; OPM_currentComment[__X(i, 1024)] = text[__X(i, text__len)];
i += 1; i += 1;
} }
OPM_currentComment[__X(i, 256)] = 0x00; OPM_currentComment[__X(i, 1024)] = 0x00;
OPM_hasComment = 1; OPM_hasComment = 1;
__DEL(text); __DEL(text);
} }
@ -180,8 +180,8 @@ void OPM_GetComment (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
if (OPM_hasComment) { if (OPM_hasComment) {
i = 0; i = 0;
while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) { while ((((i < text__len && i < 1024)) && OPM_currentComment[__X(i, 1024)] != 0x00)) {
text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)]; text[__X(i, text__len)] = OPM_currentComment[__X(i, 1024)];
i += 1; i += 1;
} }
text[__X(i, text__len)] = 0x00; text[__X(i, text__len)] = 0x00;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -365,7 +365,17 @@ static void OPP_FormalParameters (OPT_Object *firstPar, OPT_Struct *resTyp)
if (OPP_sym == 38) { if (OPP_sym == 38) {
OPT_Insert(OPS_name, &par); OPT_Insert(OPS_name, &par);
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);
par->mode = mode; if (OPP_sym == 7) {
if (mode == 2) {
OPP_err(246);
}
OPS_Get(&OPP_sym);
par->mode = 2;
par->vis = 3;
} else {
par->mode = mode;
par->vis = 0;
}
par->link = NIL; par->link = NIL;
if (first == NIL) { if (first == NIL) {
first = par; first = par;
@ -939,8 +949,8 @@ static void GetCode__19 (void)
(*ProcedureDeclaration__16_s->proc)->conval->ext = ext; (*ProcedureDeclaration__16_s->proc)->conval->ext = ext;
n = 0; n = 0;
if (OPP_sym == 37) { if (OPP_sym == 37) {
while (OPS_str[__X(n, 256)] != 0x00) { while (OPS_str[__X(n, 1024)] != 0x00) {
(*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; (*ext)[__X(n + 1, 1024)] = OPS_str[__X(n, 1024)];
n += 1; n += 1;
} }
(*ext)[0] = __CHR(n); (*ext)[0] = __CHR(n);
@ -950,13 +960,13 @@ static void GetCode__19 (void)
if (OPP_sym == 35) { if (OPP_sym == 35) {
c = OPS_intval; c = OPS_intval;
n += 1; n += 1;
if ((c < 0 || c > 255) || n == 256) { if ((c < 0 || c > 255) || n == 1024) {
OPP_err(64); OPP_err(64);
c = 1; c = 1;
n = 1; n = 1;
} }
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);
(*ext)[__X(n, 256)] = __CHR(c); (*ext)[__X(n, 1024)] = __CHR(c);
} }
if (OPP_sym == 19) { if (OPP_sym == 19) {
OPS_Get(&OPP_sym); OPS_Get(&OPP_sym);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -12,7 +12,7 @@ typedef
CHAR OPS_Name[256]; CHAR OPS_Name[256];
typedef typedef
CHAR OPS_String[256]; CHAR OPS_String[1024];
export OPS_Name OPS_name; export OPS_Name OPS_name;
@ -52,15 +52,15 @@ static void OPS_Str (INT8 *sym)
OPS_err(3); OPS_err(3);
break; break;
} }
if (i == 255) { if (i == 1023) {
OPS_err(241); OPS_err(241);
break; break;
} }
OPS_str[__X(i, 256)] = OPS_ch; OPS_str[__X(i, 1024)] = OPS_ch;
i += 1; i += 1;
} }
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
OPS_str[__X(i, 256)] = 0x00; OPS_str[__X(i, 1024)] = 0x00;
OPS_intval = i + 1; OPS_intval = i + 1;
if (OPS_intval == 2) { if (OPS_intval == 2) {
*sym = 35; *sym = 35;
@ -280,12 +280,12 @@ static void Comment__2 (void);
static void Comment__2 (void) static void Comment__2 (void)
{ {
BOOLEAN isExported; BOOLEAN isExported;
CHAR commentText[256]; CHAR commentText[1024];
INT16 i, nestLevel; INT16 i, nestLevel;
CHAR prevCh, nextCh; CHAR prevCh;
i = 0; i = 0;
while (i <= 255) { while (i <= 1023) {
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
i += 1; i += 1;
} }
isExported = 0; isExported = 0;
@ -298,7 +298,7 @@ static void Comment__2 (void)
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
if (OPS_ch == ')') { if (OPS_ch == ')') {
commentText[0] = 0x00; commentText[0] = 0x00;
OPM_StoreComment(commentText, 256); OPM_StoreComment(commentText, 1024);
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
return; return;
} }
@ -306,47 +306,65 @@ static void Comment__2 (void)
while ((nestLevel > 0 && OPS_ch != 0x00)) { while ((nestLevel > 0 && OPS_ch != 0x00)) {
if ((prevCh == '(' && OPS_ch == '*')) { if ((prevCh == '(' && OPS_ch == '*')) {
nestLevel += 1; nestLevel += 1;
prevCh = 0x00; prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} else if ((prevCh == '*' && OPS_ch == ')')) { } else if ((prevCh == '*' && OPS_ch == ')')) {
nestLevel -= 1; nestLevel -= 1;
if (nestLevel == 0) { if (nestLevel == 0) {
OPM_Get(&OPS_ch); OPM_Get(&OPS_ch);
} else { } else {
prevCh = 0x00; prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
} else { } else {
if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { if ((isExported && nestLevel == 1)) {
if (i < 255) { if (i < 1023) {
commentText[__X(i, 256)] = prevCh; if (OPS_ch == 0x0d || OPS_ch == 0x0a) {
i += 1; if (i == 0 || commentText[__X(i - 1, 1024)] != 0x0a) {
commentText[__X(i, 1024)] = 0x0a;
i += 1;
}
if (OPS_ch == 0x0d) {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
if (OPS_ch == 0x0a) {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else if (OPS_ch >= ' ') {
commentText[__X(i, 1024)] = OPS_ch;
i += 1;
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
}
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
} else {
prevCh = OPS_ch;
OPM_Get(&OPS_ch);
} }
prevCh = OPS_ch;
}
if (nestLevel > 0) {
OPM_Get(&OPS_ch);
} }
} }
if (OPS_ch == 0x00) { if (OPS_ch == 0x00) {
OPS_err(5); OPS_err(5);
} }
if ((((((isExported && nestLevel == 0)) && prevCh != 0x00)) && prevCh != '*')) {
if (i < 255) {
commentText[__X(i, 256)] = prevCh;
i += 1;
} else {
OPM_LogWStr((CHAR*)"Truncating final comment character", 35);
OPM_LogWLn();
}
}
if (isExported) { if (isExported) {
if (i >= 256) { if (i >= 1024) {
OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30);
OPM_LogWLn(); OPM_LogWLn();
i = 255; i = 1023;
} }
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
OPM_StoreComment(commentText, 256); OPM_StoreComment(commentText, 1024);
} }
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h
@ -9,7 +9,7 @@ typedef
CHAR OPS_Name[256]; CHAR OPS_Name[256];
typedef typedef
CHAR OPS_String[256]; CHAR OPS_String[1024];
import OPS_Name OPS_name; import OPS_Name OPS_name;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -423,7 +423,7 @@ OPT_Node OPT_NewNode (INT8 class)
OPT_ConstExt OPT_NewExt (void) OPT_ConstExt OPT_NewExt (void)
{ {
OPT_ConstExt ext = NIL; OPT_ConstExt ext = NIL;
ext = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); ext = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024)));
return ext; return ext;
} }
@ -560,7 +560,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
OPT_Object ob0 = NIL, ob1 = NIL; OPT_Object ob0 = NIL, ob1 = NIL;
BOOLEAN left; BOOLEAN left;
INT8 mnolev; INT8 mnolev;
CHAR commentText[256]; CHAR commentText[1024];
INT16 j; INT16 j;
ob0 = OPT_topScope; ob0 = OPT_topScope;
ob1 = ob0->right; ob1 = ob0->right;
@ -593,15 +593,15 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
__COPY(name, ob1->name, 256); __COPY(name, ob1->name, 256);
mnolev = OPT_topScope->mnolev; mnolev = OPT_topScope->mnolev;
ob1->mnolev = mnolev; ob1->mnolev = mnolev;
OPM_GetComment((void*)commentText, 256); OPM_GetComment((void*)commentText, 1024);
if (commentText[0] != 0x00) { if (commentText[0] != 0x00) {
ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024)));
j = 0; j = 0;
while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { while ((j < 1023 && commentText[__X(j, 1024)] != 0x00)) {
(*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; (*ob1->comment)[__X(j, 1024)] = commentText[__X(j, 1024)];
j += 1; j += 1;
} }
(*ob1->comment)[__X(j, 256)] = 0x00; (*ob1->comment)[__X(j, 1024)] = 0x00;
} }
break; break;
} }
@ -868,7 +868,7 @@ void OPT_FPrintObj (OPT_Object obj)
OPM_FPrintLReal(&fprint, obj->conval->realval); OPM_FPrintLReal(&fprint, obj->conval->realval);
break; break;
case 8: case 8:
OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 256); OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 1024);
break; break;
case 9: case 9:
break; break;
@ -889,7 +889,7 @@ void OPT_FPrintObj (OPT_Object obj)
f = 1; f = 1;
OPM_FPrint(&fprint, m); OPM_FPrint(&fprint, m);
while (f <= m) { while (f <= m) {
OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 256)]); OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 1024)]);
f += 1; f += 1;
} }
} else if (obj->mode == 5) { } else if (obj->mode == 5) {
@ -1096,7 +1096,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval)
i = 0; i = 0;
do { do {
OPM_SymRCh(&ch); OPM_SymRCh(&ch);
(*ext)[__X(i, 256)] = ch; (*ext)[__X(i, 1024)] = ch;
i += 1; i += 1;
} while (!(ch == 0x00)); } while (!(ch == 0x00));
conval->intval2 = i; conval->intval2 = i;
@ -1109,6 +1109,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval)
OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37); OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37);
OPM_LogWNum(f, 0); OPM_LogWNum(f, 0);
OPM_LogWLn(); OPM_LogWLn();
OPM_err(155);
break; break;
} }
} }
@ -1137,6 +1138,9 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par)
} }
if (tag == 23) { if (tag == 23) {
new->mode = 1; new->mode = 1;
} else if (tag == 42) {
new->mode = 2;
new->vis = 3;
} else { } else {
new->mode = 2; new->mode = 2;
} }
@ -1210,6 +1214,8 @@ static OPT_Struct OPT_InTyp (INT32 tag)
return OPT_IntType(OPM_SymRInt()); return OPT_IntType(OPM_SymRInt());
} else if (tag == 7) { } else if (tag == 7) {
return OPT_SetType(OPM_SymRInt()); return OPT_SetType(OPM_SymRInt());
} else if (tag == 12) {
return OPT_adrtyp;
} else { } else {
return OPT_impCtxt.ref[__X(tag, 255)]; return OPT_impCtxt.ref[__X(tag, 255)];
} }
@ -1406,7 +1412,7 @@ static OPT_Object OPT_InObj (INT8 mno)
OPT_Struct typ = NIL; OPT_Struct typ = NIL;
INT32 tag; INT32 tag;
OPT_ConstExt ext = NIL; OPT_ConstExt ext = NIL;
OPS_Name commentText; CHAR commentText[1024];
BOOLEAN hasComment; BOOLEAN hasComment;
INT16 j; INT16 j;
INT32 len; INT32 len;
@ -1417,19 +1423,22 @@ static OPT_Object OPT_InObj (INT8 mno)
if (len < 0) { if (len < 0) {
len = 0; len = 0;
} }
if (len > 255) { if (len > 1023) {
len = 255; len = 1023;
} }
i = 0; i = 0;
while (i < len) { while (i < len) {
OPM_SymRCh(&commentText[__X(i, 256)]); OPM_SymRCh(&commentText[__X(i, 1024)]);
i += 1; i += 1;
} }
commentText[__X(i, 256)] = 0x00; commentText[__X(i, 1024)] = 0x00;
hasComment = 1; hasComment = 1;
tag = OPM_SymRInt(); tag = OPM_SymRInt();
} }
OPT_impCtxt.nextTag = tag; if ((tag <= 11 && tag == 0)) {
OPM_err(155);
return NIL;
}
if (tag < 0 || tag > 50) { if (tag < 0 || tag > 50) {
OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30);
OPM_LogWNum(tag, 0); OPM_LogWNum(tag, 0);
@ -1471,7 +1480,7 @@ static OPT_Object OPT_InObj (INT8 mno)
(*ext)[0] = __CHR(s); (*ext)[0] = __CHR(s);
i = 1; i = 1;
while (i <= s) { while (i <= s) {
OPM_SymRCh(&(*ext)[__X(i, 256)]); OPM_SymRCh(&(*ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
break; break;
@ -1502,13 +1511,13 @@ static OPT_Object OPT_InObj (INT8 mno)
OPT_InName((void*)obj->name, 256); OPT_InName((void*)obj->name, 256);
} }
if ((hasComment && obj != NIL)) { if ((hasComment && obj != NIL)) {
obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024)));
j = 0; j = 0;
while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { while ((((j < 1023 && j < len)) && commentText[__X(j, 1024)] != 0x00)) {
(*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; (*obj->comment)[__X(j, 1024)] = commentText[__X(j, 1024)];
j += 1; j += 1;
} }
(*obj->comment)[__X(j, 256)] = 0x00; (*obj->comment)[__X(j, 1024)] = 0x00;
} }
OPT_FPrintObj(obj); OPT_FPrintObj(obj);
if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) {
@ -1688,6 +1697,8 @@ static void OPT_OutSign (OPT_Struct result, OPT_Object par)
while (par != NIL) { while (par != NIL) {
if (par->mode == 1) { if (par->mode == 1) {
OPM_SymWInt(23); OPM_SymWInt(23);
} else if (par->vis == 3) {
OPM_SymWInt(42);
} else { } else {
OPM_SymWInt(24); OPM_SymWInt(24);
} }
@ -1842,7 +1853,7 @@ static void OPT_OutConstant (OPT_Object obj)
OPM_SymWLReal(obj->conval->realval); OPM_SymWLReal(obj->conval->realval);
break; break;
case 8: case 8:
OPT_OutName((void*)*obj->conval->ext, 256); OPT_OutName((void*)*obj->conval->ext, 1024);
break; break;
case 9: case 9:
break; break;
@ -1857,7 +1868,7 @@ static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len)
INT16 i; INT16 i;
__DUP(text, text__len, CHAR); __DUP(text, text__len, CHAR);
i = 0; i = 0;
while ((i < 255 && text[__X(i, text__len)] != 0x00)) { while ((i < 1023 && text[__X(i, text__len)] != 0x00)) {
OPM_SymWCh(text[__X(i, text__len)]); OPM_SymWCh(text[__X(i, text__len)]);
i += 1; i += 1;
} }
@ -1874,16 +1885,18 @@ static void OPT_OutObj (OPT_Object obj)
OPT_OutObj(obj->left); OPT_OutObj(obj->left);
if (__IN(obj->mode, 0x06ea, 32)) { if (__IN(obj->mode, 0x06ea, 32)) {
if (obj->comment != NIL) { if (obj->comment != NIL) {
OPM_SymWInt(41); if ((__IN(obj->mode, 0x06aa, 32) && obj->vis != 0)) {
k = 0; OPM_SymWInt(41);
while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) { k = 0;
k += 1; while ((k < 1023 && (*obj->comment)[__X(k, 1024)] != 0x00)) {
} k += 1;
OPM_SymWInt(k); }
l = 0; OPM_SymWInt(k);
while (l < k) { l = 0;
OPM_SymWCh((*obj->comment)[__X(l, 256)]); while (l < k) {
l += 1; OPM_SymWCh((*obj->comment)[__X(l, 1024)]);
l += 1;
}
} }
} }
if (obj->history == 4) { if (obj->history == 4) {
@ -1952,7 +1965,7 @@ static void OPT_OutObj (OPT_Object obj)
i = 1; i = 1;
OPM_SymWInt(j); OPM_SymWInt(j);
while (i <= j) { while (i <= j) {
OPM_SymWCh((*ext)[__X(i, 256)]); OPM_SymWCh((*ext)[__X(i, 1024)]);
i += 1; i += 1;
} }
OPT_OutName((void*)obj->name, 256); OPT_OutName((void*)obj->name, 256);
@ -2191,6 +2204,7 @@ export void *OPT__init(void)
OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp); OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp);
OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp); OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp);
OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp); OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp);
OPT_adrtyp->ref = 12;
OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ); OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ);
OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ); OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ);
OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ); OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -676,7 +676,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp)
} }
} }
} else { } else {
if ((((mode == 2 && typ != n->typ)) && prec == -1)) { if (((((mode == 2 || typ->BaseTyp->form == 13) && typ != n->typ)) && prec == -1)) {
OPM_WriteString((CHAR*)"(void*)", 8); OPM_WriteString((CHAR*)"(void*)", 8);
} }
} }
@ -1299,7 +1299,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
OPM_WriteInt(r->conval->intval2); OPM_WriteInt(r->conval->intval2);
} else if (r->typ->comp == 3) { } else if (r->typ->comp == 3) {
OPM_WriteString((CHAR*)"__X(", 5); OPM_WriteString((CHAR*)"__X(", 5);
OPC_Len(r->obj, r->typ, 0); OPV_Len(r, 0);
OPM_WriteString((CHAR*)" * ", 4); OPM_WriteString((CHAR*)" * ", 4);
OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteInt(r->typ->BaseTyp->size);
OPM_WriteString((CHAR*)", ", 3); OPM_WriteString((CHAR*)", ", 3);
@ -1327,10 +1327,16 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
} }
if (l->typ == r->typ) { if (l->typ == r->typ) {
OPV_expr(r, -1); OPV_expr(r, -1);
} else if ((((l->typ->form == 11 && r->typ->form != 9)) && l->typ->strobj != NIL)) { } else if ((l->typ->form == 11 && r->typ->form != 9)) {
OPM_Write('('); if (l->typ->strobj != NIL) {
OPC_Ident(l->typ->strobj); OPM_Write('(');
OPM_Write(')'); OPC_Ident(l->typ->strobj);
OPM_Write(')');
} else if ((((l->typ->BaseTyp != NIL && l->typ->BaseTyp->strobj != NIL)) && l->typ->BaseTyp != r->typ->BaseTyp)) {
OPM_Write('(');
OPC_Ident(l->typ->BaseTyp->strobj);
OPM_WriteString((CHAR*)"*)", 3);
}
OPV_expr(r, -1); OPV_expr(r, -1);
} else if (l->typ->comp == 4) { } else if (l->typ->comp == 4) {
OPM_WriteString((CHAR*)"*(", 3); OPM_WriteString((CHAR*)"*(", 3);

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ /* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

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