summaryrefslogtreecommitdiffstats
path: root/master/timex-pseudo-instructions.patch
diff options
context:
space:
mode:
Diffstat (limited to 'master/timex-pseudo-instructions.patch')
-rw-r--r--master/timex-pseudo-instructions.patch79
1 files changed, 75 insertions, 4 deletions
diff --git a/master/timex-pseudo-instructions.patch b/master/timex-pseudo-instructions.patch
index 6e5ba04..0a64f57 100644
--- a/master/timex-pseudo-instructions.patch
+++ b/master/timex-pseudo-instructions.patch
@@ -1,8 +1,8 @@
diff --git a/code6805.c b/code6805.c
-index 0a087af..54a9e92 100644
+index b89161e..9630e3b 100644
--- a/code6805.c
+++ b/code6805.c
-@@ -392,6 +392,8 @@ BEGIN
+@@ -393,6 +393,8 @@ BEGIN
if (DecodePseudo()) return;
@@ -12,10 +12,79 @@ index 0a087af..54a9e92 100644
/* Anweisungen ohne Argument */
diff --git a/codepseudo.c b/codepseudo.c
-index 8d474de..f655f3d 100644
+index 8d474de..817cc93 100644
--- a/codepseudo.c
+++ b/codepseudo.c
-@@ -761,6 +761,373 @@ BEGIN
+@@ -639,6 +639,68 @@ BEGIN
+ END
+ END
+
++ static void DecodeWRD(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,Int16))
++ BEGIN
++ WrError(1320); OK=False;
++ END
++ else if (CodeLen+(2*Rep)>MaxCodeLen)
++ BEGIN
++ WrError(1920); OK=False;
++ END
++ else
++ for (z2=0; z2<Rep; z2++)
++ BEGIN
++ if (M16Turn)
++ BEGIN
++ BAsmCode[CodeLen++]=Hi(t.Contents.Int);
++ BAsmCode[CodeLen++]=Lo(t.Contents.Int);
++ END
++ else
++ BEGIN
++ BAsmCode[CodeLen++]=Lo(t.Contents.Int);
++ BAsmCode[CodeLen++]=Hi(t.Contents.Int);
++ END
++ END
++ break;
++ case TempFloat:
++ WrError(1135); OK=False;
++ break;
++ case TempString:
++ WrError(1135); OK=False;
++ break;
++ default:
++ OK=False;
++ break;
++ END
++ END
++ z++;
++ END
++ while ((z<=ArgCnt) AND (OK));
++ if (NOT OK) CodeLen=0;
++ END
++END
++
+ static void DecodeADR(Word Index)
+ BEGIN
+ int z;
+@@ -761,6 +823,375 @@ BEGIN
return LookupInstTable(InstTable,OpPart);
END
@@ -249,6 +318,7 @@ index 8d474de..f655f3d 100644
+
+ case 'i':
+ case 'I':
++ return 0x1;
+ case ':':
+ return 0x12;
+ case 'l':
@@ -377,6 +447,7 @@ index 8d474de..f655f3d 100644
+ BEGIN
+ InstTable=CreateInstTable(17);
+ AddInstTable(InstTable,"DB",0,DecodeBYT);
++ AddInstTable(InstTable,"DW",0,DecodeWRD);
+ AddInstTable(InstTable,"TIMEX",0,DecodeTIMEX);
+ AddInstTable(InstTable,"TIMEX6",0,DecodeTIMEX6);
+ END