diff --git a/test/Makefile b/test/Makefile index afcd293..2854abf 100644 --- a/test/Makefile +++ b/test/Makefile @@ -13,6 +13,7 @@ TESTROMS=test_emulation_and_imm.rom \ test_emulation_php.rom test_emulation_plp.rom \ test_emulation_nop.rom \ test_emulation_lda_imm.rom test_emulation_lda_zp.rom \ + test_emulation_lda_abs.rom \ test_emulation_stz_zp.rom all : $(TESTS) $(TESTROMS) diff --git a/test/test_emulation.c b/test/test_emulation.c index ebb5963..bd3668d 100644 --- a/test/test_emulation.c +++ b/test/test_emulation.c @@ -100,6 +100,11 @@ ATF_TC_BODY(emul_lda, tc) ATF_REQUIRE(rom_start(&e, "test_emulation_lda_zp.rom")); ATF_CHECK(e.regs.A == 0xAE); + /* LDA absolute */ + bus_write_1(&b, 0x2F5A, 0xEA); + ATF_REQUIRE(rom_start(&e, "test_emulation_lda_abs.rom")); + ATF_CHECK(e.regs.A == 0xEA); + bus_finish(&b); } diff --git a/test/test_emulation_lda_abs.s b/test/test_emulation_lda_abs.s new file mode 100644 index 0000000..14aac28 --- /dev/null +++ b/test/test_emulation_lda_abs.s @@ -0,0 +1,3 @@ +start: lda 0x2F5A + stp +