From 3e79d2f5d768fa7ac63fdad196a5e32fbaeffcaf Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Mon, 27 May 2019 02:46:10 +0100 Subject: first working version --- master/endstop | 0 master/fix-nls.patch | 13 ++ master/makefile.def.patch | 33 +++ master/series | 6 + master/set-default-org-for-timex.patch | 40 ++++ master/timex-pseudo-instructions.patch | 404 +++++++++++++++++++++++++++++++++ master/x86_64-support.patch | 37 +++ 7 files changed, 533 insertions(+) create mode 100644 master/endstop create mode 100644 master/fix-nls.patch create mode 100644 master/makefile.def.patch create mode 100644 master/series create mode 100644 master/set-default-org-for-timex.patch create mode 100644 master/timex-pseudo-instructions.patch create mode 100644 master/x86_64-support.patch (limited to 'master') diff --git a/master/endstop b/master/endstop new file mode 100644 index 0000000..e69de29 diff --git a/master/fix-nls.patch b/master/fix-nls.patch new file mode 100644 index 0000000..bb0f7c3 --- /dev/null +++ b/master/fix-nls.patch @@ -0,0 +1,13 @@ +diff --git a/nls.c b/nls.c +index f377003..5701f52 100644 +--- a/nls.c ++++ b/nls.c +@@ -343,7 +343,7 @@ BEGIN + case 'S': FmtBuffer+=1; break; + case 'M': FmtBuffer+=2; break; + case 'H': FmtBuffer+=3; break; +- case 'T': fprintf(stderr, "\nwarning, detected non-ANSI time format specifier '%%T'"); ++ case 'T': //fprintf(stderr, "\nwarning, detected non-ANSI time format specifier '%%T'"); + run = "H:%M:%S"; break; + case 'R': fprintf(stderr, "\nwarning, detected non-ANSI time format specifier '%%R'"); + run = "H:%M"; break; diff --git a/master/makefile.def.patch b/master/makefile.def.patch new file mode 100644 index 0000000..94e6422 --- /dev/null +++ b/master/makefile.def.patch @@ -0,0 +1,33 @@ +diff --git a/Makefile.def b/Makefile.def +new file mode 100644 +index 0000000..e886530 +--- /dev/null ++++ b/Makefile.def +@@ -0,0 +1,27 @@ ++# ------------------------------------------------------------------------- ++# choose your compiler (must be ANSI-compliant!) and linker command, plus ++# any additionally needed flags ++ ++CC = gcc ++LD = gcc ++CFLAGS = ++LDFLAGS = ++# ^^^^^ ++# ||||| ++# adapt this to your target cpu (386/486 or higher) ++# ------------------------------------------------------------------------- ++# directories where binaries, includes, and manpages should go during ++# installation ++ ++BINDIR = /usr/local/bin ++INCDIR = /usr/local/include/asl ++MANDIR = /usr/local/man ++LIBDIR = /usr/local/lib/asl ++DOCDIR = /usr/local/doc/asl ++ ++# ------------------------------------------------------------------------- ++# character encoding to use (choose one of them) ++ ++CHARSET = CHARSET_ISO8859_1 ++# CHARSET = CHARSET_ASCII7 ++# CHARSET = CHARSET_IBM437 diff --git a/master/series b/master/series new file mode 100644 index 0000000..c117113 --- /dev/null +++ b/master/series @@ -0,0 +1,6 @@ +makefile.def.patch +x86_64-support.patch +fix-nls.patch +set-default-org-for-timex.patch +timex-pseudo-instructions.patch +endstop diff --git a/master/set-default-org-for-timex.patch b/master/set-default-org-for-timex.patch new file mode 100644 index 0000000..14abe6e --- /dev/null +++ b/master/set-default-org-for-timex.patch @@ -0,0 +1,40 @@ +diff --git a/code6805.c b/code6805.c +index 1da6c30..0a087af 100644 +--- a/code6805.c ++++ b/code6805.c +@@ -77,7 +77,7 @@ typedef struct + static ShortInt AdrMode,OpSize; + static Byte AdrVals[2]; + +-static CPUVar CPU6805,CPU6808; ++static CPUVar CPU6805,CPU6808,DATALINK; + + static BaseOrder *FixedOrders; + static BaseOrder *RelOrders; +@@ -779,8 +779,26 @@ BEGIN + SwitchFrom=SwitchFrom_6805; InitFields(); + END + ++ static void SwitchTo_DataLink(void) ++BEGIN ++ TurnWords=False; ConstMode=ConstModeMoto; SetIsOccupied=False; ++ ++ PCSymbol="*"; HeaderID=0x62; NOPCode=0x9d; ++ DivideChars=","; HasAttrs=False; ++ ++ ValidSegs=(1<': ++ return 0x28; ++ case '%': ++ return 0x29; ++ case '&': ++ return 0x2a; ++ case '\'': ++ return 0x2b; ++ case '(': ++ return 0x2c; ++ case ')': ++ return 0x2d; ++ case '*': ++ return 0x2e; ++ case '+': ++ return 0x2f; ++ case ',': ++ return 0x30; ++ case '-': ++ return 0x31; ++ case '.': ++ return 0x32; ++ case '/': ++ return 0x33; ++ case ':': ++ return 0x34; ++ case '\\': ++ return 0x35; ++ case '=': ++ return 0x37; ++ case '?': ++ return 0x39; ++ case '_': ++ return 0x3a; ++ default: ++ WrError(1320); ++ CodeLen=0; ++ fprintf (stderr, "Cannot encode %c in 'timex' encoding\n", c); ++ } ++} ++ ++ ++static void timex_translate_buf(unsigned char *c, size_t l) ++{ ++ for (;l;c++,l--) ++ *c = timex_translate(*c); ++} ++ ++ ++ static void DecodeTIMEX(Word Index) ++BEGIN ++ int z; ++ Boolean OK; ++ TempResult t; ++ LongInt Rep,z2; ++ ++ if (ArgCnt==0) WrError(1110); ++ else ++ BEGIN ++ z=1; OK=True; ++ do ++ BEGIN ++ KillBlanks(ArgStr[z]); ++ OK=CutRep(ArgStr[z],&Rep); ++ if (OK) ++ BEGIN ++ EvalExpression(ArgStr[z],&t); ++ switch (t.Typ) ++ BEGIN ++ case TempInt: ++ if (NOT RangeCheck(t.Contents.Int,Int8)) ++ BEGIN ++ WrError(1320); OK=False; ++ END ++ else if (CodeLen+Rep>MaxCodeLen) ++ BEGIN ++ WrError(1920); OK=False; ++ END ++ else ++ BEGIN ++ memset(BAsmCode+CodeLen,t.Contents.Int,Rep); ++ timex_translate_buf(BAsmCode+CodeLen,Rep); ++ CodeLen+=Rep; ++ END ++ break; ++ case TempFloat: ++ WrError(1135); OK=False; ++ break; ++ case TempString: ++ TranslateString(t.Contents.Ascii); ++ if (CodeLen+Rep*strlen(t.Contents.Ascii)>MaxCodeLen) ++ BEGIN ++ WrError(1920); OK=False; ++ END ++ else for (z2=0; z2MaxCodeLen) ++ BEGIN ++ WrError(1920); OK=False; ++ END ++ else ++ BEGIN ++ memset(BAsmCode+CodeLen,t.Contents.Int,Rep); ++ timex6_translate_buf(BAsmCode+CodeLen,Rep); ++ CodeLen+=Rep; ++ END ++ break; ++ case TempFloat: ++ WrError(1135); OK=False; ++ break; ++ case TempString: ++ TranslateString(t.Contents.Ascii); ++ if (CodeLen+Rep*strlen(t.Contents.Ascii)>MaxCodeLen) ++ BEGIN ++ WrError(1920); OK=False; ++ END ++ else for (z2=0; z2>2,bpos=(Pos&3)*4; +diff --git a/codepseudo.h b/codepseudo.h +index 0ffbfe8..fc164a7 100644 +--- a/codepseudo.h ++++ b/codepseudo.h +@@ -24,6 +24,8 @@ extern void ConvertDec(Double F, Word *w); + + extern Boolean DecodeIntelPseudo(Boolean Turn); + ++extern Boolean DecodeTimexPseudo(Boolean Turn); ++ + extern Boolean DecodeMotoPseudo(Boolean Turn); + + extern void AddMoto16PseudoONOFF(void); diff --git a/master/x86_64-support.patch b/master/x86_64-support.patch new file mode 100644 index 0000000..f4fc9c5 --- /dev/null +++ b/master/x86_64-support.patch @@ -0,0 +1,37 @@ +diff --git a/sysdefs.h b/sysdefs.h +index d145cd5..31b08b1 100644 +--- a/sysdefs.h ++++ b/sysdefs.h +@@ -526,6 +526,32 @@ typedef unsigned long Card64; + + #endif /* __alpha */ + ++ ++#ifdef __x86_64 ++#define ARCHPRNAME "x86_64" ++ ++#ifdef __linux__ ++#define ARCHSYSNAME "unknown-linux" ++#define DEFSMADE ++#define OPENRDMODE "r" ++#define OPENWRMODE "w" ++#define OPENUPMODE "r+" ++#define IEEEFLOAT ++typedef signed char Integ8; ++typedef unsigned char Card8; ++typedef signed short Integ16; ++typedef unsigned short Card16; ++#define HAS16 ++typedef signed int Integ32; ++typedef unsigned int Card32; ++typedef signed long Integ64; ++typedef unsigned long Card64; ++#define HAS64 ++#define LOCALE_NLS ++#endif ++ ++#endif /* __x86_64 */ ++ + /*===========================================================================*/ + /* Intel i386 platforms */ + -- cgit v1.2.3