More instruction tests
parent
5b1aee887b
commit
cd959b80f7
|
@ -116,4 +116,22 @@ int main(int argc, char **argv)
|
||||||
test_alu_instruction_vf(0xA4, 0x00, 0x812E, (0xA4<<1)&0xFF, 0x01);
|
test_alu_instruction_vf(0xA4, 0x00, 0x812E, (0xA4<<1)&0xFF, 0x01);
|
||||||
printf("SHL (zero) ");
|
printf("SHL (zero) ");
|
||||||
test_alu_instruction_vf(0x24, 0x00, 0x812E, (0x24<<1)&0xFF, 0x00);
|
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");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue