We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I believe I've found a bug in ADC handling of N & Z flags in BCD mode:
the idea is to run this test:
; f8 38 a9 00 69 99 SED SEC LDA #$00 ADC #$99
So I run this piece of code:
from py65.devices.mpu65c02 import MPU as CMOS65C02 mpu = CMOS65C02() mpu.memory = 0x10000 * [0xEA] mpu.p |= mpu.DECIMAL mpu.p |= mpu.CARRY mpu.pc = 0x0000 mpu.a = 0 mpu.memory[0x0000]=0x69 mpu.memory[0x0001]=0x99 mpu.step()
which result in:
PC AC XR YR SP NV-BDIZC 65C02: 0002 00 00 00 ff 10111001
Accumulator is correctly set to 00 but the Z and N flags seem to have incorrect values.
00
Z
N
Running the same test in Easy6502 (https://skilldrick.github.io/easy6502/), and Visual6502 (http://www.visual6502.org/JSSim/expert.html) return:
NV-BDIZC A=$00 X=$00 Y=$00 00111011
so here N is not set (expected), and Z is set.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I believe I've found a bug in ADC handling of N & Z flags in BCD mode:
the idea is to run this test:
So I run this piece of code:
which result in:
Accumulator is correctly set to
00
but theZ
andN
flags seem to have incorrect values.Running the same test in Easy6502 (https://skilldrick.github.io/easy6502/), and Visual6502 (http://www.visual6502.org/JSSim/expert.html) return:
so here
N
is not set (expected), andZ
is set.The text was updated successfully, but these errors were encountered: