2 ms·
One cool thing about this is that there are places where old compilers feared to tread, on the 6502 for example any opcode (apart from $A2, LDX #imm) ending in
by spacedcowboy 5mo ago
One cool thing about this is that there are places where old compilers feared to tread, on the 6502 for example any opcode (apart from $A2, LDX #imm) ending in 2 would be a JAM instruction - CPU just stops. The later CMOS versions still did that for most of the $x2 instructions but some were converted to NOP.
So if you're implementing a 6502 in an FPGA, and you want to add (say) stack-relative addressing, there's a nice set of opcodes that you know won't ever be in conflict with the usual ones, because any 6502 ever issuing it would immediately halt (but not catch fire).