mirror of
https://github.com/rkujawa/rk65c02.git
synced 2024-12-22 15:31:12 +00:00
Add missing test cases for STZ.
This commit is contained in:
parent
69fb59ee41
commit
84f4c530d8
@ -472,11 +472,28 @@ ATF_TC_BODY(emul_stz, tc)
|
||||
b = bus_init_with_default_devs();
|
||||
e = rk65c02_init(&b);
|
||||
|
||||
/* STZ zp */
|
||||
/* STZ zero page */
|
||||
bus_write_1(&b, 0x10, 0xAA);
|
||||
ATF_REQUIRE(rom_start(&e, "test_emulation_stz_zp.rom", tc));
|
||||
ATF_CHECK(bus_read_1(&b, 0x10) == 0x00);
|
||||
|
||||
/* STZ zero page X */
|
||||
bus_write_1(&b, 0x15, 0x55);
|
||||
e.regs.X = 0x4;
|
||||
ATF_REQUIRE(rom_start(&e, "test_emulation_stz_zpx.rom", tc));
|
||||
ATF_CHECK(bus_read_1(&b, 0x15) == 0x00);
|
||||
|
||||
/* STZ absolute */
|
||||
bus_write_1(&b, 0x2000, 0xAA);
|
||||
ATF_REQUIRE(rom_start(&e, "test_emulation_stz_abs.rom", tc));
|
||||
ATF_CHECK(bus_read_1(&b, 0x2000) == 0x00);
|
||||
|
||||
/* STZ absolute X */
|
||||
bus_write_1(&b, 0x2005, 0x55);
|
||||
e.regs.X = 0x1;
|
||||
ATF_REQUIRE(rom_start(&e, "test_emulation_stz_absx.rom", tc));
|
||||
ATF_CHECK(bus_read_1(&b, 0x2005) == 0x00);
|
||||
|
||||
bus_finish(&b);
|
||||
}
|
||||
|
||||
|
3
test/test_emulation_stz_abs.s
Normal file
3
test/test_emulation_stz_abs.s
Normal file
@ -0,0 +1,3 @@
|
||||
start: stz 0x2000
|
||||
stp
|
||||
|
3
test/test_emulation_stz_absx.s
Normal file
3
test/test_emulation_stz_absx.s
Normal file
@ -0,0 +1,3 @@
|
||||
start: stz 0x2004,X
|
||||
stp
|
||||
|
3
test/test_emulation_stz_zpx.s
Normal file
3
test/test_emulation_stz_zpx.s
Normal file
@ -0,0 +1,3 @@
|
||||
start: stz 0x11,X
|
||||
stp
|
||||
|
Loading…
Reference in New Issue
Block a user