mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-10 10:29:43 +00:00
Add test for ASLA inherent.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
7719c8e875
commit
f2b9ab0814
@ -85,3 +85,22 @@ TEST_CASE("Logical AND Accumulator", "[AND][ANDA]") {
|
||||
REQUIRE(cpu.cycles() == 2);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Shift Accumulator or Memory Byte Left", "[ASL][ASLA]") {
|
||||
|
||||
Board board;
|
||||
board.initialise();
|
||||
auto& cpu = board.CPU();
|
||||
cpu.step(); // Step over the reset
|
||||
|
||||
SECTION("Inherent") {
|
||||
board.poke(0, 0x48);
|
||||
cpu.A() = 0x7a;
|
||||
cpu.step();
|
||||
REQUIRE(cpu.A() == 0xf4);
|
||||
REQUIRE((cpu.CC() & EightBit::mc6809::ZF) == 0);
|
||||
REQUIRE((cpu.CC() & EightBit::mc6809::VF) != 0);
|
||||
REQUIRE((cpu.CC() & EightBit::mc6809::NF) != 0);
|
||||
REQUIRE(cpu.cycles() == 2);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user