mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-11 18:49:16 +00:00
More comprehensive decimal ADC test.
This commit is contained in:
parent
23105b4861
commit
78b6ddc286
@ -1192,6 +1192,12 @@ ATF_TC_BODY(emul_adc_bcd, tc)
|
||||
|
||||
ATF_CHECK(bus_read_1(&b, 0x10) == 0x05);
|
||||
ATF_CHECK(bus_read_1(&b, 0x11) & P_CARRY);
|
||||
ATF_CHECK(bus_read_1(&b, 0x20) == 0x46);
|
||||
ATF_CHECK(!(bus_read_1(&b, 0x21) & P_CARRY));
|
||||
ATF_CHECK(bus_read_1(&b, 0x30) == 0x41);
|
||||
ATF_CHECK(!(bus_read_1(&b, 0x31) & P_CARRY));
|
||||
ATF_CHECK(bus_read_1(&b, 0x40) == 0x73);
|
||||
ATF_CHECK(bus_read_1(&b, 0x41) & P_CARRY);
|
||||
|
||||
rk65c02_dump_regs(&e);
|
||||
|
||||
|
@ -8,5 +8,32 @@ start: sed
|
||||
plx
|
||||
stx 0x11
|
||||
|
||||
sed
|
||||
clc
|
||||
lda #0x12
|
||||
adc #0x34
|
||||
sta 0x20
|
||||
php
|
||||
plx
|
||||
stx 0x21
|
||||
|
||||
sed
|
||||
clc
|
||||
lda #0x15
|
||||
adc #0x26
|
||||
sta 0x30
|
||||
php
|
||||
plx
|
||||
stx 0x31
|
||||
|
||||
sed
|
||||
clc
|
||||
lda #0x81
|
||||
adc #0x92
|
||||
sta 0x40
|
||||
php
|
||||
plx
|
||||
stx 0x41
|
||||
|
||||
stp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user