]> git.sur5r.net Git - cc65/commitdiff
added support for ane, sha, shs, shy, shx
authormrdudz <mrdudz@users.noreply.github.com>
Wed, 19 Nov 2014 21:34:33 +0000 (22:34 +0100)
committermrdudz <mrdudz@users.noreply.github.com>
Wed, 19 Nov 2014 21:34:33 +0000 (22:34 +0100)
src/ca65/instr.c
testcode/assembler/illegal.s

index 9270f5601529b262c92aa93d939c12ccaad660c1..6e31896ea2943bf0bfbd30d20be7ea9730f70117 100644 (file)
@@ -215,7 +215,7 @@ static const struct {
 /* Instruction table for the 6502 with illegal instructions */
 static const struct {
     unsigned Count;
-    InsDesc  Ins[70];
+    InsDesc  Ins[75];
 } InsTab6502X = {
     sizeof (InsTab6502X.Ins) / sizeof (InsTab6502X.Ins[0]),
     {
@@ -223,6 +223,7 @@ static const struct {
         { "ALR",  0x0800000, 0x4B, 0, PutAll },         /* X */
         { "ANC",  0x0800000, 0x0B, 0, PutAll },         /* X */
         { "AND",  0x080A26C, 0x20, 0, PutAll },
+        { "ANE",  0x0800000, 0x8B, 0, PutAll },         /* X */
         { "ARR",  0x0800000, 0x6B, 0, PutAll },         /* X */
         { "ASL",  0x000006e, 0x02, 1, PutAll },
         { "AXS",  0x0800000, 0xCB, 0, PutAll },         /* X */
@@ -278,6 +279,10 @@ static const struct {
         { "SEC",  0x0000001, 0x38, 0, PutAll },
         { "SED",  0x0000001, 0xf8, 0, PutAll },
         { "SEI",  0x0000001, 0x78, 0, PutAll },
+        { "SHA",  0x0002200, 0x93, 1, PutAll },         /* X */
+        { "SHS",  0x0000200, 0x9b, 0, PutAll },         /* X */
+        { "SHX",  0x0000200, 0x9e, 1, PutAll },         /* X */
+        { "SHY",  0x0000040, 0x9c, 1, PutAll },         /* X */
         { "SLO",  0x000A26C, 0x03, 0, PutAll },         /* X */
         { "SRE",  0x000A26C, 0x43, 0, PutAll },         /* X */
         { "STA",  0x000A26C, 0x80, 0, PutAll },
index 5145e31e5b769fa6c8adabd0c56357bc24912683..51d40afa7d3b3661ec4e4fe5bc0e2440d8e8bd86 100644 (file)
@@ -1,7 +1,7 @@
 
         .setcpu         "6502X"
 
-; first all totally staple undocs:
+; first all totally stable undocs:
 
         slo $12             ; 07 12
         slo $1234           ; 0f 34 12
@@ -65,7 +65,7 @@
 
 
         anc #$12            ; 0b 12
-        ;anc #$12            ; 2b 12
+        ;anc #$12           ; 2b 12
 
         arr #$12            ; 6b 12
 
 ;        nop                 ; da
 
 ;        jam                 ; 02
-;        jam                 ; 12
-;        jam                 ; 22
-;        jam                 ; 32
-;        jam                 ; 42
-;        jam                 ; 52
-;        jam                 ; 62
-;        jam                 ; 72
-;        jam                 ; 92
-;        jam                 ; b2
-;        jam                 ; d2
-;        jam                 ; f2
+        ;jam                ; 12
+        ;jam                ; 22
+        ;jam                ; 32
+        ;jam                ; 42
+        ;jam                ; 52
+        ;jam                ; 62
+        ;jam                ; 72
+        ;jam                ; 92
+        ;jam                ; b2
+        ;jam                ; d2
+        ;jam                ; f2
 
         ;sbc #$12           ; eb 12
 
-; and the so called "unstable" ones:
+; and the so-called "unstable" ones:
 
-        las $1234,y         ; bb 34 12
-
-;        sha $1234,y         ; 9f 34 12
-;        sha ($12),y         ; 93 12
-
-;        shs $1234,y         ; 9b 34 12
+        sha ($12),y         ; 93 12
+        sha $1234,y         ; 9f 34 12
 
-;        shx $1234,y         ; 9e 34 12
+        shx $1234,y         ; 9e 34 12
+        shy $1234,x         ; 9c 34 12
 
-;        shy $1234,x         ; 9c 34 12
+        shs $1234,y         ; 9b 34 12
+        las $1234,y         ; bb 34 12
 
 ; the two "highly unstable" ones:
 
 ;        lax #$12            ; ab 12
 
-;        ane #$12            ; 8b 12
-
+        ane #$12            ; 8b 12