]> git.sur5r.net Git - cc65/commitdiff
Merge pull request #80 from AntiheroSoftware/ca65-65816
authorOliver Schmidt <ol.sc@web.de>
Mon, 17 Feb 2014 09:04:57 +0000 (10:04 +0100)
committerOliver Schmidt <ol.sc@web.de>
Mon, 17 Feb 2014 09:04:57 +0000 (10:04 +0100)
Fixing ca65 for 65816 jml and jmp opcodes

1  2 
src/ca65/instr.c

diff --combined src/ca65/instr.c
index 777affdee177fead002a19b7eba440d76f6ca3a5,73fd83a7821f55e5b056458e996dc1f1bb7802ba..54e09b5016614b6322c99baaa08b3c4536551d89
@@@ -516,8 -516,8 +516,8 @@@ static const struct 
          { "INC",  0x000006F, 0x00, 4, PutAll },
          { "INX",  0x0000001, 0xe8, 0, PutAll },
          { "INY",  0x0000001, 0xc8, 0, PutAll },
-         { "JML",  0x0000810, 0x5c, 1, PutAll },
-         { "JMP",  0x0010818, 0x4c, 6, PutAll },
+         { "JML",  0x4000010, 0x5c, 1, PutAll },
+         { "JMP",  0x4010818, 0x4c, 6, PutAll },
          { "JSL",  0x0000010, 0x20, 7, PutAll },
          { "JSR",  0x0010018, 0x20, 7, PutAll },
          { "LDA",  0x0b8f6fc, 0xa0, 0, PutAll },
      }
  };
  
 -#ifdef SUNPLUS
 -/* Table for the SUNPLUS CPU */
 -#include "sunplus.inc"
 -#endif
 -
  /* Instruction table for the SWEET16 pseudo CPU */
  static const struct {
      unsigned Count;
@@@ -776,6 -781,11 +776,6 @@@ static const InsTable* InsTabs[CPU_COUN
      (const InsTable*) &InsTab65SC02,
      (const InsTable*) &InsTab65C02,
      (const InsTable*) &InsTab65816,
 -#ifdef SUNPLUS
 -    (const InsTable*) &InsTabSunPlus,
 -#else
 -    0,
 -#endif
      (const InsTable*) &InsTabSweet16,
      (const InsTable*) &InsTabHuC6280,
      0,                                  /* Mitsubishi 740 */
@@@ -790,61 -800,61 +790,61 @@@ static unsigned char EATab[10][AM65I_CO
          0x00, 0x00, 0x05, 0x0D, 0x0F, 0x15, 0x1D, 0x1F,
          0x00, 0x19, 0x12, 0x00, 0x07, 0x11, 0x17, 0x01,
          0x00, 0x00, 0x00, 0x03, 0x13, 0x09, 0x00, 0x09,
-         0x00, 0x00
+         0x00, 0x00, 0x00
      },
      {   /* Table 1 */
          0x08, 0x08, 0x04, 0x0C, 0x00, 0x14, 0x1C, 0x00,
          0x14, 0x1C, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x70
      },
      {   /* Table 2 */
          0x00, 0x00, 0x24, 0x2C, 0x0F, 0x34, 0x3C, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x00
      },
      {   /* Table 3 */
          0x3A, 0x3A, 0xC6, 0xCE, 0x00, 0xD6, 0xDE, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x00
      },
      {   /* Table 4 */
          0x1A, 0x1A, 0xE6, 0xEE, 0x00, 0xF6, 0xFE, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x00
      },
      {   /* Table 5 */
          0x00, 0x00, 0x60, 0x98, 0x00, 0x70, 0x9E, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x00
      },
      {   /* Table 6 */
          0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
-         0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
-         0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x30, 0x00,
+         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+         0x00, 0x00, 0x90
      },
      {   /* Table 7 */
          0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
          0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x00
      },
      {   /* Table 8 */
          0x00, 0x40, 0x01, 0x41, 0x00, 0x09, 0x49, 0x00,
          0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x00
      },
      {   /* Table 9 */
          0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x30, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-         0x00, 0x00
+         0x00, 0x00, 0x00
      },
  };
  
@@@ -888,6 -898,7 +888,7 @@@ unsigned char ExtBytes[AM65I_COUNT] = 
      1,          /* Immidiate byte */
      2,          /* Blockmove (65816) */
      7,          /* Block transfer (HuC6280) */
+     2,          /* Absolute Indirect long */
  };
  
  /* Table that encodes the additional bytes for each SWEET16 instruction */