Properly model 6502's BRK opcode.

This commit is contained in:
Alessandro Gatti 2019-09-24 02:23:13 +02:00
parent cbf4c9d34a
commit 8ce6d9c227

View File

@ -189,7 +189,12 @@ ADDRI: imm16 is imm16 { tmp:2 = imm16; export *:2 tmp; }
:BRK is op=0x00
{
goto inst_start;
*:2 (SP - 1) = inst_next;
SP = SP - 2;
B = 1;
pushSR();
I = 1;
goto 0xFFFE;
}
:BVC REL is op=0x50; REL