mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 05:12:26 +00:00
Compare commits
No commits in common. "master" and "v2.1.2" have entirely different histories.
219 changed files with 741 additions and 2629 deletions
4
.gitattributes
vendored
4
.gitattributes
vendored
|
|
@ -34,7 +34,3 @@
|
|||
*.Mod diff=pascal
|
||||
*.c diff=cpp
|
||||
*.h diff=cpp
|
||||
|
||||
# Set the language to Oberon
|
||||
*.Mod linguist-language=Oberon
|
||||
*.mod linguist-language=Oberon
|
||||
|
|
|
|||
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -11,7 +11,6 @@
|
|||
/*.sym
|
||||
/*.asm
|
||||
/*.mod
|
||||
/Errors.Txt
|
||||
/Errors.txt
|
||||
/olang
|
||||
/src/test/**/*.exe
|
||||
|
|
@ -21,11 +20,9 @@
|
|||
/src/test/**/*.obj
|
||||
/src/test/**/*.sym
|
||||
**/*.stackdump
|
||||
!/src/test/confidence/**/expected
|
||||
/src/test/confidence/**/input
|
||||
/src/test/confidence/**/result
|
||||
/src/test/confidence/**/result-*
|
||||
/src/test/confidence/**/*[^.]*
|
||||
/src/test/confidence/**/*.asm
|
||||
/src/test/confidence/**/*.s
|
||||
/src/test/confidence/**/*.map
|
||||
|
|
@ -42,5 +39,3 @@
|
|||
/triage/BasicTypeSize.md
|
||||
/triage/Roadmap.md
|
||||
triage/system/*
|
||||
tags
|
||||
voc
|
||||
|
|
|
|||
30
ReadMe.md
30
ReadMe.md
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
# Ѵishap Oberon
|
||||
|
||||
[Ѵishap Oberon](https://vishap.oberon.am/) is a free and open source (GPLv3)
|
||||
[Ѵishap Oberon](http://oberon.vishap.am) is a free and open source (GPLv3)
|
||||
implementation of the Oberon-2 language and libraries for use on
|
||||
conventional operating systems such as Linux, BSD, Android, Mac and Windows.
|
||||
|
||||
Vishap's Oberon Compiler (voc) uses a C backend (gcc, clang, tcc or msc) to compile
|
||||
Vishap's Oberon Compiler (voc) uses a C backend (gcc, clang or msc) to compile
|
||||
Oberon programs under Unix, Mac or Windows. Vishap Oberon includes
|
||||
libraries from the Ulm, oo2c and Ofront Oberon compilers, as well as
|
||||
default libraries complying with the Oakwood Guidelines for Oberon-2 compilers.
|
||||
|
|
@ -31,11 +31,9 @@ It is easy to install the Oberon compiler and libraries
|
|||
with the following simple steps:
|
||||
|
||||
1. Install pre-requisites such as git, gcc, static C libraries, diff utils.
|
||||
2. Clone the repository: `git clone https://github.com/vishaps/voc`.
|
||||
3. Optionally `export CC=clang` or `export CC=tcc`.
|
||||
4. run `make full`.
|
||||
5. Optionally install to a system directory such as /opt or /usr/local/share with `make install` (might be with sudo).
|
||||
6. Set your PATH variable to include the compiler binary.
|
||||
2. Clone the repository and run 'make full'.
|
||||
3. Optionally install to a system directory such as /opt or /usr/local/share with 'make install'.
|
||||
4. Set your PATH variable to include the compiler binary.
|
||||
|
||||
These are detailed below:
|
||||
|
||||
|
|
@ -181,9 +179,9 @@ Most of the runtime in libVishapOberon is distributed under GPLv3 with runtime e
|
|||
|
||||
## Platform support and porting
|
||||
|
||||
Vishap Oberon supports 32 and 64 bit little-endian architectures including Intel x86 and x86_64, 32 bit arm and aarch64.
|
||||
Vishap Oberon supports 32 and 64 bit little-endian architectures including Intel x86 and x64, arm and ppc.
|
||||
|
||||
It compiles under gcc, clang, tcc and Microsoft Visual C.
|
||||
It compiles under gcc, clang and Microsoft Visual C.
|
||||
|
||||
Installation supports GNU/Linux, MAC OSX, BSD and Windows (native and cygwin).
|
||||
|
||||
|
|
@ -278,13 +276,13 @@ Also, Vishaps are known in tales, fiction. [This page](http://blog.fogus.me/2015
|
|||
###### Oberon
|
||||
- [The History of Modula-2 and Oberon](http://people.inf.ethz.ch/wirth/Articles/Modula-Oberon-June.pdf)
|
||||
- [The Programming Language Oberon](https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon.Report.pdf)
|
||||
- [Project Oberon: The Design of an Operating System and Compiler ](https://people.inf.ethz.ch/wirth/ProjectOberon1992.pdf)
|
||||
- [Oberon - the Overlooked Jewel](http://pascal.hansotten.com/uploads/oberonpi/Oberon%20article.pdf)
|
||||
- [Project Oberon: The Design of an Operating System and Compiler ](http://www.ethoberon.ethz.ch/WirthPubl/ProjectOberon.pdf)
|
||||
- [Oberon - the Overlooked Jewel](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.90.7173&rep=rep1&type=pdf)
|
||||
|
||||
###### Oberon 2
|
||||
- [Differences between Oberon and Oberon-2](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=89e5bd3cf006bde4821599cdc57a37de5dc84bcd)
|
||||
- [Differences between Oberon and Oberon-2](http://members.home.nl/jmr272/Oberon/Oberon2.Differences.pdf)
|
||||
- [The Programming Language Oberon-2](http://www.ssw.uni-linz.ac.at/Research/Papers/Oberon2.pdf)
|
||||
- [Programming in Oberon. Steps beyond Pascal and Modula](https://people.inf.ethz.ch/wirth/ProgInOberonWR.pdf)
|
||||
- [Programming in Oberon. Steps beyond Pascal and Modula](http://www.ethoberon.ethz.ch/WirthPubl/ProgInOberonWR.pdf)
|
||||
- [The Oakwood Guidelines for Oberon-2 Compiler Developers](http://www.math.bas.bg/bantchev/place/oberon/oakwood-guidelines.pdf)
|
||||
|
||||
###### Oberon 07
|
||||
|
|
@ -294,10 +292,10 @@ Also, Vishaps are known in tales, fiction. [This page](http://blog.fogus.me/2015
|
|||
|
||||
###### Links
|
||||
- [Niklaus Wirth's personal page at ETH Zurich](https://www.inf.ethz.ch/personal/wirth/)
|
||||
- [Selected articles by Niklaus Wirth](https://people.inf.ethz.ch/wirth/SelectedArticles.pdf)
|
||||
- [ETH Oberon publications page](https://web.archive.org/web/20191207155011/http://www.ethoberon.ethz.ch/books.html)
|
||||
- [Joseph Templ's ofront on github](https://github.com/jtempl/ofront)
|
||||
- [ETH Zurich's Wirth publications page](http://www.ethoberon.ethz.ch/WirthPubl/)
|
||||
- [Joseph Templ's ofront on github](https://hithub.com/jtempl/ofront)
|
||||
- [Software Templ OG](http://www.software-templ.com)
|
||||
- [Oberon: Steps beyond Pascal and Modula](http://fruttenboel.verhoeven272.nl/Oberon/)
|
||||
|
||||
|
||||
## History
|
||||
|
|
|
|||
|
|
@ -151,61 +151,53 @@ SYSTEM_PTR SYSTEM_NEWARR(ADDRESS *typ, ADDRESS elemsz, int elemalgn, int nofdim,
|
|||
return x;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
typedef void (*SystemSignalHandler)(INT32); // = Platform_SignalHandler
|
||||
|
||||
#ifndef _WIN32
|
||||
// Unix signal handling
|
||||
SystemSignalHandler handler[10] = {0}; // Adjust the array size to include signal 11
|
||||
|
||||
void segfaultHandler(int signal) {
|
||||
__HALT(-10);
|
||||
}
|
||||
// Revised signal handler to accommodate additional signals like SIGSEGV
|
||||
SystemSignalHandler handler[3] = {0};
|
||||
|
||||
// Provide signal handling for Unix based systems
|
||||
void signalHandler(int s) {
|
||||
if ((s >= 2 && s <= 4) || s == 11) { // Include SIGSEGV (usually signal 11)
|
||||
if (handler[s-2]) {
|
||||
handler[s-2](s);
|
||||
}
|
||||
}
|
||||
// Ignore other signals
|
||||
if (s >= 2 && s <= 4) handler[s-2](s);
|
||||
// (Ignore other signals)
|
||||
}
|
||||
|
||||
void SystemSetHandler(int s, ADDRESS h) {
|
||||
if ((s >= 2 && s <= 4) || s == 11) {
|
||||
if (s >= 2 && s <= 4) {
|
||||
int needtosetsystemhandler = handler[s-2] == 0;
|
||||
handler[s-2] = (SystemSignalHandler)h;
|
||||
if (needtosetsystemhandler) {
|
||||
signal(s, signalHandler);
|
||||
}
|
||||
if (needtosetsystemhandler) {signal(s, signalHandler);}
|
||||
}
|
||||
}
|
||||
|
||||
void setupAutomaticSegfaultHandler() {
|
||||
SystemSetHandler(11, (ADDRESS)segfaultHandler); // Register handler for SIGSEGV
|
||||
}
|
||||
|
||||
#else
|
||||
// Windows system remains as is since Windows does not use SIGSEGV in the same way
|
||||
|
||||
// Provides Windows callback handlers for signal-like scenarios
|
||||
#include "WindowsWrapper.h"
|
||||
|
||||
SystemSignalHandler SystemInterruptHandler = 0;
|
||||
SystemSignalHandler SystemQuitHandler = 0;
|
||||
SystemSignalHandler SystemQuitHandler = 0;
|
||||
BOOL ConsoleCtrlHandlerSet = FALSE;
|
||||
|
||||
BOOL WINAPI SystemConsoleCtrlHandler(DWORD ctrlType) {
|
||||
if ((ctrlType == CTRL_C_EVENT) || (ctrlType == CTRL_BREAK_EVENT)) {
|
||||
if (SystemInterruptHandler) {
|
||||
SystemInterruptHandler(2); // SIGINT
|
||||
SystemInterruptHandler(2); // SIGINT
|
||||
return TRUE;
|
||||
}
|
||||
} else {
|
||||
} else { // Close, logoff or shutdown
|
||||
if (SystemQuitHandler) {
|
||||
SystemQuitHandler(3); // SIGQUIT
|
||||
SystemQuitHandler(3); // SIGQUIT
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void EnsureConsoleCtrlHandler() {
|
||||
if (!ConsoleCtrlHandlerSet) {
|
||||
SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE);
|
||||
|
|
@ -224,4 +216,3 @@ typedef void (*SystemSignalHandler)(INT32); // = Platform_SignalHandler
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -116,11 +116,9 @@ extern void Modules_AssertFail(INT32 x);
|
|||
|
||||
// Index checking
|
||||
|
||||
static inline INT64 __XF(INT64 i, UINT64 ub) {
|
||||
if (i < 0 || (UINT64)i >= ub) __HALT(-2);
|
||||
return i;
|
||||
}
|
||||
#define __X(i, ub) (((i) >= 0 && (i) < (ub)) ? (i) : (__HALT(-2),0))
|
||||
static inline INT64 __XF(UINT64 i, UINT64 ub) {if (i >= ub) {__HALT(-2);} return i;}
|
||||
#define __X(i, ub) (((i)<(ub))?i:(__HALT(-2),0))
|
||||
|
||||
|
||||
// Range checking, and checked SHORT and CHR functions
|
||||
|
||||
|
|
@ -267,12 +265,7 @@ extern void Heap_INCREF();
|
|||
extern void Modules_Init(INT32 argc, ADDRESS argv);
|
||||
extern void Heap_FINALL();
|
||||
|
||||
extern void setupAutomaticSegfaultHandler();
|
||||
#ifndef _WIN32
|
||||
#define __INIT(argc, argv) static void *m; setupAutomaticSegfaultHandler(); Modules_Init(argc, (ADDRESS)&argv);
|
||||
#else
|
||||
#define __INIT(argc, argv) static void *m; Modules_Init(argc, (ADDRESS)&argv);
|
||||
#endif
|
||||
#define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name,enum)
|
||||
#define __FINI Heap_FINALL(); return 0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. 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 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
|
||||
__MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -86,7 +86,6 @@ export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ);
|
|||
export void Files_Purge (Files_File f);
|
||||
export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x);
|
||||
export void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n);
|
||||
export void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x);
|
||||
export void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x);
|
||||
|
|
@ -635,11 +634,6 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
|
|||
}
|
||||
}
|
||||
|
||||
void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
|
||||
{
|
||||
Files_Read(&*r, r__typ, &*x);
|
||||
}
|
||||
|
||||
void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n)
|
||||
{
|
||||
INT32 xpos, min, restInBuf, offset;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
@ -40,7 +40,6 @@ import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ);
|
|||
import void Files_Purge (Files_File f);
|
||||
import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x);
|
||||
import void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n);
|
||||
import void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x);
|
||||
import void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -1626,7 +1626,6 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
if (x == y) {
|
||||
} else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) {
|
||||
} else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) {
|
||||
OPB_err(113);
|
||||
} else if (x->BaseTyp == OPT_chartyp) {
|
||||
if (g == 8) {
|
||||
if (ynode->conval->intval2 > x->n) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -618,33 +618,31 @@ static void OPC_DefineTProcMacros (OPT_Object obj, BOOLEAN *empty)
|
|||
{
|
||||
if (obj != NIL) {
|
||||
OPC_DefineTProcMacros(obj->left, &*empty);
|
||||
if ((obj->mode == 13 && obj == OPC_BaseTProc(obj))) {
|
||||
if (OPM_currFile == 1 || (OPM_currFile == 0 && obj->vis == 1)) {
|
||||
OPM_WriteString((CHAR*)"#define __", 11);
|
||||
OPC_Ident(obj);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_WriteString((CHAR*)" __SEND(", 9);
|
||||
if (obj->link->typ->form == 11) {
|
||||
OPM_WriteString((CHAR*)"__TYPEOF(", 10);
|
||||
OPC_Ident(obj->link);
|
||||
OPM_Write(')');
|
||||
} else {
|
||||
OPC_Ident(obj->link);
|
||||
OPM_WriteString((CHAR*)"__typ", 6);
|
||||
}
|
||||
OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16));
|
||||
if (obj->typ == OPT_notyp) {
|
||||
OPM_WriteString((CHAR*)"void", 5);
|
||||
} else {
|
||||
OPC_Ident(obj->typ->strobj);
|
||||
}
|
||||
OPM_WriteString((CHAR*)"(*)", 4);
|
||||
OPC_AnsiParamList(obj->link, 0);
|
||||
OPM_WriteString((CHAR*)", ", 3);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
if ((((obj->mode == 13 && obj == OPC_BaseTProc(obj))) && (OPM_currFile != 0 || obj->vis == 1))) {
|
||||
OPM_WriteString((CHAR*)"#define __", 11);
|
||||
OPC_Ident(obj);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_WriteString((CHAR*)" __SEND(", 9);
|
||||
if (obj->link->typ->form == 11) {
|
||||
OPM_WriteString((CHAR*)"__TYPEOF(", 10);
|
||||
OPC_Ident(obj->link);
|
||||
OPM_Write(')');
|
||||
OPM_WriteLn();
|
||||
} else {
|
||||
OPC_Ident(obj->link);
|
||||
OPM_WriteString((CHAR*)"__typ", 6);
|
||||
}
|
||||
OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16));
|
||||
if (obj->typ == OPT_notyp) {
|
||||
OPM_WriteString((CHAR*)"void", 5);
|
||||
} else {
|
||||
OPC_Ident(obj->typ->strobj);
|
||||
}
|
||||
OPM_WriteString((CHAR*)"(*)", 4);
|
||||
OPC_AnsiParamList(obj->link, 0);
|
||||
OPM_WriteString((CHAR*)", ", 3);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_Write(')');
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPC_DefineTProcMacros(obj->right, &*empty);
|
||||
}
|
||||
|
|
@ -654,7 +652,7 @@ static void OPC_DefineType (OPT_Struct str)
|
|||
{
|
||||
OPT_Object obj = NIL, field = NIL, par = NIL;
|
||||
BOOLEAN empty;
|
||||
if ((OPM_currFile == 1 || str->ref < 255) || (((OPM_currFile == 0 && str->strobj != NIL)) && str->strobj->vis == 1)) {
|
||||
if (OPM_currFile == 1 || str->ref < 255) {
|
||||
obj = str->strobj;
|
||||
if (obj == NIL || OPC_Undefined(obj)) {
|
||||
if (obj != NIL) {
|
||||
|
|
@ -721,13 +719,6 @@ static void OPC_DefineType (OPT_Struct str)
|
|||
if (!empty) {
|
||||
OPM_WriteLn();
|
||||
}
|
||||
} else if ((obj->typ->form == 11 && obj->typ->BaseTyp->comp == 4)) {
|
||||
empty = 1;
|
||||
OPC_DeclareTProcs(obj->typ->BaseTyp->link, &empty);
|
||||
OPC_DefineTProcMacros(obj->typ->BaseTyp->link, &empty);
|
||||
if (!empty) {
|
||||
OPM_WriteLn();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -19,8 +19,6 @@ typedef
|
|||
CHAR OPM_FileName[32];
|
||||
|
||||
|
||||
static CHAR OPM_currentComment[256];
|
||||
static BOOLEAN OPM_hasComment;
|
||||
static CHAR OPM_SourceFileName[256];
|
||||
static CHAR OPM_GlobalModel[10];
|
||||
export CHAR OPM_Model[10];
|
||||
|
|
@ -61,7 +59,6 @@ static void OPM_FindInstallDir (void);
|
|||
static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos);
|
||||
static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len);
|
||||
export void OPM_Get (CHAR *ch);
|
||||
export void OPM_GetComment (CHAR *text, ADDRESS text__len);
|
||||
export void OPM_Init (BOOLEAN *done);
|
||||
export void OPM_InitOptions (void);
|
||||
export INT16 OPM_Integer (INT64 n);
|
||||
|
|
@ -85,7 +82,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len);
|
|||
static void OPM_ShowLine (INT64 pos);
|
||||
export INT64 OPM_SignedMaximum (INT32 bytecount);
|
||||
export INT64 OPM_SignedMinimum (INT32 bytecount);
|
||||
export void OPM_StoreComment (CHAR *text, ADDRESS text__len);
|
||||
export void OPM_SymRCh (CHAR *ch);
|
||||
export INT32 OPM_SymRInt (void);
|
||||
export INT64 OPM_SymRInt64 (void);
|
||||
|
|
@ -161,36 +157,6 @@ void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len)
|
|||
__DEL(modname);
|
||||
}
|
||||
|
||||
void OPM_StoreComment (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
__DUP(text, text__len, CHAR);
|
||||
i = 0;
|
||||
while ((i < 255 && text[__X(i, text__len)] != 0x00)) {
|
||||
OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)];
|
||||
i += 1;
|
||||
}
|
||||
OPM_currentComment[__X(i, 256)] = 0x00;
|
||||
OPM_hasComment = 1;
|
||||
__DEL(text);
|
||||
}
|
||||
|
||||
void OPM_GetComment (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
if (OPM_hasComment) {
|
||||
i = 0;
|
||||
while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) {
|
||||
text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)];
|
||||
i += 1;
|
||||
}
|
||||
text[__X(i, text__len)] = 0x00;
|
||||
OPM_hasComment = 0;
|
||||
} else {
|
||||
text[0] = 0x00;
|
||||
}
|
||||
}
|
||||
|
||||
INT64 OPM_SignedMaximum (INT32 bytecount)
|
||||
{
|
||||
INT64 result;
|
||||
|
|
@ -797,7 +763,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done)
|
|||
Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0);
|
||||
Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag);
|
||||
Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver);
|
||||
if (tag != 0xf7 || ver != 0x84) {
|
||||
if (tag != 0xf7 || ver != 0x83) {
|
||||
if (!__IN(4, OPM_Options, 32)) {
|
||||
OPM_err(-306);
|
||||
}
|
||||
|
|
@ -868,7 +834,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len)
|
|||
if (OPM_newSFile != NIL) {
|
||||
Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0x84);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0x83);
|
||||
} else {
|
||||
OPM_err(153);
|
||||
}
|
||||
|
|
@ -1177,7 +1143,5 @@ export void *OPM__init(void)
|
|||
OPM_MinReal = -OPM_MaxReal;
|
||||
OPM_MinLReal = -OPM_MaxLReal;
|
||||
OPM_FindInstallDir();
|
||||
OPM_hasComment = 0;
|
||||
OPM_currentComment[0] = 0x00;
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
@ -30,7 +30,6 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val);
|
|||
import void OPM_FPrintReal (INT32 *fp, REAL val);
|
||||
import void OPM_FPrintSet (INT32 *fp, UINT64 val);
|
||||
import void OPM_Get (CHAR *ch);
|
||||
import void OPM_GetComment (CHAR *text, ADDRESS text__len);
|
||||
import void OPM_Init (BOOLEAN *done);
|
||||
import void OPM_InitOptions (void);
|
||||
import INT16 OPM_Integer (INT64 n);
|
||||
|
|
@ -49,7 +48,6 @@ import BOOLEAN OPM_OpenPar (void);
|
|||
import void OPM_RegisterNewSym (void);
|
||||
import INT64 OPM_SignedMaximum (INT32 bytecount);
|
||||
import INT64 OPM_SignedMinimum (INT32 bytecount);
|
||||
import void OPM_StoreComment (CHAR *text, ADDRESS text__len);
|
||||
import void OPM_SymRCh (CHAR *ch);
|
||||
import INT32 OPM_SymRInt (void);
|
||||
import INT64 OPM_SymRInt64 (void);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -279,74 +279,32 @@ static void Comment__2 (void);
|
|||
|
||||
static void Comment__2 (void)
|
||||
{
|
||||
BOOLEAN isExported;
|
||||
CHAR commentText[256];
|
||||
INT16 i, nestLevel;
|
||||
CHAR prevCh, nextCh;
|
||||
i = 0;
|
||||
while (i <= 255) {
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
i += 1;
|
||||
}
|
||||
isExported = 0;
|
||||
i = 0;
|
||||
nestLevel = 1;
|
||||
prevCh = 0x00;
|
||||
OPM_Get(&OPS_ch);
|
||||
if (OPS_ch == '*') {
|
||||
isExported = 1;
|
||||
OPM_Get(&OPS_ch);
|
||||
if (OPS_ch == ')') {
|
||||
commentText[0] = 0x00;
|
||||
OPM_StoreComment(commentText, 256);
|
||||
OPM_Get(&OPS_ch);
|
||||
return;
|
||||
}
|
||||
}
|
||||
while ((nestLevel > 0 && OPS_ch != 0x00)) {
|
||||
if ((prevCh == '(' && OPS_ch == '*')) {
|
||||
nestLevel += 1;
|
||||
prevCh = 0x00;
|
||||
} else if ((prevCh == '*' && OPS_ch == ')')) {
|
||||
nestLevel -= 1;
|
||||
if (nestLevel == 0) {
|
||||
for (;;) {
|
||||
for (;;) {
|
||||
while (OPS_ch == '(') {
|
||||
OPM_Get(&OPS_ch);
|
||||
} else {
|
||||
prevCh = 0x00;
|
||||
}
|
||||
} else {
|
||||
if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) {
|
||||
if (i < 255) {
|
||||
commentText[__X(i, 256)] = prevCh;
|
||||
i += 1;
|
||||
if (OPS_ch == '*') {
|
||||
Comment__2();
|
||||
}
|
||||
}
|
||||
prevCh = OPS_ch;
|
||||
}
|
||||
if (nestLevel > 0) {
|
||||
if (OPS_ch == '*') {
|
||||
OPM_Get(&OPS_ch);
|
||||
break;
|
||||
}
|
||||
if (OPS_ch == 0x00) {
|
||||
break;
|
||||
}
|
||||
OPM_Get(&OPS_ch);
|
||||
}
|
||||
}
|
||||
if (OPS_ch == 0x00) {
|
||||
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 (OPS_ch == ')') {
|
||||
OPM_Get(&OPS_ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isExported) {
|
||||
if (i >= 256) {
|
||||
OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30);
|
||||
OPM_LogWLn();
|
||||
i = 255;
|
||||
if (OPS_ch == 0x00) {
|
||||
OPS_err(5);
|
||||
break;
|
||||
}
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
OPM_StoreComment(commentText, 256);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -83,7 +83,6 @@ typedef
|
|||
OPT_Const conval;
|
||||
INT32 adr, linkadr;
|
||||
INT16 x;
|
||||
OPT_ConstExt comment;
|
||||
} OPT_ObjDesc;
|
||||
|
||||
typedef
|
||||
|
|
@ -174,7 +173,6 @@ static void OPT_OutObj (OPT_Object obj);
|
|||
static void OPT_OutSign (OPT_Struct result, OPT_Object par);
|
||||
static void OPT_OutStr (OPT_Struct typ);
|
||||
static void OPT_OutTProcs (OPT_Struct typ, OPT_Object obj);
|
||||
static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len);
|
||||
export OPT_Struct OPT_SetType (INT32 size);
|
||||
export OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INT16 dir);
|
||||
export INT32 OPT_SizeAlignment (INT32 size);
|
||||
|
|
@ -390,10 +388,6 @@ OPT_Object OPT_NewObj (void)
|
|||
{
|
||||
OPT_Object obj = NIL;
|
||||
__NEW(obj, OPT_ObjDesc);
|
||||
obj->typ = NIL;
|
||||
obj->conval = NIL;
|
||||
obj->comment = NIL;
|
||||
obj->name[0] = 0x00;
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
@ -560,8 +554,6 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
|
|||
OPT_Object ob0 = NIL, ob1 = NIL;
|
||||
BOOLEAN left;
|
||||
INT8 mnolev;
|
||||
CHAR commentText[256];
|
||||
INT16 j;
|
||||
ob0 = OPT_topScope;
|
||||
ob1 = ob0->right;
|
||||
left = 0;
|
||||
|
|
@ -593,16 +585,6 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
|
|||
__COPY(name, ob1->name, 256);
|
||||
mnolev = OPT_topScope->mnolev;
|
||||
ob1->mnolev = mnolev;
|
||||
OPM_GetComment((void*)commentText, 256);
|
||||
if (commentText[0] != 0x00) {
|
||||
ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256);
|
||||
j = 0;
|
||||
while ((j < 255 && commentText[__X(j, 256)] != 0x00)) {
|
||||
(*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)];
|
||||
j += 1;
|
||||
}
|
||||
(*ob1->comment)[__X(j, 256)] = 0x00;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1121,13 +1103,6 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par)
|
|||
tag = OPM_SymRInt();
|
||||
last = NIL;
|
||||
while (tag != 18) {
|
||||
if (tag < 0 || tag > 100) {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Invalid tag value in InSign: ", 37);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return;
|
||||
}
|
||||
new = OPT_NewObj();
|
||||
new->mnolev = -mno;
|
||||
if (last == NIL) {
|
||||
|
|
@ -1406,37 +1381,7 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
OPT_Struct typ = NIL;
|
||||
INT32 tag;
|
||||
OPT_ConstExt ext = NIL;
|
||||
OPS_Name commentText;
|
||||
BOOLEAN hasComment;
|
||||
INT16 j;
|
||||
INT32 len;
|
||||
tag = OPT_impCtxt.nextTag;
|
||||
hasComment = 0;
|
||||
while (tag == 41) {
|
||||
len = OPM_SymRInt();
|
||||
if (len < 0) {
|
||||
len = 0;
|
||||
}
|
||||
if (len > 255) {
|
||||
len = 255;
|
||||
}
|
||||
i = 0;
|
||||
while (i < len) {
|
||||
OPM_SymRCh(&commentText[__X(i, 256)]);
|
||||
i += 1;
|
||||
}
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
hasComment = 1;
|
||||
tag = OPM_SymRInt();
|
||||
}
|
||||
OPT_impCtxt.nextTag = tag;
|
||||
if (tag < 0 || tag > 50) {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
}
|
||||
if (tag == 19) {
|
||||
OPT_InStruct(&typ);
|
||||
obj = typ->strobj;
|
||||
|
|
@ -1452,7 +1397,7 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
obj->conval = OPT_NewConst();
|
||||
OPT_InConstant(tag, obj->conval);
|
||||
obj->typ = OPT_InTyp(tag);
|
||||
} else if ((tag >= 31 && tag <= 33)) {
|
||||
} else if (tag >= 31) {
|
||||
obj->conval = OPT_NewConst();
|
||||
obj->conval->intval = -1;
|
||||
OPT_InSign(mno, &obj->typ, &obj->link);
|
||||
|
|
@ -1479,37 +1424,20 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
OPM_LogWStr((CHAR*)"unhandled case at InObj, tag = ", 32);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
break;
|
||||
}
|
||||
} else if (tag == 20) {
|
||||
obj->mode = 5;
|
||||
OPT_InStruct(&obj->typ);
|
||||
} else if (tag == 21 || tag == 22) {
|
||||
} else {
|
||||
obj->mode = 1;
|
||||
if (tag == 22) {
|
||||
obj->vis = 2;
|
||||
}
|
||||
OPT_InStruct(&obj->typ);
|
||||
} else {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Unexpected tag in InObj: ", 33);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
}
|
||||
OPT_InName((void*)obj->name, 256);
|
||||
}
|
||||
if ((hasComment && obj != NIL)) {
|
||||
obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256);
|
||||
j = 0;
|
||||
while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) {
|
||||
(*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)];
|
||||
j += 1;
|
||||
}
|
||||
(*obj->comment)[__X(j, 256)] = 0x00;
|
||||
}
|
||||
OPT_FPrintObj(obj);
|
||||
if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) {
|
||||
OPM_FPrint(&OPT_impCtxt.reffp, obj->typ->ref - 255);
|
||||
|
|
@ -1852,40 +1780,13 @@ static void OPT_OutConstant (OPT_Object obj)
|
|||
}
|
||||
}
|
||||
|
||||
static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
__DUP(text, text__len, CHAR);
|
||||
i = 0;
|
||||
while ((i < 255 && text[__X(i, text__len)] != 0x00)) {
|
||||
OPM_SymWCh(text[__X(i, text__len)]);
|
||||
i += 1;
|
||||
}
|
||||
OPM_SymWCh(0x00);
|
||||
__DEL(text);
|
||||
}
|
||||
|
||||
static void OPT_OutObj (OPT_Object obj)
|
||||
{
|
||||
INT16 i, j;
|
||||
OPT_ConstExt ext = NIL;
|
||||
INT16 k, l;
|
||||
if (obj != NIL) {
|
||||
OPT_OutObj(obj->left);
|
||||
if (__IN(obj->mode, 0x06ea, 32)) {
|
||||
if (obj->comment != NIL) {
|
||||
OPM_SymWInt(41);
|
||||
k = 0;
|
||||
while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) {
|
||||
k += 1;
|
||||
}
|
||||
OPM_SymWInt(k);
|
||||
l = 0;
|
||||
while (l < k) {
|
||||
OPM_SymWCh((*obj->comment)[__X(l, 256)]);
|
||||
l += 1;
|
||||
}
|
||||
}
|
||||
if (obj->history == 4) {
|
||||
OPT_FPrintErr(obj, 250);
|
||||
} else if (obj->vis != 0) {
|
||||
|
|
@ -2125,7 +2026,7 @@ static void EnumPtrs(void (*P)(void*))
|
|||
}
|
||||
|
||||
__TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 32), {0, -8}};
|
||||
__TDESC(OPT_ObjDesc, 1, 7) = {__TDFLDS("ObjDesc", 308), {0, 4, 8, 12, 284, 288, 304, -32}};
|
||||
__TDESC(OPT_ObjDesc, 1, 6) = {__TDFLDS("ObjDesc", 304), {0, 4, 8, 12, 284, 288, -28}};
|
||||
__TDESC(OPT_StrDesc, 1, 3) = {__TDFLDS("StrDesc", 56), {44, 48, 52, -16}};
|
||||
__TDESC(OPT_NodeDesc, 1, 6) = {__TDFLDS("NodeDesc", 28), {0, 4, 8, 16, 20, 24, -28}};
|
||||
__TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 3140), {16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
@ -61,7 +61,6 @@ typedef
|
|||
OPT_Const conval;
|
||||
INT32 adr, linkadr;
|
||||
INT16 x;
|
||||
OPT_ConstExt comment;
|
||||
} OPT_ObjDesc;
|
||||
|
||||
typedef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Out__h
|
||||
#define Out__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Platform__h
|
||||
#define Platform__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Reals__h
|
||||
#define Reals__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Strings__h
|
||||
#define Strings__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
#include "SYSTEM.h"
|
||||
#include "Files.h"
|
||||
#include "Modules.h"
|
||||
#include "Out.h"
|
||||
#include "Reals.h"
|
||||
|
||||
typedef
|
||||
|
|
@ -1809,6 +1810,7 @@ export void *Texts__init(void)
|
|||
__DEFMOD;
|
||||
__MODULE_IMPORT(Files);
|
||||
__MODULE_IMPORT(Modules);
|
||||
__MODULE_IMPORT(Out);
|
||||
__MODULE_IMPORT(Reals);
|
||||
__REGMOD("Texts", EnumPtrs);
|
||||
__INITYP(Texts_FontDesc, Texts_FontDesc, 0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Texts__h
|
||||
#define Texts__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -34,7 +34,6 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len);
|
|||
export void VT100_HVP (INT16 n, INT16 m);
|
||||
export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len);
|
||||
export void VT100_RCP (void);
|
||||
export void VT100_Reset (void);
|
||||
static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end);
|
||||
export void VT100_SCP (void);
|
||||
export void VT100_SD (INT16 n);
|
||||
|
|
@ -137,15 +136,6 @@ static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len)
|
|||
__DEL(letter);
|
||||
}
|
||||
|
||||
void VT100_Reset (void)
|
||||
{
|
||||
CHAR cmd[6];
|
||||
__COPY("\033", cmd, 6);
|
||||
Strings_Append((CHAR*)"c", 2, (void*)cmd, 6);
|
||||
Out_String(cmd, 6);
|
||||
Out_Ln();
|
||||
}
|
||||
|
||||
void VT100_CUU (INT16 n)
|
||||
{
|
||||
VT100_EscSeq(n, (CHAR*)"A", 2);
|
||||
|
|
@ -266,7 +256,6 @@ export void *VT100__init(void)
|
|||
__REGCMD("DECTCEMh", VT100_DECTCEMh);
|
||||
__REGCMD("DECTCEMl", VT100_DECTCEMl);
|
||||
__REGCMD("RCP", VT100_RCP);
|
||||
__REGCMD("Reset", VT100_Reset);
|
||||
__REGCMD("SCP", VT100_SCP);
|
||||
/* BEGIN */
|
||||
__COPY("\033", VT100_CSI, 5);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef VT100__h
|
||||
#define VT100__h
|
||||
|
|
@ -25,7 +25,6 @@ import void VT100_EL (INT16 n);
|
|||
import void VT100_HVP (INT16 n, INT16 m);
|
||||
import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len);
|
||||
import void VT100_RCP (void);
|
||||
import void VT100_Reset (void);
|
||||
import void VT100_SCP (void);
|
||||
import void VT100_SD (INT16 n);
|
||||
import void VT100_SGR (INT16 n);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -22,7 +22,7 @@ static extTools_CommandString extTools_CFLAGS;
|
|||
|
||||
|
||||
export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len);
|
||||
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len);
|
||||
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len);
|
||||
export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len);
|
||||
static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len);
|
||||
|
||||
|
|
@ -70,26 +70,22 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES
|
|||
__DEL(cmd);
|
||||
}
|
||||
|
||||
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len)
|
||||
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len)
|
||||
{
|
||||
__DUP(additionalopts, additionalopts__len, CHAR);
|
||||
__COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len);
|
||||
__COPY("gcc -fPIC -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);
|
||||
Strings_Append(additionalopts, additionalopts__len, (void*)s, s__len);
|
||||
Strings_Append((CHAR*)" ", 2, (void*)s, s__len);
|
||||
Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096);
|
||||
Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len);
|
||||
Strings_Append((CHAR*)" ", 2, (void*)s, s__len);
|
||||
__DEL(additionalopts);
|
||||
}
|
||||
|
||||
void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len)
|
||||
{
|
||||
extTools_CommandString cmd;
|
||||
__DUP(moduleName, moduleName__len, CHAR);
|
||||
extTools_InitialiseCompilerCommand((void*)cmd, 4096, (CHAR*)"", 1);
|
||||
extTools_InitialiseCompilerCommand((void*)cmd, 4096);
|
||||
Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096);
|
||||
Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096);
|
||||
Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096);
|
||||
|
|
@ -101,9 +97,10 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati
|
|||
{
|
||||
extTools_CommandString cmd;
|
||||
__DUP(additionalopts, additionalopts__len, CHAR);
|
||||
extTools_InitialiseCompilerCommand((void*)cmd, 4096, additionalopts, additionalopts__len);
|
||||
extTools_InitialiseCompilerCommand((void*)cmd, 4096);
|
||||
Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096);
|
||||
Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096);
|
||||
Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096);
|
||||
if (statically) {
|
||||
Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef extTools__h
|
||||
#define extTools__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. 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 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
|
||||
__MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -86,7 +86,6 @@ export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ);
|
|||
export void Files_Purge (Files_File f);
|
||||
export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x);
|
||||
export void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n);
|
||||
export void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x);
|
||||
export void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x);
|
||||
|
|
@ -635,11 +634,6 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
|
|||
}
|
||||
}
|
||||
|
||||
void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
|
||||
{
|
||||
Files_Read(&*r, r__typ, &*x);
|
||||
}
|
||||
|
||||
void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n)
|
||||
{
|
||||
INT32 xpos, min, restInBuf, offset;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
@ -40,7 +40,6 @@ import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ);
|
|||
import void Files_Purge (Files_File f);
|
||||
import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x);
|
||||
import void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n);
|
||||
import void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x);
|
||||
import void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -1626,7 +1626,6 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
if (x == y) {
|
||||
} else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) {
|
||||
} else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) {
|
||||
OPB_err(113);
|
||||
} else if (x->BaseTyp == OPT_chartyp) {
|
||||
if (g == 8) {
|
||||
if (ynode->conval->intval2 > x->n) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -618,33 +618,31 @@ static void OPC_DefineTProcMacros (OPT_Object obj, BOOLEAN *empty)
|
|||
{
|
||||
if (obj != NIL) {
|
||||
OPC_DefineTProcMacros(obj->left, &*empty);
|
||||
if ((obj->mode == 13 && obj == OPC_BaseTProc(obj))) {
|
||||
if (OPM_currFile == 1 || (OPM_currFile == 0 && obj->vis == 1)) {
|
||||
OPM_WriteString((CHAR*)"#define __", 11);
|
||||
OPC_Ident(obj);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_WriteString((CHAR*)" __SEND(", 9);
|
||||
if (obj->link->typ->form == 11) {
|
||||
OPM_WriteString((CHAR*)"__TYPEOF(", 10);
|
||||
OPC_Ident(obj->link);
|
||||
OPM_Write(')');
|
||||
} else {
|
||||
OPC_Ident(obj->link);
|
||||
OPM_WriteString((CHAR*)"__typ", 6);
|
||||
}
|
||||
OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16));
|
||||
if (obj->typ == OPT_notyp) {
|
||||
OPM_WriteString((CHAR*)"void", 5);
|
||||
} else {
|
||||
OPC_Ident(obj->typ->strobj);
|
||||
}
|
||||
OPM_WriteString((CHAR*)"(*)", 4);
|
||||
OPC_AnsiParamList(obj->link, 0);
|
||||
OPM_WriteString((CHAR*)", ", 3);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
if ((((obj->mode == 13 && obj == OPC_BaseTProc(obj))) && (OPM_currFile != 0 || obj->vis == 1))) {
|
||||
OPM_WriteString((CHAR*)"#define __", 11);
|
||||
OPC_Ident(obj);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_WriteString((CHAR*)" __SEND(", 9);
|
||||
if (obj->link->typ->form == 11) {
|
||||
OPM_WriteString((CHAR*)"__TYPEOF(", 10);
|
||||
OPC_Ident(obj->link);
|
||||
OPM_Write(')');
|
||||
OPM_WriteLn();
|
||||
} else {
|
||||
OPC_Ident(obj->link);
|
||||
OPM_WriteString((CHAR*)"__typ", 6);
|
||||
}
|
||||
OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16));
|
||||
if (obj->typ == OPT_notyp) {
|
||||
OPM_WriteString((CHAR*)"void", 5);
|
||||
} else {
|
||||
OPC_Ident(obj->typ->strobj);
|
||||
}
|
||||
OPM_WriteString((CHAR*)"(*)", 4);
|
||||
OPC_AnsiParamList(obj->link, 0);
|
||||
OPM_WriteString((CHAR*)", ", 3);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_Write(')');
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPC_DefineTProcMacros(obj->right, &*empty);
|
||||
}
|
||||
|
|
@ -654,7 +652,7 @@ static void OPC_DefineType (OPT_Struct str)
|
|||
{
|
||||
OPT_Object obj = NIL, field = NIL, par = NIL;
|
||||
BOOLEAN empty;
|
||||
if ((OPM_currFile == 1 || str->ref < 255) || (((OPM_currFile == 0 && str->strobj != NIL)) && str->strobj->vis == 1)) {
|
||||
if (OPM_currFile == 1 || str->ref < 255) {
|
||||
obj = str->strobj;
|
||||
if (obj == NIL || OPC_Undefined(obj)) {
|
||||
if (obj != NIL) {
|
||||
|
|
@ -721,13 +719,6 @@ static void OPC_DefineType (OPT_Struct str)
|
|||
if (!empty) {
|
||||
OPM_WriteLn();
|
||||
}
|
||||
} else if ((obj->typ->form == 11 && obj->typ->BaseTyp->comp == 4)) {
|
||||
empty = 1;
|
||||
OPC_DeclareTProcs(obj->typ->BaseTyp->link, &empty);
|
||||
OPC_DefineTProcMacros(obj->typ->BaseTyp->link, &empty);
|
||||
if (!empty) {
|
||||
OPM_WriteLn();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -19,8 +19,6 @@ typedef
|
|||
CHAR OPM_FileName[32];
|
||||
|
||||
|
||||
static CHAR OPM_currentComment[256];
|
||||
static BOOLEAN OPM_hasComment;
|
||||
static CHAR OPM_SourceFileName[256];
|
||||
static CHAR OPM_GlobalModel[10];
|
||||
export CHAR OPM_Model[10];
|
||||
|
|
@ -61,7 +59,6 @@ static void OPM_FindInstallDir (void);
|
|||
static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos);
|
||||
static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len);
|
||||
export void OPM_Get (CHAR *ch);
|
||||
export void OPM_GetComment (CHAR *text, ADDRESS text__len);
|
||||
export void OPM_Init (BOOLEAN *done);
|
||||
export void OPM_InitOptions (void);
|
||||
export INT16 OPM_Integer (INT64 n);
|
||||
|
|
@ -85,7 +82,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len);
|
|||
static void OPM_ShowLine (INT64 pos);
|
||||
export INT64 OPM_SignedMaximum (INT32 bytecount);
|
||||
export INT64 OPM_SignedMinimum (INT32 bytecount);
|
||||
export void OPM_StoreComment (CHAR *text, ADDRESS text__len);
|
||||
export void OPM_SymRCh (CHAR *ch);
|
||||
export INT32 OPM_SymRInt (void);
|
||||
export INT64 OPM_SymRInt64 (void);
|
||||
|
|
@ -161,36 +157,6 @@ void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len)
|
|||
__DEL(modname);
|
||||
}
|
||||
|
||||
void OPM_StoreComment (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
__DUP(text, text__len, CHAR);
|
||||
i = 0;
|
||||
while ((i < 255 && text[__X(i, text__len)] != 0x00)) {
|
||||
OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)];
|
||||
i += 1;
|
||||
}
|
||||
OPM_currentComment[__X(i, 256)] = 0x00;
|
||||
OPM_hasComment = 1;
|
||||
__DEL(text);
|
||||
}
|
||||
|
||||
void OPM_GetComment (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
if (OPM_hasComment) {
|
||||
i = 0;
|
||||
while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) {
|
||||
text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)];
|
||||
i += 1;
|
||||
}
|
||||
text[__X(i, text__len)] = 0x00;
|
||||
OPM_hasComment = 0;
|
||||
} else {
|
||||
text[0] = 0x00;
|
||||
}
|
||||
}
|
||||
|
||||
INT64 OPM_SignedMaximum (INT32 bytecount)
|
||||
{
|
||||
INT64 result;
|
||||
|
|
@ -797,7 +763,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done)
|
|||
Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0);
|
||||
Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag);
|
||||
Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver);
|
||||
if (tag != 0xf7 || ver != 0x84) {
|
||||
if (tag != 0xf7 || ver != 0x83) {
|
||||
if (!__IN(4, OPM_Options, 32)) {
|
||||
OPM_err(-306);
|
||||
}
|
||||
|
|
@ -868,7 +834,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len)
|
|||
if (OPM_newSFile != NIL) {
|
||||
Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0x84);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0x83);
|
||||
} else {
|
||||
OPM_err(153);
|
||||
}
|
||||
|
|
@ -1177,7 +1143,5 @@ export void *OPM__init(void)
|
|||
OPM_MinReal = -OPM_MaxReal;
|
||||
OPM_MinLReal = -OPM_MaxLReal;
|
||||
OPM_FindInstallDir();
|
||||
OPM_hasComment = 0;
|
||||
OPM_currentComment[0] = 0x00;
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
@ -30,7 +30,6 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val);
|
|||
import void OPM_FPrintReal (INT32 *fp, REAL val);
|
||||
import void OPM_FPrintSet (INT32 *fp, UINT64 val);
|
||||
import void OPM_Get (CHAR *ch);
|
||||
import void OPM_GetComment (CHAR *text, ADDRESS text__len);
|
||||
import void OPM_Init (BOOLEAN *done);
|
||||
import void OPM_InitOptions (void);
|
||||
import INT16 OPM_Integer (INT64 n);
|
||||
|
|
@ -49,7 +48,6 @@ import BOOLEAN OPM_OpenPar (void);
|
|||
import void OPM_RegisterNewSym (void);
|
||||
import INT64 OPM_SignedMaximum (INT32 bytecount);
|
||||
import INT64 OPM_SignedMinimum (INT32 bytecount);
|
||||
import void OPM_StoreComment (CHAR *text, ADDRESS text__len);
|
||||
import void OPM_SymRCh (CHAR *ch);
|
||||
import INT32 OPM_SymRInt (void);
|
||||
import INT64 OPM_SymRInt64 (void);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -279,74 +279,32 @@ static void Comment__2 (void);
|
|||
|
||||
static void Comment__2 (void)
|
||||
{
|
||||
BOOLEAN isExported;
|
||||
CHAR commentText[256];
|
||||
INT16 i, nestLevel;
|
||||
CHAR prevCh, nextCh;
|
||||
i = 0;
|
||||
while (i <= 255) {
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
i += 1;
|
||||
}
|
||||
isExported = 0;
|
||||
i = 0;
|
||||
nestLevel = 1;
|
||||
prevCh = 0x00;
|
||||
OPM_Get(&OPS_ch);
|
||||
if (OPS_ch == '*') {
|
||||
isExported = 1;
|
||||
OPM_Get(&OPS_ch);
|
||||
if (OPS_ch == ')') {
|
||||
commentText[0] = 0x00;
|
||||
OPM_StoreComment(commentText, 256);
|
||||
OPM_Get(&OPS_ch);
|
||||
return;
|
||||
}
|
||||
}
|
||||
while ((nestLevel > 0 && OPS_ch != 0x00)) {
|
||||
if ((prevCh == '(' && OPS_ch == '*')) {
|
||||
nestLevel += 1;
|
||||
prevCh = 0x00;
|
||||
} else if ((prevCh == '*' && OPS_ch == ')')) {
|
||||
nestLevel -= 1;
|
||||
if (nestLevel == 0) {
|
||||
for (;;) {
|
||||
for (;;) {
|
||||
while (OPS_ch == '(') {
|
||||
OPM_Get(&OPS_ch);
|
||||
} else {
|
||||
prevCh = 0x00;
|
||||
}
|
||||
} else {
|
||||
if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) {
|
||||
if (i < 255) {
|
||||
commentText[__X(i, 256)] = prevCh;
|
||||
i += 1;
|
||||
if (OPS_ch == '*') {
|
||||
Comment__2();
|
||||
}
|
||||
}
|
||||
prevCh = OPS_ch;
|
||||
}
|
||||
if (nestLevel > 0) {
|
||||
if (OPS_ch == '*') {
|
||||
OPM_Get(&OPS_ch);
|
||||
break;
|
||||
}
|
||||
if (OPS_ch == 0x00) {
|
||||
break;
|
||||
}
|
||||
OPM_Get(&OPS_ch);
|
||||
}
|
||||
}
|
||||
if (OPS_ch == 0x00) {
|
||||
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 (OPS_ch == ')') {
|
||||
OPM_Get(&OPS_ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isExported) {
|
||||
if (i >= 256) {
|
||||
OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30);
|
||||
OPM_LogWLn();
|
||||
i = 255;
|
||||
if (OPS_ch == 0x00) {
|
||||
OPS_err(5);
|
||||
break;
|
||||
}
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
OPM_StoreComment(commentText, 256);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -83,7 +83,6 @@ typedef
|
|||
OPT_Const conval;
|
||||
INT32 adr, linkadr;
|
||||
INT16 x;
|
||||
OPT_ConstExt comment;
|
||||
} OPT_ObjDesc;
|
||||
|
||||
typedef
|
||||
|
|
@ -174,7 +173,6 @@ static void OPT_OutObj (OPT_Object obj);
|
|||
static void OPT_OutSign (OPT_Struct result, OPT_Object par);
|
||||
static void OPT_OutStr (OPT_Struct typ);
|
||||
static void OPT_OutTProcs (OPT_Struct typ, OPT_Object obj);
|
||||
static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len);
|
||||
export OPT_Struct OPT_SetType (INT32 size);
|
||||
export OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INT16 dir);
|
||||
export INT32 OPT_SizeAlignment (INT32 size);
|
||||
|
|
@ -390,10 +388,6 @@ OPT_Object OPT_NewObj (void)
|
|||
{
|
||||
OPT_Object obj = NIL;
|
||||
__NEW(obj, OPT_ObjDesc);
|
||||
obj->typ = NIL;
|
||||
obj->conval = NIL;
|
||||
obj->comment = NIL;
|
||||
obj->name[0] = 0x00;
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
@ -560,8 +554,6 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
|
|||
OPT_Object ob0 = NIL, ob1 = NIL;
|
||||
BOOLEAN left;
|
||||
INT8 mnolev;
|
||||
CHAR commentText[256];
|
||||
INT16 j;
|
||||
ob0 = OPT_topScope;
|
||||
ob1 = ob0->right;
|
||||
left = 0;
|
||||
|
|
@ -593,16 +585,6 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
|
|||
__COPY(name, ob1->name, 256);
|
||||
mnolev = OPT_topScope->mnolev;
|
||||
ob1->mnolev = mnolev;
|
||||
OPM_GetComment((void*)commentText, 256);
|
||||
if (commentText[0] != 0x00) {
|
||||
ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256);
|
||||
j = 0;
|
||||
while ((j < 255 && commentText[__X(j, 256)] != 0x00)) {
|
||||
(*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)];
|
||||
j += 1;
|
||||
}
|
||||
(*ob1->comment)[__X(j, 256)] = 0x00;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1121,13 +1103,6 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par)
|
|||
tag = OPM_SymRInt();
|
||||
last = NIL;
|
||||
while (tag != 18) {
|
||||
if (tag < 0 || tag > 100) {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Invalid tag value in InSign: ", 37);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return;
|
||||
}
|
||||
new = OPT_NewObj();
|
||||
new->mnolev = -mno;
|
||||
if (last == NIL) {
|
||||
|
|
@ -1406,37 +1381,7 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
OPT_Struct typ = NIL;
|
||||
INT32 tag;
|
||||
OPT_ConstExt ext = NIL;
|
||||
OPS_Name commentText;
|
||||
BOOLEAN hasComment;
|
||||
INT16 j;
|
||||
INT32 len;
|
||||
tag = OPT_impCtxt.nextTag;
|
||||
hasComment = 0;
|
||||
while (tag == 41) {
|
||||
len = OPM_SymRInt();
|
||||
if (len < 0) {
|
||||
len = 0;
|
||||
}
|
||||
if (len > 255) {
|
||||
len = 255;
|
||||
}
|
||||
i = 0;
|
||||
while (i < len) {
|
||||
OPM_SymRCh(&commentText[__X(i, 256)]);
|
||||
i += 1;
|
||||
}
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
hasComment = 1;
|
||||
tag = OPM_SymRInt();
|
||||
}
|
||||
OPT_impCtxt.nextTag = tag;
|
||||
if (tag < 0 || tag > 50) {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
}
|
||||
if (tag == 19) {
|
||||
OPT_InStruct(&typ);
|
||||
obj = typ->strobj;
|
||||
|
|
@ -1452,7 +1397,7 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
obj->conval = OPT_NewConst();
|
||||
OPT_InConstant(tag, obj->conval);
|
||||
obj->typ = OPT_InTyp(tag);
|
||||
} else if ((tag >= 31 && tag <= 33)) {
|
||||
} else if (tag >= 31) {
|
||||
obj->conval = OPT_NewConst();
|
||||
obj->conval->intval = -1;
|
||||
OPT_InSign(mno, &obj->typ, &obj->link);
|
||||
|
|
@ -1479,37 +1424,20 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
OPM_LogWStr((CHAR*)"unhandled case at InObj, tag = ", 32);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
break;
|
||||
}
|
||||
} else if (tag == 20) {
|
||||
obj->mode = 5;
|
||||
OPT_InStruct(&obj->typ);
|
||||
} else if (tag == 21 || tag == 22) {
|
||||
} else {
|
||||
obj->mode = 1;
|
||||
if (tag == 22) {
|
||||
obj->vis = 2;
|
||||
}
|
||||
OPT_InStruct(&obj->typ);
|
||||
} else {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Unexpected tag in InObj: ", 33);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
}
|
||||
OPT_InName((void*)obj->name, 256);
|
||||
}
|
||||
if ((hasComment && obj != NIL)) {
|
||||
obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256);
|
||||
j = 0;
|
||||
while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) {
|
||||
(*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)];
|
||||
j += 1;
|
||||
}
|
||||
(*obj->comment)[__X(j, 256)] = 0x00;
|
||||
}
|
||||
OPT_FPrintObj(obj);
|
||||
if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) {
|
||||
OPM_FPrint(&OPT_impCtxt.reffp, obj->typ->ref - 255);
|
||||
|
|
@ -1852,40 +1780,13 @@ static void OPT_OutConstant (OPT_Object obj)
|
|||
}
|
||||
}
|
||||
|
||||
static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
__DUP(text, text__len, CHAR);
|
||||
i = 0;
|
||||
while ((i < 255 && text[__X(i, text__len)] != 0x00)) {
|
||||
OPM_SymWCh(text[__X(i, text__len)]);
|
||||
i += 1;
|
||||
}
|
||||
OPM_SymWCh(0x00);
|
||||
__DEL(text);
|
||||
}
|
||||
|
||||
static void OPT_OutObj (OPT_Object obj)
|
||||
{
|
||||
INT16 i, j;
|
||||
OPT_ConstExt ext = NIL;
|
||||
INT16 k, l;
|
||||
if (obj != NIL) {
|
||||
OPT_OutObj(obj->left);
|
||||
if (__IN(obj->mode, 0x06ea, 32)) {
|
||||
if (obj->comment != NIL) {
|
||||
OPM_SymWInt(41);
|
||||
k = 0;
|
||||
while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) {
|
||||
k += 1;
|
||||
}
|
||||
OPM_SymWInt(k);
|
||||
l = 0;
|
||||
while (l < k) {
|
||||
OPM_SymWCh((*obj->comment)[__X(l, 256)]);
|
||||
l += 1;
|
||||
}
|
||||
}
|
||||
if (obj->history == 4) {
|
||||
OPT_FPrintErr(obj, 250);
|
||||
} else if (obj->vis != 0) {
|
||||
|
|
@ -2125,7 +2026,7 @@ static void EnumPtrs(void (*P)(void*))
|
|||
}
|
||||
|
||||
__TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -8}};
|
||||
__TDESC(OPT_ObjDesc, 1, 7) = {__TDFLDS("ObjDesc", 308), {0, 4, 8, 12, 284, 288, 304, -32}};
|
||||
__TDESC(OPT_ObjDesc, 1, 6) = {__TDFLDS("ObjDesc", 304), {0, 4, 8, 12, 284, 288, -28}};
|
||||
__TDESC(OPT_StrDesc, 1, 3) = {__TDFLDS("StrDesc", 56), {44, 48, 52, -16}};
|
||||
__TDESC(OPT_NodeDesc, 1, 6) = {__TDFLDS("NodeDesc", 28), {0, 4, 8, 16, 20, 24, -28}};
|
||||
__TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 3140), {16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
@ -61,7 +61,6 @@ typedef
|
|||
OPT_Const conval;
|
||||
INT32 adr, linkadr;
|
||||
INT16 x;
|
||||
OPT_ConstExt comment;
|
||||
} OPT_ObjDesc;
|
||||
|
||||
typedef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Out__h
|
||||
#define Out__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Platform__h
|
||||
#define Platform__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Reals__h
|
||||
#define Reals__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Strings__h
|
||||
#define Strings__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
#include "SYSTEM.h"
|
||||
#include "Files.h"
|
||||
#include "Modules.h"
|
||||
#include "Out.h"
|
||||
#include "Reals.h"
|
||||
|
||||
typedef
|
||||
|
|
@ -1809,6 +1810,7 @@ export void *Texts__init(void)
|
|||
__DEFMOD;
|
||||
__MODULE_IMPORT(Files);
|
||||
__MODULE_IMPORT(Modules);
|
||||
__MODULE_IMPORT(Out);
|
||||
__MODULE_IMPORT(Reals);
|
||||
__REGMOD("Texts", EnumPtrs);
|
||||
__INITYP(Texts_FontDesc, Texts_FontDesc, 0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Texts__h
|
||||
#define Texts__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -34,7 +34,6 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len);
|
|||
export void VT100_HVP (INT16 n, INT16 m);
|
||||
export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len);
|
||||
export void VT100_RCP (void);
|
||||
export void VT100_Reset (void);
|
||||
static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end);
|
||||
export void VT100_SCP (void);
|
||||
export void VT100_SD (INT16 n);
|
||||
|
|
@ -137,15 +136,6 @@ static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len)
|
|||
__DEL(letter);
|
||||
}
|
||||
|
||||
void VT100_Reset (void)
|
||||
{
|
||||
CHAR cmd[6];
|
||||
__COPY("\033", cmd, 6);
|
||||
Strings_Append((CHAR*)"c", 2, (void*)cmd, 6);
|
||||
Out_String(cmd, 6);
|
||||
Out_Ln();
|
||||
}
|
||||
|
||||
void VT100_CUU (INT16 n)
|
||||
{
|
||||
VT100_EscSeq(n, (CHAR*)"A", 2);
|
||||
|
|
@ -266,7 +256,6 @@ export void *VT100__init(void)
|
|||
__REGCMD("DECTCEMh", VT100_DECTCEMh);
|
||||
__REGCMD("DECTCEMl", VT100_DECTCEMl);
|
||||
__REGCMD("RCP", VT100_RCP);
|
||||
__REGCMD("Reset", VT100_Reset);
|
||||
__REGCMD("SCP", VT100_SCP);
|
||||
/* BEGIN */
|
||||
__COPY("\033", VT100_CSI, 5);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef VT100__h
|
||||
#define VT100__h
|
||||
|
|
@ -25,7 +25,6 @@ import void VT100_EL (INT16 n);
|
|||
import void VT100_HVP (INT16 n, INT16 m);
|
||||
import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len);
|
||||
import void VT100_RCP (void);
|
||||
import void VT100_Reset (void);
|
||||
import void VT100_SCP (void);
|
||||
import void VT100_SD (INT16 n);
|
||||
import void VT100_SGR (INT16 n);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -22,7 +22,7 @@ static extTools_CommandString extTools_CFLAGS;
|
|||
|
||||
|
||||
export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len);
|
||||
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len);
|
||||
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len);
|
||||
export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len);
|
||||
static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len);
|
||||
|
||||
|
|
@ -70,26 +70,22 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES
|
|||
__DEL(cmd);
|
||||
}
|
||||
|
||||
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len)
|
||||
static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len)
|
||||
{
|
||||
__DUP(additionalopts, additionalopts__len, CHAR);
|
||||
__COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len);
|
||||
__COPY("gcc -fPIC -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);
|
||||
Strings_Append(additionalopts, additionalopts__len, (void*)s, s__len);
|
||||
Strings_Append((CHAR*)" ", 2, (void*)s, s__len);
|
||||
Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096);
|
||||
Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len);
|
||||
Strings_Append((CHAR*)" ", 2, (void*)s, s__len);
|
||||
__DEL(additionalopts);
|
||||
}
|
||||
|
||||
void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len)
|
||||
{
|
||||
extTools_CommandString cmd;
|
||||
__DUP(moduleName, moduleName__len, CHAR);
|
||||
extTools_InitialiseCompilerCommand((void*)cmd, 4096, (CHAR*)"", 1);
|
||||
extTools_InitialiseCompilerCommand((void*)cmd, 4096);
|
||||
Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096);
|
||||
Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096);
|
||||
Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096);
|
||||
|
|
@ -101,9 +97,10 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati
|
|||
{
|
||||
extTools_CommandString cmd;
|
||||
__DUP(additionalopts, additionalopts__len, CHAR);
|
||||
extTools_InitialiseCompilerCommand((void*)cmd, 4096, additionalopts, additionalopts__len);
|
||||
extTools_InitialiseCompilerCommand((void*)cmd, 4096);
|
||||
Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096);
|
||||
Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096);
|
||||
Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096);
|
||||
if (statically) {
|
||||
Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef extTools__h
|
||||
#define extTools__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. 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 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
|
||||
__MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -86,7 +86,6 @@ export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ);
|
|||
export void Files_Purge (Files_File f);
|
||||
export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x);
|
||||
export void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n);
|
||||
export void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x);
|
||||
export void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x);
|
||||
|
|
@ -635,11 +634,6 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
|
|||
}
|
||||
}
|
||||
|
||||
void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
|
||||
{
|
||||
Files_Read(&*r, r__typ, &*x);
|
||||
}
|
||||
|
||||
void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n)
|
||||
{
|
||||
INT32 xpos, min, restInBuf, offset;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
@ -41,7 +41,6 @@ import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ);
|
|||
import void Files_Purge (Files_File f);
|
||||
import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x);
|
||||
import void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x);
|
||||
import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n);
|
||||
import void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x);
|
||||
import void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -1626,7 +1626,6 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode)
|
|||
if (x == y) {
|
||||
} else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) {
|
||||
} else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) {
|
||||
OPB_err(113);
|
||||
} else if (x->BaseTyp == OPT_chartyp) {
|
||||
if (g == 8) {
|
||||
if (ynode->conval->intval2 > x->n) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -618,33 +618,31 @@ static void OPC_DefineTProcMacros (OPT_Object obj, BOOLEAN *empty)
|
|||
{
|
||||
if (obj != NIL) {
|
||||
OPC_DefineTProcMacros(obj->left, &*empty);
|
||||
if ((obj->mode == 13 && obj == OPC_BaseTProc(obj))) {
|
||||
if (OPM_currFile == 1 || (OPM_currFile == 0 && obj->vis == 1)) {
|
||||
OPM_WriteString((CHAR*)"#define __", 11);
|
||||
OPC_Ident(obj);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_WriteString((CHAR*)" __SEND(", 9);
|
||||
if (obj->link->typ->form == 11) {
|
||||
OPM_WriteString((CHAR*)"__TYPEOF(", 10);
|
||||
OPC_Ident(obj->link);
|
||||
OPM_Write(')');
|
||||
} else {
|
||||
OPC_Ident(obj->link);
|
||||
OPM_WriteString((CHAR*)"__typ", 6);
|
||||
}
|
||||
OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16));
|
||||
if (obj->typ == OPT_notyp) {
|
||||
OPM_WriteString((CHAR*)"void", 5);
|
||||
} else {
|
||||
OPC_Ident(obj->typ->strobj);
|
||||
}
|
||||
OPM_WriteString((CHAR*)"(*)", 4);
|
||||
OPC_AnsiParamList(obj->link, 0);
|
||||
OPM_WriteString((CHAR*)", ", 3);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
if ((((obj->mode == 13 && obj == OPC_BaseTProc(obj))) && (OPM_currFile != 0 || obj->vis == 1))) {
|
||||
OPM_WriteString((CHAR*)"#define __", 11);
|
||||
OPC_Ident(obj);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_WriteString((CHAR*)" __SEND(", 9);
|
||||
if (obj->link->typ->form == 11) {
|
||||
OPM_WriteString((CHAR*)"__TYPEOF(", 10);
|
||||
OPC_Ident(obj->link);
|
||||
OPM_Write(')');
|
||||
OPM_WriteLn();
|
||||
} else {
|
||||
OPC_Ident(obj->link);
|
||||
OPM_WriteString((CHAR*)"__typ", 6);
|
||||
}
|
||||
OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16));
|
||||
if (obj->typ == OPT_notyp) {
|
||||
OPM_WriteString((CHAR*)"void", 5);
|
||||
} else {
|
||||
OPC_Ident(obj->typ->strobj);
|
||||
}
|
||||
OPM_WriteString((CHAR*)"(*)", 4);
|
||||
OPC_AnsiParamList(obj->link, 0);
|
||||
OPM_WriteString((CHAR*)", ", 3);
|
||||
OPC_DeclareParams(obj->link, 1);
|
||||
OPM_Write(')');
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPC_DefineTProcMacros(obj->right, &*empty);
|
||||
}
|
||||
|
|
@ -654,7 +652,7 @@ static void OPC_DefineType (OPT_Struct str)
|
|||
{
|
||||
OPT_Object obj = NIL, field = NIL, par = NIL;
|
||||
BOOLEAN empty;
|
||||
if ((OPM_currFile == 1 || str->ref < 255) || (((OPM_currFile == 0 && str->strobj != NIL)) && str->strobj->vis == 1)) {
|
||||
if (OPM_currFile == 1 || str->ref < 255) {
|
||||
obj = str->strobj;
|
||||
if (obj == NIL || OPC_Undefined(obj)) {
|
||||
if (obj != NIL) {
|
||||
|
|
@ -721,13 +719,6 @@ static void OPC_DefineType (OPT_Struct str)
|
|||
if (!empty) {
|
||||
OPM_WriteLn();
|
||||
}
|
||||
} else if ((obj->typ->form == 11 && obj->typ->BaseTyp->comp == 4)) {
|
||||
empty = 1;
|
||||
OPC_DeclareTProcs(obj->typ->BaseTyp->link, &empty);
|
||||
OPC_DefineTProcMacros(obj->typ->BaseTyp->link, &empty);
|
||||
if (!empty) {
|
||||
OPM_WriteLn();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -19,8 +19,6 @@ typedef
|
|||
CHAR OPM_FileName[32];
|
||||
|
||||
|
||||
static CHAR OPM_currentComment[256];
|
||||
static BOOLEAN OPM_hasComment;
|
||||
static CHAR OPM_SourceFileName[256];
|
||||
static CHAR OPM_GlobalModel[10];
|
||||
export CHAR OPM_Model[10];
|
||||
|
|
@ -61,7 +59,6 @@ static void OPM_FindInstallDir (void);
|
|||
static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos);
|
||||
static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len);
|
||||
export void OPM_Get (CHAR *ch);
|
||||
export void OPM_GetComment (CHAR *text, ADDRESS text__len);
|
||||
export void OPM_Init (BOOLEAN *done);
|
||||
export void OPM_InitOptions (void);
|
||||
export INT16 OPM_Integer (INT64 n);
|
||||
|
|
@ -85,7 +82,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len);
|
|||
static void OPM_ShowLine (INT64 pos);
|
||||
export INT64 OPM_SignedMaximum (INT32 bytecount);
|
||||
export INT64 OPM_SignedMinimum (INT32 bytecount);
|
||||
export void OPM_StoreComment (CHAR *text, ADDRESS text__len);
|
||||
export void OPM_SymRCh (CHAR *ch);
|
||||
export INT32 OPM_SymRInt (void);
|
||||
export INT64 OPM_SymRInt64 (void);
|
||||
|
|
@ -161,36 +157,6 @@ void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len)
|
|||
__DEL(modname);
|
||||
}
|
||||
|
||||
void OPM_StoreComment (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
__DUP(text, text__len, CHAR);
|
||||
i = 0;
|
||||
while ((i < 255 && text[__X(i, text__len)] != 0x00)) {
|
||||
OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)];
|
||||
i += 1;
|
||||
}
|
||||
OPM_currentComment[__X(i, 256)] = 0x00;
|
||||
OPM_hasComment = 1;
|
||||
__DEL(text);
|
||||
}
|
||||
|
||||
void OPM_GetComment (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
if (OPM_hasComment) {
|
||||
i = 0;
|
||||
while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) {
|
||||
text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)];
|
||||
i += 1;
|
||||
}
|
||||
text[__X(i, text__len)] = 0x00;
|
||||
OPM_hasComment = 0;
|
||||
} else {
|
||||
text[0] = 0x00;
|
||||
}
|
||||
}
|
||||
|
||||
INT64 OPM_SignedMaximum (INT32 bytecount)
|
||||
{
|
||||
INT64 result;
|
||||
|
|
@ -797,7 +763,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done)
|
|||
Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0);
|
||||
Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag);
|
||||
Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver);
|
||||
if (tag != 0xf7 || ver != 0x84) {
|
||||
if (tag != 0xf7 || ver != 0x83) {
|
||||
if (!__IN(4, OPM_Options, 32)) {
|
||||
OPM_err(-306);
|
||||
}
|
||||
|
|
@ -868,7 +834,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len)
|
|||
if (OPM_newSFile != NIL) {
|
||||
Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0x84);
|
||||
Files_Write(&OPM_newSF, Files_Rider__typ, 0x83);
|
||||
} else {
|
||||
OPM_err(153);
|
||||
}
|
||||
|
|
@ -1177,7 +1143,5 @@ export void *OPM__init(void)
|
|||
OPM_MinReal = -OPM_MaxReal;
|
||||
OPM_MinLReal = -OPM_MaxLReal;
|
||||
OPM_FindInstallDir();
|
||||
OPM_hasComment = 0;
|
||||
OPM_currentComment[0] = 0x00;
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
@ -30,7 +30,6 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val);
|
|||
import void OPM_FPrintReal (INT32 *fp, REAL val);
|
||||
import void OPM_FPrintSet (INT32 *fp, UINT64 val);
|
||||
import void OPM_Get (CHAR *ch);
|
||||
import void OPM_GetComment (CHAR *text, ADDRESS text__len);
|
||||
import void OPM_Init (BOOLEAN *done);
|
||||
import void OPM_InitOptions (void);
|
||||
import INT16 OPM_Integer (INT64 n);
|
||||
|
|
@ -49,7 +48,6 @@ import BOOLEAN OPM_OpenPar (void);
|
|||
import void OPM_RegisterNewSym (void);
|
||||
import INT64 OPM_SignedMaximum (INT32 bytecount);
|
||||
import INT64 OPM_SignedMinimum (INT32 bytecount);
|
||||
import void OPM_StoreComment (CHAR *text, ADDRESS text__len);
|
||||
import void OPM_SymRCh (CHAR *ch);
|
||||
import INT32 OPM_SymRInt (void);
|
||||
import INT64 OPM_SymRInt64 (void);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -279,74 +279,32 @@ static void Comment__2 (void);
|
|||
|
||||
static void Comment__2 (void)
|
||||
{
|
||||
BOOLEAN isExported;
|
||||
CHAR commentText[256];
|
||||
INT16 i, nestLevel;
|
||||
CHAR prevCh, nextCh;
|
||||
i = 0;
|
||||
while (i <= 255) {
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
i += 1;
|
||||
}
|
||||
isExported = 0;
|
||||
i = 0;
|
||||
nestLevel = 1;
|
||||
prevCh = 0x00;
|
||||
OPM_Get(&OPS_ch);
|
||||
if (OPS_ch == '*') {
|
||||
isExported = 1;
|
||||
OPM_Get(&OPS_ch);
|
||||
if (OPS_ch == ')') {
|
||||
commentText[0] = 0x00;
|
||||
OPM_StoreComment(commentText, 256);
|
||||
OPM_Get(&OPS_ch);
|
||||
return;
|
||||
}
|
||||
}
|
||||
while ((nestLevel > 0 && OPS_ch != 0x00)) {
|
||||
if ((prevCh == '(' && OPS_ch == '*')) {
|
||||
nestLevel += 1;
|
||||
prevCh = 0x00;
|
||||
} else if ((prevCh == '*' && OPS_ch == ')')) {
|
||||
nestLevel -= 1;
|
||||
if (nestLevel == 0) {
|
||||
for (;;) {
|
||||
for (;;) {
|
||||
while (OPS_ch == '(') {
|
||||
OPM_Get(&OPS_ch);
|
||||
} else {
|
||||
prevCh = 0x00;
|
||||
}
|
||||
} else {
|
||||
if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) {
|
||||
if (i < 255) {
|
||||
commentText[__X(i, 256)] = prevCh;
|
||||
i += 1;
|
||||
if (OPS_ch == '*') {
|
||||
Comment__2();
|
||||
}
|
||||
}
|
||||
prevCh = OPS_ch;
|
||||
}
|
||||
if (nestLevel > 0) {
|
||||
if (OPS_ch == '*') {
|
||||
OPM_Get(&OPS_ch);
|
||||
break;
|
||||
}
|
||||
if (OPS_ch == 0x00) {
|
||||
break;
|
||||
}
|
||||
OPM_Get(&OPS_ch);
|
||||
}
|
||||
}
|
||||
if (OPS_ch == 0x00) {
|
||||
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 (OPS_ch == ')') {
|
||||
OPM_Get(&OPS_ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isExported) {
|
||||
if (i >= 256) {
|
||||
OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30);
|
||||
OPM_LogWLn();
|
||||
i = 255;
|
||||
if (OPS_ch == 0x00) {
|
||||
OPS_err(5);
|
||||
break;
|
||||
}
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
OPM_StoreComment(commentText, 256);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#define SHORTINT INT8
|
||||
#define INTEGER INT16
|
||||
|
|
@ -83,7 +83,6 @@ typedef
|
|||
OPT_Const conval;
|
||||
INT32 adr, linkadr;
|
||||
INT16 x;
|
||||
OPT_ConstExt comment;
|
||||
} OPT_ObjDesc;
|
||||
|
||||
typedef
|
||||
|
|
@ -174,7 +173,6 @@ static void OPT_OutObj (OPT_Object obj);
|
|||
static void OPT_OutSign (OPT_Struct result, OPT_Object par);
|
||||
static void OPT_OutStr (OPT_Struct typ);
|
||||
static void OPT_OutTProcs (OPT_Struct typ, OPT_Object obj);
|
||||
static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len);
|
||||
export OPT_Struct OPT_SetType (INT32 size);
|
||||
export OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INT16 dir);
|
||||
export INT32 OPT_SizeAlignment (INT32 size);
|
||||
|
|
@ -390,10 +388,6 @@ OPT_Object OPT_NewObj (void)
|
|||
{
|
||||
OPT_Object obj = NIL;
|
||||
__NEW(obj, OPT_ObjDesc);
|
||||
obj->typ = NIL;
|
||||
obj->conval = NIL;
|
||||
obj->comment = NIL;
|
||||
obj->name[0] = 0x00;
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
@ -560,8 +554,6 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
|
|||
OPT_Object ob0 = NIL, ob1 = NIL;
|
||||
BOOLEAN left;
|
||||
INT8 mnolev;
|
||||
CHAR commentText[256];
|
||||
INT16 j;
|
||||
ob0 = OPT_topScope;
|
||||
ob1 = ob0->right;
|
||||
left = 0;
|
||||
|
|
@ -593,16 +585,6 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj)
|
|||
__COPY(name, ob1->name, 256);
|
||||
mnolev = OPT_topScope->mnolev;
|
||||
ob1->mnolev = mnolev;
|
||||
OPM_GetComment((void*)commentText, 256);
|
||||
if (commentText[0] != 0x00) {
|
||||
ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256)));
|
||||
j = 0;
|
||||
while ((j < 255 && commentText[__X(j, 256)] != 0x00)) {
|
||||
(*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)];
|
||||
j += 1;
|
||||
}
|
||||
(*ob1->comment)[__X(j, 256)] = 0x00;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1121,13 +1103,6 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par)
|
|||
tag = OPM_SymRInt();
|
||||
last = NIL;
|
||||
while (tag != 18) {
|
||||
if (tag < 0 || tag > 100) {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Invalid tag value in InSign: ", 37);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return;
|
||||
}
|
||||
new = OPT_NewObj();
|
||||
new->mnolev = -mno;
|
||||
if (last == NIL) {
|
||||
|
|
@ -1406,37 +1381,7 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
OPT_Struct typ = NIL;
|
||||
INT32 tag;
|
||||
OPT_ConstExt ext = NIL;
|
||||
OPS_Name commentText;
|
||||
BOOLEAN hasComment;
|
||||
INT16 j;
|
||||
INT32 len;
|
||||
tag = OPT_impCtxt.nextTag;
|
||||
hasComment = 0;
|
||||
while (tag == 41) {
|
||||
len = OPM_SymRInt();
|
||||
if (len < 0) {
|
||||
len = 0;
|
||||
}
|
||||
if (len > 255) {
|
||||
len = 255;
|
||||
}
|
||||
i = 0;
|
||||
while (i < len) {
|
||||
OPM_SymRCh(&commentText[__X(i, 256)]);
|
||||
i += 1;
|
||||
}
|
||||
commentText[__X(i, 256)] = 0x00;
|
||||
hasComment = 1;
|
||||
tag = OPM_SymRInt();
|
||||
}
|
||||
OPT_impCtxt.nextTag = tag;
|
||||
if (tag < 0 || tag > 50) {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
}
|
||||
if (tag == 19) {
|
||||
OPT_InStruct(&typ);
|
||||
obj = typ->strobj;
|
||||
|
|
@ -1452,7 +1397,7 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
obj->conval = OPT_NewConst();
|
||||
OPT_InConstant(tag, obj->conval);
|
||||
obj->typ = OPT_InTyp(tag);
|
||||
} else if ((tag >= 31 && tag <= 33)) {
|
||||
} else if (tag >= 31) {
|
||||
obj->conval = OPT_NewConst();
|
||||
obj->conval->intval = -1;
|
||||
OPT_InSign(mno, &obj->typ, &obj->link);
|
||||
|
|
@ -1479,37 +1424,20 @@ static OPT_Object OPT_InObj (INT8 mno)
|
|||
OPM_LogWStr((CHAR*)"unhandled case at InObj, tag = ", 32);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
break;
|
||||
}
|
||||
} else if (tag == 20) {
|
||||
obj->mode = 5;
|
||||
OPT_InStruct(&obj->typ);
|
||||
} else if (tag == 21 || tag == 22) {
|
||||
} else {
|
||||
obj->mode = 1;
|
||||
if (tag == 22) {
|
||||
obj->vis = 2;
|
||||
}
|
||||
OPT_InStruct(&obj->typ);
|
||||
} else {
|
||||
OPM_LogWStr((CHAR*)"ERROR: Unexpected tag in InObj: ", 33);
|
||||
OPM_LogWNum(tag, 0);
|
||||
OPM_LogWLn();
|
||||
OPM_err(155);
|
||||
return NIL;
|
||||
}
|
||||
OPT_InName((void*)obj->name, 256);
|
||||
}
|
||||
if ((hasComment && obj != NIL)) {
|
||||
obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256)));
|
||||
j = 0;
|
||||
while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) {
|
||||
(*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)];
|
||||
j += 1;
|
||||
}
|
||||
(*obj->comment)[__X(j, 256)] = 0x00;
|
||||
}
|
||||
OPT_FPrintObj(obj);
|
||||
if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) {
|
||||
OPM_FPrint(&OPT_impCtxt.reffp, obj->typ->ref - 255);
|
||||
|
|
@ -1852,40 +1780,13 @@ static void OPT_OutConstant (OPT_Object obj)
|
|||
}
|
||||
}
|
||||
|
||||
static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len)
|
||||
{
|
||||
INT16 i;
|
||||
__DUP(text, text__len, CHAR);
|
||||
i = 0;
|
||||
while ((i < 255 && text[__X(i, text__len)] != 0x00)) {
|
||||
OPM_SymWCh(text[__X(i, text__len)]);
|
||||
i += 1;
|
||||
}
|
||||
OPM_SymWCh(0x00);
|
||||
__DEL(text);
|
||||
}
|
||||
|
||||
static void OPT_OutObj (OPT_Object obj)
|
||||
{
|
||||
INT16 i, j;
|
||||
OPT_ConstExt ext = NIL;
|
||||
INT16 k, l;
|
||||
if (obj != NIL) {
|
||||
OPT_OutObj(obj->left);
|
||||
if (__IN(obj->mode, 0x06ea, 32)) {
|
||||
if (obj->comment != NIL) {
|
||||
OPM_SymWInt(41);
|
||||
k = 0;
|
||||
while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) {
|
||||
k += 1;
|
||||
}
|
||||
OPM_SymWInt(k);
|
||||
l = 0;
|
||||
while (l < k) {
|
||||
OPM_SymWCh((*obj->comment)[__X(l, 256)]);
|
||||
l += 1;
|
||||
}
|
||||
}
|
||||
if (obj->history == 4) {
|
||||
OPT_FPrintErr(obj, 250);
|
||||
} else if (obj->vis != 0) {
|
||||
|
|
@ -2125,7 +2026,7 @@ static void EnumPtrs(void (*P)(void*))
|
|||
}
|
||||
|
||||
__TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -16}};
|
||||
__TDESC(OPT_ObjDesc, 1, 7) = {__TDFLDS("ObjDesc", 344), {0, 8, 16, 24, 304, 312, 336, -64}};
|
||||
__TDESC(OPT_ObjDesc, 1, 6) = {__TDFLDS("ObjDesc", 336), {0, 8, 16, 24, 304, 312, -56}};
|
||||
__TDESC(OPT_StrDesc, 1, 3) = {__TDFLDS("StrDesc", 72), {48, 56, 64, -32}};
|
||||
__TDESC(OPT_NodeDesc, 1, 6) = {__TDFLDS("NodeDesc", 56), {0, 8, 16, 32, 40, 48, -56}};
|
||||
__TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 5184), {16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
@ -61,7 +61,6 @@ typedef
|
|||
OPT_Const conval;
|
||||
INT32 adr, linkadr;
|
||||
INT16 x;
|
||||
OPT_ConstExt comment;
|
||||
} OPT_ObjDesc;
|
||||
|
||||
typedef
|
||||
|
|
|
|||
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