From: cuz Date: Fri, 11 Aug 2000 20:15:44 +0000 (+0000) Subject: BIT encoding was wrong for the 65SC02 in immidiate addressing mode X-Git-Tag: V2.12.0~3251 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ebed04f6b220d55c081ba693d1d00cfcdc4b85af;p=cc65 BIT encoding was wrong for the 65SC02 in immidiate addressing mode git-svn-id: svn://svn.cc65.org/cc65/trunk@268 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/instr.c b/src/ca65/instr.c index 553296471..4586e21e1 100644 --- a/src/ca65/instr.c +++ b/src/ca65/instr.c @@ -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 }, diff --git a/src/ca65/instr.h b/src/ca65/instr.h index 7d30dd409..a23d25fe9 100644 --- a/src/ca65/instr.h +++ b/src/ca65/instr.h @@ -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 */