From ebed04f6b220d55c081ba693d1d00cfcdc4b85af Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 11 Aug 2000 20:15:44 +0000 Subject: [PATCH] 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 --- src/ca65/instr.c | 2 +- src/ca65/instr.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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 */ -- 2.39.5