Skip to content

Ghidra is a software reverse engineering (SRE) framework

Properly model 6502's BRK opcode.

Alessandro Gatti8ce6d9c22700
diff --git a/Ghidra/Processors/6502/data/languages/6502.slaspec b/Ghidra/Processors/6502/data/languages/6502.slaspec
index 902c71f0a3..d2bbf6b7c9 100644
--- a/Ghidra/Processors/6502/data/languages/6502.slaspec
+++ b/Ghidra/Processors/6502/data/languages/6502.slaspec
@@ -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