arduino-appleii/6502tests/test/testBvc.c
Damian Peckett 2798ae6d16 First Commit
Uploading Current Source To Github
2015-04-08 17:14:01 +10:00

21 lines
349 B
C

int testBvcImplied() {
SR |= SR_OVER;
SR &= (~SR_DEC);
ram[0] = 0x50;
ram[1] = 0x01;
ram[2] = 0x00;
ram[3] = 0xF8; //SED
instructions = 4; run();
if(SR&SR_DEC) return -1;
SR &= (~SR_OVER);
SR &= (~SR_DEC);
ram[0] = 0x50;
ram[1] = 0x01;
ram[2] = 0x00;
ram[3] = 0xF8;
instructions = 4; run();
if(!(SR&SR_DEC)) return -2;
return 0;
}