1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2024-12-11 18:49:16 +00:00

Add missing test cases for LDA.

This commit is contained in:
Radosław Kujawa 2019-01-08 13:57:10 +01:00
parent ed39eff773
commit e3714fe805
3 changed files with 19 additions and 0 deletions

View File

@ -429,6 +429,19 @@ ATF_TC_BODY(emul_lda, tc)
ATF_REQUIRE(rom_start(&e, "test_emulation_lda_zp.rom", tc));
ATF_CHECK(e.regs.A == 0xAE);
/* LDA zero page X */
bus_write_1(&b, 0x12, 0xAF);
e.regs.X = 0x1;
ATF_REQUIRE(rom_start(&e, "test_emulation_lda_zpx.rom", tc));
ATF_CHECK(e.regs.A == 0xAF);
/* LDA indirect zero page */
bus_write_1(&b, 0x1A, 0x10);
bus_write_1(&b, 0x1B, 0x2E);
bus_write_1(&b, 0x2E10, 0xAA);
ATF_REQUIRE(rom_start(&e, "test_emulation_lda_izp.rom", tc));
ATF_CHECK(e.regs.A == 0xAA);
/* LDA indirect zero page X */
bus_write_1(&b, 0x20, 0);
bus_write_1(&b, 0x21, 0x2E);

View File

@ -0,0 +1,3 @@
start: lda (0x1A)
stp

View File

@ -0,0 +1,3 @@
start: lda 0x11,X
stp