]> git.sur5r.net Git - cc65/commitdiff
BIT encoding was wrong for the 65SC02 in immidiate addressing mode
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 11 Aug 2000 20:15:44 +0000 (20:15 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 11 Aug 2000 20:15:44 +0000 (20:15 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@268 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/instr.c
src/ca65/instr.h

index 553296471d0db506f012baa2556b415f1220be26..4586e21e1b6b7a3d86e635e6a5e884400eb190ff 100644 (file)
@@ -149,7 +149,7 @@ static const struct {
        { "BCC", 0x0020000, 0x90, 0, PutPCRel8 },
        { "BCS", 0x0020000, 0xb0, 0, PutPCRel8 },
        { "BEQ", 0x0020000, 0xf0, 0, PutPCRel8 },
-       { "BIT", 0x080006C, 0x00, 2, PutAll },
+       { "BIT", 0x0A0006C, 0x00, 2, PutAll },
        { "BMI", 0x0020000, 0x30, 0, PutPCRel8 },
        { "BNE", 0x0020000, 0xd0, 0, PutPCRel8 },
        { "BPL", 0x0020000, 0x10, 0, PutPCRel8 },
index 7d30dd409747a60a28e4417ca3ed2eb5c21f0696..a23d25fe9fa5414fb74d15f16a0b5a0c75c22291 100644 (file)
@@ -82,7 +82,10 @@ enum CPUType {
 #define AM_REL_LONG                    0x00040000UL
 #define AM_STACK_REL           0x00080000UL
 #define AM_STACK_REL_IND_Y     0x00100000UL
-#define AM_IMM                 0x00E00000UL
+#define AM_IMM_ACCU            0x00200000UL
+#define AM_IMM_INDEX           0x00400000UL
+#define AM_IMM_IMPLICIT                0x00800000UL
+#define AM_IMM                 (AM_IMM_ACCU | AM_IMM_INDEX | AM_IMM_IMPLICIT)
 #define AM_BLOCKMOVE                   0x01000000UL
 
 /* Bitmask for all ZP operations that have correspondent ABS ops */