diff --git a/test_main.cpp b/test_main.cpp index 82e1a78..71a20f6 100644 --- a/test_main.cpp +++ b/test_main.cpp @@ -116,4 +116,22 @@ int main(int argc, char **argv) test_alu_instruction_vf(0xA4, 0x00, 0x812E, (0xA4<<1)&0xFF, 0x01); printf("SHL (zero) "); test_alu_instruction_vf(0x24, 0x00, 0x812E, (0x24<<1)&0xFF, 0x00); + + printf("PC increment: "); + reset(); + run_instruction(0x0000); // NOP + step3(); + if (top->v->pc != 0x2) + printf(" FAIL!\n"); + else + printf(" OK.\n"); + + printf("JMP imm INS 1456: "); + reset(); + run_instruction(0x1456); + step3(); + if (top->v->pc != 0x456) + printf(" FAIL!\n"); + else + printf(" OK.\n"); }