3 ms·
You can convert from an opcode to an index into a lookup table of mnemonics quite efficiently, and vice versa. You can also pack a single three character mnemo
by ectopod 5y ago
You can convert from an opcode to an index into a lookup table of mnemonics quite efficiently, and vice versa. You can also pack a single three character mnemonic into two bytes, so the lookup table may be hard to spot. Assemblers and disassemblers running on 6502 used to do this because space was at a premium.
- vidarh 5y agoNow I want to golf a 6502 opcode -> mnemonic decoder... Not that I have any use for one.