Skip to content

Instantly share code, notes, and snippets.

# Table of instructions by opcode - name, addressing mode, cycles, bytes
_instruction_table = {
0x00: ["BRK", AddressingMode.IMPLIED, 7, 1],
0xA9: ["LDA", AddressingMode.I, 2, 2],
0x4C: ["JMP", AddressingMode.ABSOLUTE, 3, 3],
0xEA: ["NOP", AddressingMode.IMPLIED, 2, 1],
}
# Enum of all instruction names.
InstructionName = IntEnum("InstructionName", [(v[0], k) for k, v in _instruction_table.items()])

Keybase proof

I hereby claim:

  • I am jamesacraig on github.
  • I am jamiecraig (https://keybase.io/jamiecraig) on keybase.
  • I have a public key ASBkucg9Y1QUY9hjH8h6koHaVcXkY3xE3KFapK1qgtDlZAo

To claim this, I am signing this