Rationalise -O2 vs -OC library build.

This commit is contained in:
David Brown 2016-10-15 17:15:05 +01:00
parent b231efb466
commit 80de6dc216
206 changed files with 1129 additions and 1456 deletions

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamSf */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspamSf */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -16,8 +16,8 @@
#include "OPV.h" #include "OPV.h"
#include "Platform.h" #include "Platform.h"
#include "Strings.h" #include "Strings.h"
#include "VT100.h"
#include "extTools.h" #include "extTools.h"
#include "vt100.h"
static CHAR Compiler_mname[256]; static CHAR Compiler_mname[256];
@ -47,20 +47,20 @@ void Compiler_Module (BOOLEAN *done)
if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) {
OPM_DeleteNewSym(); OPM_DeleteNewSym();
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogWStr((CHAR*)" Main program.", 16);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} else { } else {
if (new) { if (new) {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogWStr((CHAR*)" New symbol file.", 19); OPM_LogWStr((CHAR*)" New symbol file.", 19);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
OPM_RegisterNewSym(); OPM_RegisterNewSym();
} else if (ext) { } else if (ext) {
@ -175,8 +175,8 @@ export int main(int argc, char **argv)
__MODULE_IMPORT(OPV); __MODULE_IMPORT(OPV);
__MODULE_IMPORT(Platform); __MODULE_IMPORT(Platform);
__MODULE_IMPORT(Strings); __MODULE_IMPORT(Strings);
__MODULE_IMPORT(VT100);
__MODULE_IMPORT(extTools); __MODULE_IMPORT(extTools);
__MODULE_IMPORT(vt100);
__REGMAIN("Compiler", 0); __REGMAIN("Compiler", 0);
__REGCMD("Translate", Compiler_Translate); __REGCMD("Translate", Compiler_Translate);
/* BEGIN */ /* BEGIN */

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __MOVE("1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -12,8 +12,8 @@
#include "Platform.h" #include "Platform.h"
#include "Strings.h" #include "Strings.h"
#include "Texts.h" #include "Texts.h"
#include "VT100.h"
#include "errors.h" #include "errors.h"
#include "vt100.h"
typedef typedef
CHAR OPM_FileName[32]; CHAR OPM_FileName[32];
@ -325,7 +325,7 @@ BOOLEAN OPM_OpenPar (void)
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" Miscellaneous", 16); OPM_LogWStr((CHAR*)" Miscellaneous", 16);
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" -f Disable vt100 control characters in status output.", 60); OPM_LogWStr((CHAR*)" -f Disable VT100 control characters in status output.", 60);
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" -V Display compiler debugging messages.", 46); OPM_LogWStr((CHAR*)" -V Display compiler debugging messages.", 46);
OPM_LogWLn(); OPM_LogWLn();
@ -555,20 +555,20 @@ static void OPM_LogErrMsg (int16 n)
CHAR buf[1024]; CHAR buf[1024];
if (n >= 0) { if (n >= 0) {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"31m", 4); VT100_SetAttr((CHAR*)"31m", 4);
} }
OPM_LogWStr((CHAR*)" err ", 7); OPM_LogWStr((CHAR*)" err ", 7);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} else { } else {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"35m", 4); VT100_SetAttr((CHAR*)"35m", 4);
} }
OPM_LogWStr((CHAR*)" warning ", 11); OPM_LogWStr((CHAR*)" warning ", 11);
n = -n; n = -n;
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} }
OPM_LogWNum(n, 1); OPM_LogWNum(n, 1);
@ -641,11 +641,11 @@ static void OPM_ShowLine (int64 pos)
i -= 1; i -= 1;
} }
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogW('^'); OPM_LogW('^');
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
Files_Close(f); Files_Close(f);
} }
@ -1079,8 +1079,8 @@ export void *OPM__init(void)
__MODULE_IMPORT(Platform); __MODULE_IMPORT(Platform);
__MODULE_IMPORT(Strings); __MODULE_IMPORT(Strings);
__MODULE_IMPORT(Texts); __MODULE_IMPORT(Texts);
__MODULE_IMPORT(VT100);
__MODULE_IMPORT(errors); __MODULE_IMPORT(errors);
__MODULE_IMPORT(vt100);
__REGMOD("OPM", EnumPtrs); __REGMOD("OPM", EnumPtrs);
__REGCMD("CloseFiles", OPM_CloseFiles); __REGCMD("CloseFiles", OPM_CloseFiles);
__REGCMD("CloseOldSym", OPM_CloseOldSym); __REGCMD("CloseOldSym", OPM_CloseOldSym);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -315,5 +315,6 @@ export void *Out__init(void)
__REGCMD("Ln", Out_Ln); __REGCMD("Ln", Out_Ln);
__REGCMD("Open", Out_Open); __REGCMD("Open", Out_Open);
/* BEGIN */ /* BEGIN */
Out_in = 0;
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef errors__h #ifndef errors__h
#define errors__h #define errors__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -102,6 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN stati
Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); Strings_Append((CHAR*)"", 1, (void*)cmd, 1023);
Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023);
Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023);
Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023);
Strings_Append(OPM_Model, 10, (void*)cmd, 1023); Strings_Append(OPM_Model, 10, (void*)cmd, 1023);
extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023); extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023);
__DEL(additionalopts); __DEL(additionalopts);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -10,40 +10,40 @@
#include "Strings.h" #include "Strings.h"
export CHAR vt100_CSI[5]; export CHAR VT100_CSI[5];
static CHAR vt100_tmpstr[32]; static CHAR VT100_tmpstr[32];
export void vt100_CHA (int16 n); export void VT100_CHA (int16 n);
export void vt100_CNL (int16 n); export void VT100_CNL (int16 n);
export void vt100_CPL (int16 n); export void VT100_CPL (int16 n);
export void vt100_CUB (int16 n); export void VT100_CUB (int16 n);
export void vt100_CUD (int16 n); export void VT100_CUD (int16 n);
export void vt100_CUF (int16 n); export void VT100_CUF (int16 n);
export void vt100_CUP (int16 n, int16 m); export void VT100_CUP (int16 n, int16 m);
export void vt100_CUU (int16 n); export void VT100_CUU (int16 n);
export void vt100_DECTCEMh (void); export void VT100_DECTCEMh (void);
export void vt100_DECTCEMl (void); export void VT100_DECTCEMl (void);
export void vt100_DSR (int16 n); export void VT100_DSR (int16 n);
export void vt100_ED (int16 n); export void VT100_ED (int16 n);
export void vt100_EL (int16 n); export void VT100_EL (int16 n);
static void vt100_EscSeq (int16 n, CHAR *letter, LONGINT letter__len); static void VT100_EscSeq (int16 n, CHAR *letter, LONGINT letter__len);
static void vt100_EscSeq0 (CHAR *letter, LONGINT letter__len); static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len);
static void vt100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len); static void VT100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len);
static void vt100_EscSeqSwapped (int16 n, CHAR *letter, LONGINT letter__len); static void VT100_EscSeqSwapped (int16 n, CHAR *letter, LONGINT letter__len);
export void vt100_HVP (int16 n, int16 m); export void VT100_HVP (int16 n, int16 m);
export void vt100_IntToStr (int32 int_, CHAR *str, LONGINT str__len); export void VT100_IntToStr (int32 int_, CHAR *str, LONGINT str__len);
export void vt100_RCP (void); export void VT100_RCP (void);
static void vt100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end); static void VT100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end);
export void vt100_SCP (void); export void VT100_SCP (void);
export void vt100_SD (int16 n); export void VT100_SD (int16 n);
export void vt100_SGR (int16 n); export void VT100_SGR (int16 n);
export void vt100_SGR2 (int16 n, int16 m); export void VT100_SGR2 (int16 n, int16 m);
export void vt100_SU (int16 n); export void VT100_SU (int16 n);
export void vt100_SetAttr (CHAR *attr, LONGINT attr__len); export void VT100_SetAttr (CHAR *attr, LONGINT attr__len);
static void vt100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end) static void VT100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end)
{ {
CHAR h; CHAR h;
while (start < end) { while (start < end) {
@ -55,7 +55,7 @@ static void vt100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end)
} }
} }
void vt100_IntToStr (int32 int_, CHAR *str, LONGINT str__len) void VT100_IntToStr (int32 int_, CHAR *str, LONGINT str__len)
{ {
CHAR b[21]; CHAR b[21];
int16 s, e; int16 s, e;
@ -79,55 +79,55 @@ void vt100_IntToStr (int32 int_, CHAR *str, LONGINT str__len)
e += 1; e += 1;
} while (!(int_ == 0)); } while (!(int_ == 0));
b[__X(e, 21)] = 0x00; b[__X(e, 21)] = 0x00;
vt100_Reverse0((void*)b, 21, s, e - 1); VT100_Reverse0((void*)b, 21, s, e - 1);
} }
__COPY(b, str, str__len); __COPY(b, str, str__len);
} }
static void vt100_EscSeq0 (CHAR *letter, LONGINT letter__len) static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len)
{ {
CHAR cmd[9]; CHAR cmd[9];
__DUP(letter, letter__len, CHAR); __DUP(letter, letter__len, CHAR);
__COPY(vt100_CSI, cmd, 9); __COPY(VT100_CSI, cmd, 9);
Strings_Append(letter, letter__len, (void*)cmd, 9); Strings_Append(letter, letter__len, (void*)cmd, 9);
Out_String(cmd, 9); Out_String(cmd, 9);
__DEL(letter); __DEL(letter);
} }
static void vt100_EscSeq (int16 n, CHAR *letter, LONGINT letter__len) static void VT100_EscSeq (int16 n, CHAR *letter, LONGINT letter__len)
{ {
CHAR nstr[2]; CHAR nstr[2];
CHAR cmd[7]; CHAR cmd[7];
__DUP(letter, letter__len, CHAR); __DUP(letter, letter__len, CHAR);
vt100_IntToStr(n, (void*)nstr, 2); VT100_IntToStr(n, (void*)nstr, 2);
__COPY(vt100_CSI, cmd, 7); __COPY(VT100_CSI, cmd, 7);
Strings_Append(nstr, 2, (void*)cmd, 7); Strings_Append(nstr, 2, (void*)cmd, 7);
Strings_Append(letter, letter__len, (void*)cmd, 7); Strings_Append(letter, letter__len, (void*)cmd, 7);
Out_String(cmd, 7); Out_String(cmd, 7);
__DEL(letter); __DEL(letter);
} }
static void vt100_EscSeqSwapped (int16 n, CHAR *letter, LONGINT letter__len) static void VT100_EscSeqSwapped (int16 n, CHAR *letter, LONGINT letter__len)
{ {
CHAR nstr[2]; CHAR nstr[2];
CHAR cmd[7]; CHAR cmd[7];
__DUP(letter, letter__len, CHAR); __DUP(letter, letter__len, CHAR);
vt100_IntToStr(n, (void*)nstr, 2); VT100_IntToStr(n, (void*)nstr, 2);
__COPY(vt100_CSI, cmd, 7); __COPY(VT100_CSI, cmd, 7);
Strings_Append(letter, letter__len, (void*)cmd, 7); Strings_Append(letter, letter__len, (void*)cmd, 7);
Strings_Append(nstr, 2, (void*)cmd, 7); Strings_Append(nstr, 2, (void*)cmd, 7);
Out_String(cmd, 7); Out_String(cmd, 7);
__DEL(letter); __DEL(letter);
} }
static void vt100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len) static void VT100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len)
{ {
CHAR nstr[5], mstr[5]; CHAR nstr[5], mstr[5];
CHAR cmd[12]; CHAR cmd[12];
__DUP(letter, letter__len, CHAR); __DUP(letter, letter__len, CHAR);
vt100_IntToStr(n, (void*)nstr, 5); VT100_IntToStr(n, (void*)nstr, 5);
vt100_IntToStr(m, (void*)mstr, 5); VT100_IntToStr(m, (void*)mstr, 5);
__COPY(vt100_CSI, cmd, 12); __COPY(VT100_CSI, cmd, 12);
Strings_Append(nstr, 5, (void*)cmd, 12); Strings_Append(nstr, 5, (void*)cmd, 12);
Strings_Append((CHAR*)";", 2, (void*)cmd, 12); Strings_Append((CHAR*)";", 2, (void*)cmd, 12);
Strings_Append(mstr, 5, (void*)cmd, 12); Strings_Append(mstr, 5, (void*)cmd, 12);
@ -136,129 +136,129 @@ static void vt100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len)
__DEL(letter); __DEL(letter);
} }
void vt100_CUU (int16 n) void VT100_CUU (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"A", 2); VT100_EscSeq(n, (CHAR*)"A", 2);
} }
void vt100_CUD (int16 n) void VT100_CUD (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"B", 2); VT100_EscSeq(n, (CHAR*)"B", 2);
} }
void vt100_CUF (int16 n) void VT100_CUF (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"C", 2); VT100_EscSeq(n, (CHAR*)"C", 2);
} }
void vt100_CUB (int16 n) void VT100_CUB (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"D", 2); VT100_EscSeq(n, (CHAR*)"D", 2);
} }
void vt100_CNL (int16 n) void VT100_CNL (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"E", 2); VT100_EscSeq(n, (CHAR*)"E", 2);
} }
void vt100_CPL (int16 n) void VT100_CPL (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"F", 2); VT100_EscSeq(n, (CHAR*)"F", 2);
} }
void vt100_CHA (int16 n) void VT100_CHA (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"G", 2); VT100_EscSeq(n, (CHAR*)"G", 2);
} }
void vt100_CUP (int16 n, int16 m) void VT100_CUP (int16 n, int16 m)
{ {
vt100_EscSeq2(n, m, (CHAR*)"H", 2); VT100_EscSeq2(n, m, (CHAR*)"H", 2);
} }
void vt100_ED (int16 n) void VT100_ED (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"J", 2); VT100_EscSeq(n, (CHAR*)"J", 2);
} }
void vt100_EL (int16 n) void VT100_EL (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"K", 2); VT100_EscSeq(n, (CHAR*)"K", 2);
} }
void vt100_SU (int16 n) void VT100_SU (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"S", 2); VT100_EscSeq(n, (CHAR*)"S", 2);
} }
void vt100_SD (int16 n) void VT100_SD (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"T", 2); VT100_EscSeq(n, (CHAR*)"T", 2);
} }
void vt100_HVP (int16 n, int16 m) void VT100_HVP (int16 n, int16 m)
{ {
vt100_EscSeq2(n, m, (CHAR*)"f", 2); VT100_EscSeq2(n, m, (CHAR*)"f", 2);
} }
void vt100_SGR (int16 n) void VT100_SGR (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"m", 2); VT100_EscSeq(n, (CHAR*)"m", 2);
} }
void vt100_SGR2 (int16 n, int16 m) void VT100_SGR2 (int16 n, int16 m)
{ {
vt100_EscSeq2(n, m, (CHAR*)"m", 2); VT100_EscSeq2(n, m, (CHAR*)"m", 2);
} }
void vt100_DSR (int16 n) void VT100_DSR (int16 n)
{ {
vt100_EscSeq(6, (CHAR*)"n", 2); VT100_EscSeq(6, (CHAR*)"n", 2);
} }
void vt100_SCP (void) void VT100_SCP (void)
{ {
vt100_EscSeq0((CHAR*)"s", 2); VT100_EscSeq0((CHAR*)"s", 2);
} }
void vt100_RCP (void) void VT100_RCP (void)
{ {
vt100_EscSeq0((CHAR*)"u", 2); VT100_EscSeq0((CHAR*)"u", 2);
} }
void vt100_DECTCEMl (void) void VT100_DECTCEMl (void)
{ {
vt100_EscSeq0((CHAR*)"\?25l", 5); VT100_EscSeq0((CHAR*)"\?25l", 5);
} }
void vt100_DECTCEMh (void) void VT100_DECTCEMh (void)
{ {
vt100_EscSeq0((CHAR*)"\?25h", 5); VT100_EscSeq0((CHAR*)"\?25h", 5);
} }
void vt100_SetAttr (CHAR *attr, LONGINT attr__len) void VT100_SetAttr (CHAR *attr, LONGINT attr__len)
{ {
CHAR tmpstr[16]; CHAR tmpstr[16];
__DUP(attr, attr__len, CHAR); __DUP(attr, attr__len, CHAR);
__COPY(vt100_CSI, tmpstr, 16); __COPY(VT100_CSI, tmpstr, 16);
Strings_Append(attr, attr__len, (void*)tmpstr, 16); Strings_Append(attr, attr__len, (void*)tmpstr, 16);
Out_String(tmpstr, 16); Out_String(tmpstr, 16);
__DEL(attr); __DEL(attr);
} }
export void *vt100__init(void) export void *VT100__init(void)
{ {
__DEFMOD; __DEFMOD;
__MODULE_IMPORT(Out); __MODULE_IMPORT(Out);
__MODULE_IMPORT(Strings); __MODULE_IMPORT(Strings);
__REGMOD("vt100", 0); __REGMOD("VT100", 0);
__REGCMD("DECTCEMh", vt100_DECTCEMh); __REGCMD("DECTCEMh", VT100_DECTCEMh);
__REGCMD("DECTCEMl", vt100_DECTCEMl); __REGCMD("DECTCEMl", VT100_DECTCEMl);
__REGCMD("RCP", vt100_RCP); __REGCMD("RCP", VT100_RCP);
__REGCMD("SCP", vt100_SCP); __REGCMD("SCP", VT100_SCP);
/* BEGIN */ /* BEGIN */
__COPY("\033", vt100_CSI, 5); __COPY("\033", VT100_CSI, 5);
Strings_Append((CHAR*)"[", 2, (void*)vt100_CSI, 5); Strings_Append((CHAR*)"[", 2, (void*)VT100_CSI, 5);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,37 +1,37 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef vt100__h #ifndef VT100__h
#define vt100__h #define VT100__h
#include "SYSTEM.h" #include "SYSTEM.h"
import CHAR vt100_CSI[5]; import CHAR VT100_CSI[5];
import void vt100_CHA (int16 n); import void VT100_CHA (int16 n);
import void vt100_CNL (int16 n); import void VT100_CNL (int16 n);
import void vt100_CPL (int16 n); import void VT100_CPL (int16 n);
import void vt100_CUB (int16 n); import void VT100_CUB (int16 n);
import void vt100_CUD (int16 n); import void VT100_CUD (int16 n);
import void vt100_CUF (int16 n); import void VT100_CUF (int16 n);
import void vt100_CUP (int16 n, int16 m); import void VT100_CUP (int16 n, int16 m);
import void vt100_CUU (int16 n); import void VT100_CUU (int16 n);
import void vt100_DECTCEMh (void); import void VT100_DECTCEMh (void);
import void vt100_DECTCEMl (void); import void VT100_DECTCEMl (void);
import void vt100_DSR (int16 n); import void VT100_DSR (int16 n);
import void vt100_ED (int16 n); import void VT100_ED (int16 n);
import void vt100_EL (int16 n); import void VT100_EL (int16 n);
import void vt100_HVP (int16 n, int16 m); import void VT100_HVP (int16 n, int16 m);
import void vt100_IntToStr (int32 int_, CHAR *str, LONGINT str__len); import void VT100_IntToStr (int32 int_, CHAR *str, LONGINT str__len);
import void vt100_RCP (void); import void VT100_RCP (void);
import void vt100_SCP (void); import void VT100_SCP (void);
import void vt100_SD (int16 n); import void VT100_SD (int16 n);
import void vt100_SGR (int16 n); import void VT100_SGR (int16 n);
import void vt100_SGR2 (int16 n, int16 m); import void VT100_SGR2 (int16 n, int16 m);
import void vt100_SU (int16 n); import void VT100_SU (int16 n);
import void vt100_SetAttr (CHAR *attr, LONGINT attr__len); import void VT100_SetAttr (CHAR *attr, LONGINT attr__len);
import void *vt100__init(void); import void *VT100__init(void);
#endif // vt100 #endif // VT100

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamSf */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspamSf */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -16,8 +16,8 @@
#include "OPV.h" #include "OPV.h"
#include "Platform.h" #include "Platform.h"
#include "Strings.h" #include "Strings.h"
#include "VT100.h"
#include "extTools.h" #include "extTools.h"
#include "vt100.h"
static CHAR Compiler_mname[256]; static CHAR Compiler_mname[256];
@ -47,20 +47,20 @@ void Compiler_Module (BOOLEAN *done)
if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) {
OPM_DeleteNewSym(); OPM_DeleteNewSym();
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogWStr((CHAR*)" Main program.", 16);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} else { } else {
if (new) { if (new) {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogWStr((CHAR*)" New symbol file.", 19); OPM_LogWStr((CHAR*)" New symbol file.", 19);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
OPM_RegisterNewSym(); OPM_RegisterNewSym();
} else if (ext) { } else if (ext) {
@ -175,8 +175,8 @@ export int main(int argc, char **argv)
__MODULE_IMPORT(OPV); __MODULE_IMPORT(OPV);
__MODULE_IMPORT(Platform); __MODULE_IMPORT(Platform);
__MODULE_IMPORT(Strings); __MODULE_IMPORT(Strings);
__MODULE_IMPORT(VT100);
__MODULE_IMPORT(extTools); __MODULE_IMPORT(extTools);
__MODULE_IMPORT(vt100);
__REGMAIN("Compiler", 0); __REGMAIN("Compiler", 0);
__REGCMD("Translate", Compiler_Translate); __REGCMD("Translate", Compiler_Translate);
/* BEGIN */ /* BEGIN */

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __MOVE("1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -12,8 +12,8 @@
#include "Platform.h" #include "Platform.h"
#include "Strings.h" #include "Strings.h"
#include "Texts.h" #include "Texts.h"
#include "VT100.h"
#include "errors.h" #include "errors.h"
#include "vt100.h"
typedef typedef
CHAR OPM_FileName[32]; CHAR OPM_FileName[32];
@ -325,7 +325,7 @@ BOOLEAN OPM_OpenPar (void)
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" Miscellaneous", 16); OPM_LogWStr((CHAR*)" Miscellaneous", 16);
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" -f Disable vt100 control characters in status output.", 60); OPM_LogWStr((CHAR*)" -f Disable VT100 control characters in status output.", 60);
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" -V Display compiler debugging messages.", 46); OPM_LogWStr((CHAR*)" -V Display compiler debugging messages.", 46);
OPM_LogWLn(); OPM_LogWLn();
@ -555,20 +555,20 @@ static void OPM_LogErrMsg (int16 n)
CHAR buf[1024]; CHAR buf[1024];
if (n >= 0) { if (n >= 0) {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"31m", 4); VT100_SetAttr((CHAR*)"31m", 4);
} }
OPM_LogWStr((CHAR*)" err ", 7); OPM_LogWStr((CHAR*)" err ", 7);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} else { } else {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"35m", 4); VT100_SetAttr((CHAR*)"35m", 4);
} }
OPM_LogWStr((CHAR*)" warning ", 11); OPM_LogWStr((CHAR*)" warning ", 11);
n = -n; n = -n;
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} }
OPM_LogWNum(n, 1); OPM_LogWNum(n, 1);
@ -641,11 +641,11 @@ static void OPM_ShowLine (int64 pos)
i -= 1; i -= 1;
} }
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogW('^'); OPM_LogW('^');
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
Files_Close(f); Files_Close(f);
} }
@ -1079,8 +1079,8 @@ export void *OPM__init(void)
__MODULE_IMPORT(Platform); __MODULE_IMPORT(Platform);
__MODULE_IMPORT(Strings); __MODULE_IMPORT(Strings);
__MODULE_IMPORT(Texts); __MODULE_IMPORT(Texts);
__MODULE_IMPORT(VT100);
__MODULE_IMPORT(errors); __MODULE_IMPORT(errors);
__MODULE_IMPORT(vt100);
__REGMOD("OPM", EnumPtrs); __REGMOD("OPM", EnumPtrs);
__REGCMD("CloseFiles", OPM_CloseFiles); __REGCMD("CloseFiles", OPM_CloseFiles);
__REGCMD("CloseOldSym", OPM_CloseOldSym); __REGCMD("CloseOldSym", OPM_CloseOldSym);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -315,5 +315,6 @@ export void *Out__init(void)
__REGCMD("Ln", Out_Ln); __REGCMD("Ln", Out_Ln);
__REGCMD("Open", Out_Open); __REGCMD("Open", Out_Open);
/* BEGIN */ /* BEGIN */
Out_in = 0;
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef errors__h #ifndef errors__h
#define errors__h #define errors__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -102,6 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN stati
Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); Strings_Append((CHAR*)"", 1, (void*)cmd, 1023);
Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023);
Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023);
Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023);
Strings_Append(OPM_Model, 10, (void*)cmd, 1023); Strings_Append(OPM_Model, 10, (void*)cmd, 1023);
extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023); extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023);
__DEL(additionalopts); __DEL(additionalopts);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -10,40 +10,40 @@
#include "Strings.h" #include "Strings.h"
export CHAR vt100_CSI[5]; export CHAR VT100_CSI[5];
static CHAR vt100_tmpstr[32]; static CHAR VT100_tmpstr[32];
export void vt100_CHA (int16 n); export void VT100_CHA (int16 n);
export void vt100_CNL (int16 n); export void VT100_CNL (int16 n);
export void vt100_CPL (int16 n); export void VT100_CPL (int16 n);
export void vt100_CUB (int16 n); export void VT100_CUB (int16 n);
export void vt100_CUD (int16 n); export void VT100_CUD (int16 n);
export void vt100_CUF (int16 n); export void VT100_CUF (int16 n);
export void vt100_CUP (int16 n, int16 m); export void VT100_CUP (int16 n, int16 m);
export void vt100_CUU (int16 n); export void VT100_CUU (int16 n);
export void vt100_DECTCEMh (void); export void VT100_DECTCEMh (void);
export void vt100_DECTCEMl (void); export void VT100_DECTCEMl (void);
export void vt100_DSR (int16 n); export void VT100_DSR (int16 n);
export void vt100_ED (int16 n); export void VT100_ED (int16 n);
export void vt100_EL (int16 n); export void VT100_EL (int16 n);
static void vt100_EscSeq (int16 n, CHAR *letter, LONGINT letter__len); static void VT100_EscSeq (int16 n, CHAR *letter, LONGINT letter__len);
static void vt100_EscSeq0 (CHAR *letter, LONGINT letter__len); static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len);
static void vt100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len); static void VT100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len);
static void vt100_EscSeqSwapped (int16 n, CHAR *letter, LONGINT letter__len); static void VT100_EscSeqSwapped (int16 n, CHAR *letter, LONGINT letter__len);
export void vt100_HVP (int16 n, int16 m); export void VT100_HVP (int16 n, int16 m);
export void vt100_IntToStr (int32 int_, CHAR *str, LONGINT str__len); export void VT100_IntToStr (int32 int_, CHAR *str, LONGINT str__len);
export void vt100_RCP (void); export void VT100_RCP (void);
static void vt100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end); static void VT100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end);
export void vt100_SCP (void); export void VT100_SCP (void);
export void vt100_SD (int16 n); export void VT100_SD (int16 n);
export void vt100_SGR (int16 n); export void VT100_SGR (int16 n);
export void vt100_SGR2 (int16 n, int16 m); export void VT100_SGR2 (int16 n, int16 m);
export void vt100_SU (int16 n); export void VT100_SU (int16 n);
export void vt100_SetAttr (CHAR *attr, LONGINT attr__len); export void VT100_SetAttr (CHAR *attr, LONGINT attr__len);
static void vt100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end) static void VT100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end)
{ {
CHAR h; CHAR h;
while (start < end) { while (start < end) {
@ -55,7 +55,7 @@ static void vt100_Reverse0 (CHAR *str, LONGINT str__len, int16 start, int16 end)
} }
} }
void vt100_IntToStr (int32 int_, CHAR *str, LONGINT str__len) void VT100_IntToStr (int32 int_, CHAR *str, LONGINT str__len)
{ {
CHAR b[21]; CHAR b[21];
int16 s, e; int16 s, e;
@ -79,55 +79,55 @@ void vt100_IntToStr (int32 int_, CHAR *str, LONGINT str__len)
e += 1; e += 1;
} while (!(int_ == 0)); } while (!(int_ == 0));
b[__X(e, 21)] = 0x00; b[__X(e, 21)] = 0x00;
vt100_Reverse0((void*)b, 21, s, e - 1); VT100_Reverse0((void*)b, 21, s, e - 1);
} }
__COPY(b, str, str__len); __COPY(b, str, str__len);
} }
static void vt100_EscSeq0 (CHAR *letter, LONGINT letter__len) static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len)
{ {
CHAR cmd[9]; CHAR cmd[9];
__DUP(letter, letter__len, CHAR); __DUP(letter, letter__len, CHAR);
__COPY(vt100_CSI, cmd, 9); __COPY(VT100_CSI, cmd, 9);
Strings_Append(letter, letter__len, (void*)cmd, 9); Strings_Append(letter, letter__len, (void*)cmd, 9);
Out_String(cmd, 9); Out_String(cmd, 9);
__DEL(letter); __DEL(letter);
} }
static void vt100_EscSeq (int16 n, CHAR *letter, LONGINT letter__len) static void VT100_EscSeq (int16 n, CHAR *letter, LONGINT letter__len)
{ {
CHAR nstr[2]; CHAR nstr[2];
CHAR cmd[7]; CHAR cmd[7];
__DUP(letter, letter__len, CHAR); __DUP(letter, letter__len, CHAR);
vt100_IntToStr(n, (void*)nstr, 2); VT100_IntToStr(n, (void*)nstr, 2);
__COPY(vt100_CSI, cmd, 7); __COPY(VT100_CSI, cmd, 7);
Strings_Append(nstr, 2, (void*)cmd, 7); Strings_Append(nstr, 2, (void*)cmd, 7);
Strings_Append(letter, letter__len, (void*)cmd, 7); Strings_Append(letter, letter__len, (void*)cmd, 7);
Out_String(cmd, 7); Out_String(cmd, 7);
__DEL(letter); __DEL(letter);
} }
static void vt100_EscSeqSwapped (int16 n, CHAR *letter, LONGINT letter__len) static void VT100_EscSeqSwapped (int16 n, CHAR *letter, LONGINT letter__len)
{ {
CHAR nstr[2]; CHAR nstr[2];
CHAR cmd[7]; CHAR cmd[7];
__DUP(letter, letter__len, CHAR); __DUP(letter, letter__len, CHAR);
vt100_IntToStr(n, (void*)nstr, 2); VT100_IntToStr(n, (void*)nstr, 2);
__COPY(vt100_CSI, cmd, 7); __COPY(VT100_CSI, cmd, 7);
Strings_Append(letter, letter__len, (void*)cmd, 7); Strings_Append(letter, letter__len, (void*)cmd, 7);
Strings_Append(nstr, 2, (void*)cmd, 7); Strings_Append(nstr, 2, (void*)cmd, 7);
Out_String(cmd, 7); Out_String(cmd, 7);
__DEL(letter); __DEL(letter);
} }
static void vt100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len) static void VT100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len)
{ {
CHAR nstr[5], mstr[5]; CHAR nstr[5], mstr[5];
CHAR cmd[12]; CHAR cmd[12];
__DUP(letter, letter__len, CHAR); __DUP(letter, letter__len, CHAR);
vt100_IntToStr(n, (void*)nstr, 5); VT100_IntToStr(n, (void*)nstr, 5);
vt100_IntToStr(m, (void*)mstr, 5); VT100_IntToStr(m, (void*)mstr, 5);
__COPY(vt100_CSI, cmd, 12); __COPY(VT100_CSI, cmd, 12);
Strings_Append(nstr, 5, (void*)cmd, 12); Strings_Append(nstr, 5, (void*)cmd, 12);
Strings_Append((CHAR*)";", 2, (void*)cmd, 12); Strings_Append((CHAR*)";", 2, (void*)cmd, 12);
Strings_Append(mstr, 5, (void*)cmd, 12); Strings_Append(mstr, 5, (void*)cmd, 12);
@ -136,129 +136,129 @@ static void vt100_EscSeq2 (int16 n, int16 m, CHAR *letter, LONGINT letter__len)
__DEL(letter); __DEL(letter);
} }
void vt100_CUU (int16 n) void VT100_CUU (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"A", 2); VT100_EscSeq(n, (CHAR*)"A", 2);
} }
void vt100_CUD (int16 n) void VT100_CUD (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"B", 2); VT100_EscSeq(n, (CHAR*)"B", 2);
} }
void vt100_CUF (int16 n) void VT100_CUF (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"C", 2); VT100_EscSeq(n, (CHAR*)"C", 2);
} }
void vt100_CUB (int16 n) void VT100_CUB (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"D", 2); VT100_EscSeq(n, (CHAR*)"D", 2);
} }
void vt100_CNL (int16 n) void VT100_CNL (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"E", 2); VT100_EscSeq(n, (CHAR*)"E", 2);
} }
void vt100_CPL (int16 n) void VT100_CPL (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"F", 2); VT100_EscSeq(n, (CHAR*)"F", 2);
} }
void vt100_CHA (int16 n) void VT100_CHA (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"G", 2); VT100_EscSeq(n, (CHAR*)"G", 2);
} }
void vt100_CUP (int16 n, int16 m) void VT100_CUP (int16 n, int16 m)
{ {
vt100_EscSeq2(n, m, (CHAR*)"H", 2); VT100_EscSeq2(n, m, (CHAR*)"H", 2);
} }
void vt100_ED (int16 n) void VT100_ED (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"J", 2); VT100_EscSeq(n, (CHAR*)"J", 2);
} }
void vt100_EL (int16 n) void VT100_EL (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"K", 2); VT100_EscSeq(n, (CHAR*)"K", 2);
} }
void vt100_SU (int16 n) void VT100_SU (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"S", 2); VT100_EscSeq(n, (CHAR*)"S", 2);
} }
void vt100_SD (int16 n) void VT100_SD (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"T", 2); VT100_EscSeq(n, (CHAR*)"T", 2);
} }
void vt100_HVP (int16 n, int16 m) void VT100_HVP (int16 n, int16 m)
{ {
vt100_EscSeq2(n, m, (CHAR*)"f", 2); VT100_EscSeq2(n, m, (CHAR*)"f", 2);
} }
void vt100_SGR (int16 n) void VT100_SGR (int16 n)
{ {
vt100_EscSeq(n, (CHAR*)"m", 2); VT100_EscSeq(n, (CHAR*)"m", 2);
} }
void vt100_SGR2 (int16 n, int16 m) void VT100_SGR2 (int16 n, int16 m)
{ {
vt100_EscSeq2(n, m, (CHAR*)"m", 2); VT100_EscSeq2(n, m, (CHAR*)"m", 2);
} }
void vt100_DSR (int16 n) void VT100_DSR (int16 n)
{ {
vt100_EscSeq(6, (CHAR*)"n", 2); VT100_EscSeq(6, (CHAR*)"n", 2);
} }
void vt100_SCP (void) void VT100_SCP (void)
{ {
vt100_EscSeq0((CHAR*)"s", 2); VT100_EscSeq0((CHAR*)"s", 2);
} }
void vt100_RCP (void) void VT100_RCP (void)
{ {
vt100_EscSeq0((CHAR*)"u", 2); VT100_EscSeq0((CHAR*)"u", 2);
} }
void vt100_DECTCEMl (void) void VT100_DECTCEMl (void)
{ {
vt100_EscSeq0((CHAR*)"\?25l", 5); VT100_EscSeq0((CHAR*)"\?25l", 5);
} }
void vt100_DECTCEMh (void) void VT100_DECTCEMh (void)
{ {
vt100_EscSeq0((CHAR*)"\?25h", 5); VT100_EscSeq0((CHAR*)"\?25h", 5);
} }
void vt100_SetAttr (CHAR *attr, LONGINT attr__len) void VT100_SetAttr (CHAR *attr, LONGINT attr__len)
{ {
CHAR tmpstr[16]; CHAR tmpstr[16];
__DUP(attr, attr__len, CHAR); __DUP(attr, attr__len, CHAR);
__COPY(vt100_CSI, tmpstr, 16); __COPY(VT100_CSI, tmpstr, 16);
Strings_Append(attr, attr__len, (void*)tmpstr, 16); Strings_Append(attr, attr__len, (void*)tmpstr, 16);
Out_String(tmpstr, 16); Out_String(tmpstr, 16);
__DEL(attr); __DEL(attr);
} }
export void *vt100__init(void) export void *VT100__init(void)
{ {
__DEFMOD; __DEFMOD;
__MODULE_IMPORT(Out); __MODULE_IMPORT(Out);
__MODULE_IMPORT(Strings); __MODULE_IMPORT(Strings);
__REGMOD("vt100", 0); __REGMOD("VT100", 0);
__REGCMD("DECTCEMh", vt100_DECTCEMh); __REGCMD("DECTCEMh", VT100_DECTCEMh);
__REGCMD("DECTCEMl", vt100_DECTCEMl); __REGCMD("DECTCEMl", VT100_DECTCEMl);
__REGCMD("RCP", vt100_RCP); __REGCMD("RCP", VT100_RCP);
__REGCMD("SCP", vt100_SCP); __REGCMD("SCP", VT100_SCP);
/* BEGIN */ /* BEGIN */
__COPY("\033", vt100_CSI, 5); __COPY("\033", VT100_CSI, 5);
Strings_Append((CHAR*)"[", 2, (void*)vt100_CSI, 5); Strings_Append((CHAR*)"[", 2, (void*)VT100_CSI, 5);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,37 +1,37 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef vt100__h #ifndef VT100__h
#define vt100__h #define VT100__h
#include "SYSTEM.h" #include "SYSTEM.h"
import CHAR vt100_CSI[5]; import CHAR VT100_CSI[5];
import void vt100_CHA (int16 n); import void VT100_CHA (int16 n);
import void vt100_CNL (int16 n); import void VT100_CNL (int16 n);
import void vt100_CPL (int16 n); import void VT100_CPL (int16 n);
import void vt100_CUB (int16 n); import void VT100_CUB (int16 n);
import void vt100_CUD (int16 n); import void VT100_CUD (int16 n);
import void vt100_CUF (int16 n); import void VT100_CUF (int16 n);
import void vt100_CUP (int16 n, int16 m); import void VT100_CUP (int16 n, int16 m);
import void vt100_CUU (int16 n); import void VT100_CUU (int16 n);
import void vt100_DECTCEMh (void); import void VT100_DECTCEMh (void);
import void vt100_DECTCEMl (void); import void VT100_DECTCEMl (void);
import void vt100_DSR (int16 n); import void VT100_DSR (int16 n);
import void vt100_ED (int16 n); import void VT100_ED (int16 n);
import void vt100_EL (int16 n); import void VT100_EL (int16 n);
import void vt100_HVP (int16 n, int16 m); import void VT100_HVP (int16 n, int16 m);
import void vt100_IntToStr (int32 int_, CHAR *str, LONGINT str__len); import void VT100_IntToStr (int32 int_, CHAR *str, LONGINT str__len);
import void vt100_RCP (void); import void VT100_RCP (void);
import void vt100_SCP (void); import void VT100_SCP (void);
import void vt100_SD (int16 n); import void VT100_SD (int16 n);
import void vt100_SGR (int16 n); import void VT100_SGR (int16 n);
import void vt100_SGR2 (int16 n, int16 m); import void VT100_SGR2 (int16 n, int16 m);
import void vt100_SU (int16 n); import void VT100_SU (int16 n);
import void vt100_SetAttr (CHAR *attr, LONGINT attr__len); import void VT100_SetAttr (CHAR *attr, LONGINT attr__len);
import void *vt100__init(void); import void *VT100__init(void);
#endif // vt100 #endif // VT100

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamSf */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspamSf */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -16,8 +16,8 @@
#include "OPV.h" #include "OPV.h"
#include "Platform.h" #include "Platform.h"
#include "Strings.h" #include "Strings.h"
#include "VT100.h"
#include "extTools.h" #include "extTools.h"
#include "vt100.h"
static CHAR Compiler_mname[256]; static CHAR Compiler_mname[256];
@ -47,20 +47,20 @@ void Compiler_Module (BOOLEAN *done)
if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) {
OPM_DeleteNewSym(); OPM_DeleteNewSym();
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogWStr((CHAR*)" Main program.", 16);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} else { } else {
if (new) { if (new) {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogWStr((CHAR*)" New symbol file.", 19); OPM_LogWStr((CHAR*)" New symbol file.", 19);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
OPM_RegisterNewSym(); OPM_RegisterNewSym();
} else if (ext) { } else if (ext) {
@ -175,8 +175,8 @@ export int main(int argc, char **argv)
__MODULE_IMPORT(OPV); __MODULE_IMPORT(OPV);
__MODULE_IMPORT(Platform); __MODULE_IMPORT(Platform);
__MODULE_IMPORT(Strings); __MODULE_IMPORT(Strings);
__MODULE_IMPORT(VT100);
__MODULE_IMPORT(extTools); __MODULE_IMPORT(extTools);
__MODULE_IMPORT(vt100);
__REGMAIN("Compiler", 0); __REGMAIN("Compiler", 0);
__REGCMD("Translate", Compiler_Translate); __REGCMD("Translate", Compiler_Translate);
/* BEGIN */ /* BEGIN */

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __MOVE("1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tsSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16
@ -12,8 +12,8 @@
#include "Platform.h" #include "Platform.h"
#include "Strings.h" #include "Strings.h"
#include "Texts.h" #include "Texts.h"
#include "VT100.h"
#include "errors.h" #include "errors.h"
#include "vt100.h"
typedef typedef
CHAR OPM_FileName[32]; CHAR OPM_FileName[32];
@ -325,7 +325,7 @@ BOOLEAN OPM_OpenPar (void)
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" Miscellaneous", 16); OPM_LogWStr((CHAR*)" Miscellaneous", 16);
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" -f Disable vt100 control characters in status output.", 60); OPM_LogWStr((CHAR*)" -f Disable VT100 control characters in status output.", 60);
OPM_LogWLn(); OPM_LogWLn();
OPM_LogWStr((CHAR*)" -V Display compiler debugging messages.", 46); OPM_LogWStr((CHAR*)" -V Display compiler debugging messages.", 46);
OPM_LogWLn(); OPM_LogWLn();
@ -555,20 +555,20 @@ static void OPM_LogErrMsg (int16 n)
CHAR buf[1024]; CHAR buf[1024];
if (n >= 0) { if (n >= 0) {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"31m", 4); VT100_SetAttr((CHAR*)"31m", 4);
} }
OPM_LogWStr((CHAR*)" err ", 7); OPM_LogWStr((CHAR*)" err ", 7);
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} else { } else {
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"35m", 4); VT100_SetAttr((CHAR*)"35m", 4);
} }
OPM_LogWStr((CHAR*)" warning ", 11); OPM_LogWStr((CHAR*)" warning ", 11);
n = -n; n = -n;
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
} }
OPM_LogWNum(n, 1); OPM_LogWNum(n, 1);
@ -641,11 +641,11 @@ static void OPM_ShowLine (int64 pos)
i -= 1; i -= 1;
} }
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"32m", 4); VT100_SetAttr((CHAR*)"32m", 4);
} }
OPM_LogW('^'); OPM_LogW('^');
if (!__IN(16, OPM_Options, 32)) { if (!__IN(16, OPM_Options, 32)) {
vt100_SetAttr((CHAR*)"0m", 3); VT100_SetAttr((CHAR*)"0m", 3);
} }
Files_Close(f); Files_Close(f);
} }
@ -1079,8 +1079,8 @@ export void *OPM__init(void)
__MODULE_IMPORT(Platform); __MODULE_IMPORT(Platform);
__MODULE_IMPORT(Strings); __MODULE_IMPORT(Strings);
__MODULE_IMPORT(Texts); __MODULE_IMPORT(Texts);
__MODULE_IMPORT(VT100);
__MODULE_IMPORT(errors); __MODULE_IMPORT(errors);
__MODULE_IMPORT(vt100);
__REGMOD("OPM", EnumPtrs); __REGMOD("OPM", EnumPtrs);
__REGCMD("CloseFiles", OPM_CloseFiles); __REGCMD("CloseFiles", OPM_CloseFiles);
__REGCMD("CloseOldSym", OPM_CloseOldSym); __REGCMD("CloseOldSym", OPM_CloseOldSym);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. tspaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/10/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */ /* voc 1.95 [2016/10/15]. Bootstrapping compiler for address size 8, alignment 8. xtspaSfF */
#define SHORTINT int8 #define SHORTINT int8
#define INTEGER int16 #define INTEGER int16

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