The debug_break check was moved outside of the mos6502_execute function

This commit is contained in:
Peter Evans 2018-04-13 23:34:28 -05:00
parent 04e72486f1
commit 3834c1e112
1 changed files with 14 additions and 3 deletions

View File

@ -194,11 +194,22 @@ Test(apple2_debug, break)
mos6502_set(mach->cpu, 2, 0xEA);
mos6502_set(mach->cpu, 3, 0xEA);
mos6502_execute(mach->cpu);
if (!apple2_debug_broke(mach->cpu->PC)) {
mos6502_execute(mach->cpu);
}
cr_assert_eq(mach->cpu->PC, 1);
mos6502_execute(mach->cpu);
if (!apple2_debug_broke(mach->cpu->PC)) {
mos6502_execute(mach->cpu);
}
cr_assert_eq(mach->cpu->PC, 2);
mos6502_execute(mach->cpu);
if (!apple2_debug_broke(mach->cpu->PC)) {
mos6502_execute(mach->cpu);
}
cr_assert_eq(mach->cpu->PC, 2);
}