mirror of
https://github.com/cc65/cc65.git
synced 2024-12-21 20:29:24 +00:00
sim65: changes constant of the unstable "ANE" instruction to comply with 65x02 test suite.
ANE (0x8b) is an unstable illegal opcode that depends on a "constant" value that isn't really constant. It varies between machines, with temperature, and so on. Original sim65 behavior was to use the constant value 0xEF. To get the behavior in line with the 65x02 testsuite, we now use the value 0xEE instead, which is also a reasonable choice that can be observed in practice.
This commit is contained in:
parent
c52d7b27e6
commit
b14f883e73
@ -969,8 +969,14 @@ static unsigned HaveIRQRequest;
|
|||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
/* ANE */
|
/* ANE */
|
||||||
|
/* An "unstable" illegal opcode that depends on a "constant" value that isn't
|
||||||
|
* really constant. It varies between machines, with temperature, and so on.
|
||||||
|
* Original sim65 behavior was to use the constant 0xEF here. To get behavior
|
||||||
|
* in line with the 65x02 testsuite, we now use the value 0xEE instead,
|
||||||
|
* which is also a reasonable choice that can be observed in practice.
|
||||||
|
*/
|
||||||
#define ANE(Val) \
|
#define ANE(Val) \
|
||||||
Val = (Regs.AC | 0xEF) & Regs.XR & Val; \
|
Val = (Regs.AC | 0xEE) & Regs.XR & Val; \
|
||||||
Regs.AC = Val; \
|
Regs.AC = Val; \
|
||||||
TEST_SF (Val); \
|
TEST_SF (Val); \
|
||||||
TEST_ZF (Val)
|
TEST_ZF (Val)
|
||||||
|
Loading…
Reference in New Issue
Block a user