mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-11-15 16:06:38 +00:00
Implement much better test case for decimal mode.
This commit is contained in:
parent
630daee702
commit
7dd511b7dd
@ -1190,7 +1190,9 @@ ATF_TC_BODY(emul_adc_bcd, tc)
|
||||
|
||||
ATF_REQUIRE(rom_start(&e, "test_emulation_adc_bcd.rom", tc));
|
||||
|
||||
ATF_CHECK(e.regs.A == 0x21);
|
||||
ATF_CHECK(bus_read_1(&b, 0x10) == 0x05);
|
||||
ATF_CHECK(bus_read_1(&b, 0x11) & P_CARRY);
|
||||
|
||||
rk65c02_dump_regs(&e);
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,12 @@
|
||||
; somewhat inspired by http://www.6502.org/tutorials/decimal_mode.html
|
||||
start: sed
|
||||
lda #0x11
|
||||
adc #0x22
|
||||
sec
|
||||
lda #0x58
|
||||
adc #0x46
|
||||
sta 0x10
|
||||
php
|
||||
plx
|
||||
stx 0x11
|
||||
|
||||
stp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user