diff --git a/NOVA/eclipse_cpu.c b/NOVA/eclipse_cpu.c index 0532da3b..8c0b8166 100644 --- a/NOVA/eclipse_cpu.c +++ b/NOVA/eclipse_cpu.c @@ -3625,7 +3625,7 @@ if ((IR & 0100017) == 0100010) { /* This pattern for all PC = (PC + 1) & AMASK; continue; } - if ((IR & 0103777) == 0100650) { /* FDD Div double by AC */ + if ((IR & 0103777) == 0100750) { /* FDD Div double by AC */ if (!(fpu_unit.flags & UNIT_UP)) continue; if (Debug_Flags == 1) { @@ -3680,7 +3680,7 @@ if ((IR & 0100017) == 0100010) { /* This pattern for all FPSR |= ((PC - 1) & AMASK); continue; } - if ((IR & 0103777) == 0101650) { /* FDMD Div double by memory */ + if ((IR & 0103777) == 0101750) { /* FDMD Div double by memory */ if (!(fpu_unit.flags & UNIT_UP)) continue; if (Debug_Flags == 1) { diff --git a/swtp6800/common/m6800.c b/swtp6800/common/m6800.c index ba3c8609..f65d6277 100644 --- a/swtp6800/common/m6800.c +++ b/swtp6800/common/m6800.c @@ -88,10 +88,10 @@ /* Macros to handle the flags in the CCR */ #define CCR_ALWAYS_ON (0xC0) /* for 6800 */ #define CCR_MSK (HF|IF|NF|ZF|VF|CF) -#define TOGGLE_FLAG(FLAG) ((CCR) ^= FLAG) -#define SET_FLAG(FLAG) ((CCR) |= FLAG) -#define CLR_FLAG(FLAG) ((CCR) &= ~FLAG) -#define GET_FLAG(FLAG) ((CCR) & FLAG) +#define TOGGLE_FLAG(FLAG) (CCR ^= (FLAG)) +#define SET_FLAG(FLAG) (CCR |= (FLAG)) +#define CLR_FLAG(FLAG) (CCR &= ~(FLAG)) +#define GET_FLAG(FLAG) (CCR & (FLAG)) #define COND_SET_FLAG(COND,FLAG) \ if (COND) SET_FLAG(FLAG); else CLR_FLAG(FLAG) #define COND_SET_FLAG_N(VAR) \