package core:rexcode/isa/mos6502

⌘K
Ctrl+K
or
/

    Overview

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    rexcode · Brendan Punsky (dotbmp@github), original author

    Types

    Address_Mode ¶

    Address_Mode :: enum u8 {
    	ZP,        // $nn
    	ZP_X,      // $nn,X
    	ZP_Y,      // $nn,Y
    	ABS,       // $nnnn
    	ABS_X,     // $nnnn,X
    	ABS_Y,     // $nnnn,Y
    	IND,       // ($nnnn) -- JMP only
    	IND_X,     // ($nn,X)
    	IND_Y,     // ($nn),Y
    	IND_ZP,    // ($nn) -- 65C02
    	IND_ABS_X, // ($nnnn,X) -- 65C02 JMP only
    }

    CPU ¶

    CPU :: enum u8 {
    	NMOS, 
    	NMOS_UNDOC, 
    	CMOS_65C02, 
    	HUC6280, 
    }

    Decode_Entry ¶

    Decode_Entry :: struct #packed {
    	mnemonic: Mnemonic,
    	// 2
    	ops:      [3]Operand_Type,
    	// 3
    	enc:      [3]Operand_Encoding,
    	// 3
    	opcode:   u8,
    	// 1
    	length:   u8,
    	// 1
    	cpu:      CPU,
    	// 1
    	flags:    Encoding_Flags,
    }
     

    One reverse-decode entry. Differs from Encoding: carries the instruction's total byte length and only [3] operand slots (no 6502 instruction uses 4).

    Decode_Index ¶

    Decode_Index :: struct #packed {
    	start: u16,
    	count: u16,
    }

    Encode_Run ¶

    Encode_Run :: struct {
    	start: u32,
    	count: u32,
    }
     

    Companion run index: ENCODE_RUNS[mnemonic] -> contiguous run in ENCODE_FORMS.

    Encoding ¶

    Encoding :: struct #packed {
    	mnemonic: Mnemonic,
    	// 2
    	ops:      [4]Operand_Type,
    	// 4
    	enc:      [4]Operand_Encoding,
    	// 4
    	opcode:   u8,
    	// 1
    	length:   u8,
    	// 1
    	cpu:      CPU,
    	// 1
    	flags:    Encoding_Flags,
    }
     

    A single instruction encoding form. The opcode byte is always at offset 0.

    ops/enc are [4] for cross-arch parity even though no real 6502 instruction uses more than 3 operands (HuC6280's block-transfer ops).

    Encoding_Flags ¶

    Encoding_Flags :: distinct bit_field u8 {
    	decimal:     bool | 1,
    	page_cross:  bool | 1,
    	branch:      bool | 1,
    	cond_branch: bool | 1,
    	_:           u8 | 4,
    }

    GP ¶

    GP :: enum u8 {
    	A = 0, 
    	X = 1, 
    	Y = 2, 
    }

    Instruction ¶

    Instruction :: struct #packed {
    	ops:           [3]Operand `fmt:"v,operand_count"`,
    	// 30 bytes
    	mnemonic:      Mnemonic,
    	// 2
    	operand_count: u8,
    	// 1
    	flags:         Instruction_Flags,
    	// 1
    	length:        u8,
    	// 1 (filled by decoder; 1..7)
    	_:             [1]u8,
    }

    Instruction_Flags ¶

    Instruction_Flags :: distinct bit_field u8 {
    	_: u8 | 8,
    }

    Instruction_Info ¶

    Instruction_Info :: struct {
    	offset:       u32,
    	decode_entry: u16,
    	_:            u16,
    }

    Memory ¶

    Memory :: struct #packed {
    	address: u16,
    	mode:    Address_Mode,
    	_:       u8,
    }

    Related Procedures With Returns

    Mnemonic ¶

    Mnemonic :: enum u16 {
    	INVALID = 0, 
    	// Arithmetic / logical
    	ADC, 
    	AND, 
    	ASL, 
    	BIT, 
    	CMP, 
    	CPX, 
    	CPY, 
    	DEC, 
    	DEX, 
    	DEY, 
    	EOR, 
    	INC, 
    	INX, 
    	INY, 
    	LSR, 
    	ORA, 
    	ROL, 
    	ROR, 
    	SBC, 
    	// Branches
    	BCC, 
    	BCS, 
    	BEQ, 
    	BMI, 
    	BNE, 
    	BPL, 
    	BVC, 
    	BVS, 
    	// Jumps / subroutines / interrupts
    	JMP, 
    	JSR, 
    	RTI, 
    	RTS, 
    	BRK, 
    	// Flag ops
    	CLC, 
    	CLD, 
    	CLI, 
    	CLV, 
    	SEC, 
    	SED, 
    	SEI, 
    	// Loads / stores
    	LDA, 
    	LDX, 
    	LDY, 
    	STA, 
    	STX, 
    	STY, 
    	// Stack / transfer
    	PHA, 
    	PHP, 
    	PLA, 
    	PLP, 
    	TAX, 
    	TAY, 
    	TSX, 
    	TXA, 
    	TXS, 
    	TYA, 
    	// NOP
    	NOP, 
    	LAX,         // LDA + LDX (load A and X from memory)
    	DCP,         // DEC + CMP (memory)
    	ISC,         // INC + SBC (also ISB)
    	RLA,         // ROL + AND
    	RRA,         // ROR + ADC
    	SLO,         // ASL + ORA
    	SRE,         // LSR + EOR
    	ALR,         // AND #imm + LSR A
    	ANC,         // AND #imm with carry from N
    	ARR,         // AND #imm + ROR A
    	AXS,         // X = (A AND X) - imm  (also SBX)
    	LAS,         // LDA / TSX / AND with stack pointer
    	ANE,         // A = (A | $EE) AND X AND imm  -- unstable (also XAA)
    	LXA,         // A = X = (A | $EE) AND imm    -- unstable
    	SHA,         // store A AND X AND high+1
    	SHX,         // store X AND high+1
    	SHY,         // store Y AND high+1
    	TAS,         // S = A AND X; store S AND high+1
    	JAM,         // halt the CPU (also KIL / HLT)
    	USBC,        // same as SBC #imm but at $EB (an undocumented alias)
    	DOP,         // double NOP (skips one operand byte)
    	TOP,         // triple NOP (skips two operand bytes)
    	BRA,         // branch always
    	INA,         // INC A
    	DEA,         // DEC A
    	PHX, 
    	PHY, 
    	PLX, 
    	PLY, 
    	STZ,         // store zero
    	TRB, 
    	TSB,         // test-and-reset / test-and-set bits
    	STP, 
    	WAI,         // WDC: stop, wait-for-interrupt
    	// 65C02 Rockwell bit ops -- 32 distinct opcodes
    	RMB0, 
    	RMB1, 
    	RMB2, 
    	RMB3, 
    	RMB4, 
    	RMB5, 
    	RMB6, 
    	RMB7, 
    	SMB0, 
    	SMB1, 
    	SMB2, 
    	SMB3, 
    	SMB4, 
    	SMB5, 
    	SMB6, 
    	SMB7, 
    	BBR0, 
    	BBR1, 
    	BBR2, 
    	BBR3, 
    	BBR4, 
    	BBR5, 
    	BBR6, 
    	BBR7, 
    	BBS0, 
    	BBS1, 
    	BBS2, 
    	BBS3, 
    	BBS4, 
    	BBS5, 
    	BBS6, 
    	BBS7, 
    	SXY,         // swap X, Y
    	SAX,         // swap A,X (HuC6280) / store A AND X (NMOS undocumented)
    	SAY,         // swap A, Y
    	CLA, 
    	CLX, 
    	CLY,         // clear A / X / Y
    	CSH, 
    	CSL,         // CPU speed high / low (7.16 MHz vs 1.79 MHz)
    	SET,         // set T flag (next op uses zp address as accumulator)
    	ST0, 
    	ST1, 
    	ST2,         // store immediate to MMR0/1/2
    	TAM, 
    	TMA,         // transfer A to/from MMR (immediate-selected)
    	TST,         // bit test of immediate against memory
    	BSR,         // branch to subroutine (PC-relative)
    	// HuC6280 block transfer instructions (7-byte encoding)
    	//   src(2) -> dst(2), len(2) bytes
    	TII,         // transfer increment-increment   (memcpy ascending)
    	TDD,         // transfer decrement-decrement   (memcpy descending)
    	TIN,         // transfer increment-no-change   (fill from src)
    	TIA,         // transfer increment-alternate   (interleaved)
    	TAI,         // transfer alternate-increment   (interleaved)
    }

    Related Procedures With Parameters

    Operand ¶

    Operand :: struct #packed {
    	using _: struct #raw_union {
    		reg:       Register,
    		// 2 bytes
    		mem:       Memory,
    		// 4 bytes
    		immediate: i64,
    		// 8 bytes
    		relative:  i64,
    	},
    	kind: Operand_Kind,
    	// 1
    	size: u8,
    }

    Related Procedures With Returns

    Operand_Encoding ¶

    Operand_Encoding :: enum u8 {
    	NONE, 
    	IMPL,        // implicit / accumulator -- no bytes emitted
    	BYTE_1_IMM,  // 8-bit immediate at offset 1
    	BYTE_1_ADDR, // 8-bit zero-page address at offset 1
    	BYTE_1_REL,  // signed 8-bit PC-rel at offset 1
    	WORD_1_ADDR, // 16-bit little-endian absolute at offset 1
    	BYTE_2_REL,  // signed 8-bit PC-rel at offset 2 (BBR/BBS)
    	WORD_1,      // 16-bit LE at offset 1 (HuC block xfer src)
    	WORD_3,      // 16-bit LE at offset 3 (HuC block xfer dst)
    	WORD_5,      // 16-bit LE at offset 5 (HuC block xfer len)
    	BYTE_2_ADDR, // 8-bit zero-page address at offset 2 (HuC TST # zp)
    	WORD_2_ADDR, // 16-bit LE absolute at offset 2 (HuC TST # abs)
    }
     

    Where the operand's bytes go inside the instruction word stream.

    Operand_Kind ¶

    Operand_Kind :: enum u8 {
    	NONE, 
    	REGISTER,  // mostly used for `A` in `ROL A` (implicit; rarely needed)
    	IMMEDIATE, 
    	MEMORY, 
    	RELATIVE,  // PC-relative target (label or raw byte offset)
    }

    Operand_Type ¶

    Operand_Type :: enum u8 {
    	NONE, 
    	A_IMPL,        // accumulator (e.g. ROL A) -- no operand bytes encoded
    	IMM_8,         // #$nn
    	REL,           // signed byte PC-rel branch target
    	MEM_ZP,        // $nn
    	MEM_ZP_X,      // $nn,X
    	MEM_ZP_Y,      // $nn,Y
    	MEM_ABS,       // $nnnn
    	MEM_ABS_X,     // $nnnn,X
    	MEM_ABS_Y,     // $nnnn,Y
    	MEM_IND,       // ($nnnn) -- NMOS/65C02 JMP only
    	MEM_IND_X,     // ($nn,X)
    	MEM_IND_Y,     // ($nn),Y
    	MEM_IND_ZP,    // ($nn) -- 65C02
    	MEM_IND_ABS_X, // ($nnnn,X) -- 65C02 JMP only
    	IMM_16,        // unsigned 16-bit literal (HuC6280 block xfer operands)
    }
     

    What the user passes in.

    Register ¶

    Register :: distinct u16

    Related Procedures With Parameters

    Related Constants

    Relocation ¶

    Relocation :: struct #packed {
    	offset:   u32,
    	label_id: u32,
    	addend:   i32,
    	type:     Relocation_Type,
    	size:     u8,
    	inst_idx: u16,
    }

    Relocation_Type ¶

    Relocation_Type :: enum u8 {
    	NONE  = 0, 
    	ABS16, 
    	REL8, 
    }

    Constants

    One row per constant, under the prefix it shares with others.

    A:: Register(REG_GP | 0)
    DEFAULT_PRINT_OPTIONS: rexcode_isa.Print_Options : isa.DEFAULT_PRINT_OPTIONS
    LABEL_UNDEFINED: rexcode_isa.Label_Definition : isa.LABEL_UNDEFINED
    MAX_INST_SIZE:: 7
    HuC6280 block transfer
    NONE:: Register(0xFFFF)
    P:: Register(REG_SYS | 1)
    PC:: Register(REG_SYS | 2)
    REG_… 3
    REG_GP:: 0x0100
    A / X / Y
    REG_NONE:: 0x0000
    REG_SYS:: 0x0200
    S / P / PC
    S:: Register(REG_SYS | 0)
    X:: Register(REG_GP | 1)
    Y:: Register(REG_GP | 2)

    Variables

    DECODE_ENTRIES ¶

    @(rodata)
    DECODE_ENTRIES: []Decode_Entry = …

    DECODE_INDEX_OPCODE ¶

    @(rodata)
    DECODE_INDEX_OPCODE: []Decode_Index = …

    ENCODE_FORMS ¶

    @(rodata)
    ENCODE_FORMS: []Encoding = …

    ENCODE_RUNS ¶

    @(rodata)
    ENCODE_RUNS: []Encode_Run = …

    Procedures

    One row per procedure, under the procedure groups they belong to; each is a proc "contextless" unless it says otherwise.

    aprintproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil, allocator := context.allocator) -> string
    aprintlnproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil, allocator := context.allocator) -> string
    bprintproc(buf: []u8, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil) -> string
    bprintlnproc(buf: []u8, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil) -> string
    decodeproc(data: []u8, relocs: []Relocation, instructions: ^[dynamic]Instruction, inst_info: ^[dynamic]Instruction_Info, label_defs: ^[dynamic]rexcode_isa.Label_Definition, errors: ^[dynamic]rexcode_isa.Error, cpu: CPU = .NMOS) -> (byte_count: u32, ok: bool)
    decode_estimate_instruction_count(data: []u8) -> int
    Typical-case estimate of the instruction count for data.

    Typical-case estimate of the instruction count for data.

    decode_max_instruction_count(data: []u8) -> int
    Instruction-count ceiling for data (shortest instruction is 1 byte).

    Instruction-count ceiling for data (shortest instruction is 1 byte).

    decode_reserveproc(instructions: ^[dynamic]Instruction, inst_info: ^[dynamic]Instruction_Info, label_defs: ^[dynamic]rexcode_isa.Label_Definition, data: []u8, exact: bool = false)
    Pre-size the caller's decode output arrays for data (reserves on top of any existing elements; nil to skip; exact=true for the ceiling, else the estimate).

    Pre-size the caller's decode output arrays for data (reserves on top of any existing elements; nil to skip; exact=true for the ceiling, else the estimate).

    emit_adc 2 forms
    emit_adc_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_adc_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_alrproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_alr_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_ancproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_anc_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_and 2 forms
    emit_and_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_and_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_aneproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_ane_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_arrproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_arr_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_asl 2 forms
    emit_asl_aproc(instructions: ^[dynamic]Instruction)
    emit_asl_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_axsproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_axs_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_bbr0proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr0_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr1proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr1_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr2proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr2_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr3proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr3_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr4proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr4_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr5proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr5_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr6proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr6_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr7proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbr7_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs0proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs0_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs1proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs1_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs2proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs2_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs3proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs3_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs4proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs4_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs5proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs5_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs6proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs6_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs7proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bbs7_zp_relproc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32)
    emit_bccproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bcc_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bcsproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bcs_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_beqproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_beq_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bit 2 forms
    emit_bit_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_bit_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_bmiproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bmi_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bneproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bne_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bplproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bpl_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_braproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bra_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_brkproc(instructions: ^[dynamic]Instruction)
    emit_brk_noneproc(instructions: ^[dynamic]Instruction)
    emit_bsrproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bsr_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bvcproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bvc_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bvsproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_bvs_relproc(instructions: ^[dynamic]Instruction, label_id: u32)
    emit_claproc(instructions: ^[dynamic]Instruction)
    emit_cla_noneproc(instructions: ^[dynamic]Instruction)
    emit_clcproc(instructions: ^[dynamic]Instruction)
    emit_clc_noneproc(instructions: ^[dynamic]Instruction)
    emit_cldproc(instructions: ^[dynamic]Instruction)
    emit_cld_noneproc(instructions: ^[dynamic]Instruction)
    emit_cliproc(instructions: ^[dynamic]Instruction)
    emit_cli_noneproc(instructions: ^[dynamic]Instruction)
    emit_clvproc(instructions: ^[dynamic]Instruction)
    emit_clv_noneproc(instructions: ^[dynamic]Instruction)
    emit_clxproc(instructions: ^[dynamic]Instruction)
    emit_clx_noneproc(instructions: ^[dynamic]Instruction)
    emit_clyproc(instructions: ^[dynamic]Instruction)
    emit_cly_noneproc(instructions: ^[dynamic]Instruction)
    emit_cmp 2 forms
    emit_cmp_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_cmp_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_cpx 2 forms
    emit_cpx_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_cpx_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_cpy 2 forms
    emit_cpy_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_cpy_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_cshproc(instructions: ^[dynamic]Instruction)
    emit_csh_noneproc(instructions: ^[dynamic]Instruction)
    emit_cslproc(instructions: ^[dynamic]Instruction)
    emit_csl_noneproc(instructions: ^[dynamic]Instruction)
    emit_dcpproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_dcp_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_deaproc(instructions: ^[dynamic]Instruction)
    emit_dea_aproc(instructions: ^[dynamic]Instruction)
    emit_dec 2 forms
    emit_dec_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_dec_aproc(instructions: ^[dynamic]Instruction)
    emit_dexproc(instructions: ^[dynamic]Instruction)
    emit_dex_noneproc(instructions: ^[dynamic]Instruction)
    emit_deyproc(instructions: ^[dynamic]Instruction)
    emit_dey_noneproc(instructions: ^[dynamic]Instruction)
    emit_dop 2 forms
    emit_dop_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_dop_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_eor 2 forms
    emit_eor_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_eor_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_inaproc(instructions: ^[dynamic]Instruction)
    emit_ina_aproc(instructions: ^[dynamic]Instruction)
    emit_inc 2 forms
    emit_inc_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_inc_aproc(instructions: ^[dynamic]Instruction)
    emit_inxproc(instructions: ^[dynamic]Instruction)
    emit_inx_noneproc(instructions: ^[dynamic]Instruction)
    emit_inyproc(instructions: ^[dynamic]Instruction)
    emit_iny_noneproc(instructions: ^[dynamic]Instruction)
    emit_iscproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_isc_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_jamproc(instructions: ^[dynamic]Instruction)
    emit_jam_noneproc(instructions: ^[dynamic]Instruction)
    emit_jmpproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_jmp_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_jsrproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_jsr_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_lasproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_las_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_laxproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_lax_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_lda 2 forms
    emit_lda_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_lda_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_ldx 2 forms
    emit_ldx_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_ldx_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_ldy 2 forms
    emit_ldy_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_ldy_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_lsr 2 forms
    emit_lsr_aproc(instructions: ^[dynamic]Instruction)
    emit_lsr_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_lxaproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_lxa_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_nopproc(instructions: ^[dynamic]Instruction)
    emit_nop_noneproc(instructions: ^[dynamic]Instruction)
    emit_ora 2 forms
    emit_ora_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_ora_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_phaproc(instructions: ^[dynamic]Instruction)
    emit_pha_noneproc(instructions: ^[dynamic]Instruction)
    emit_phpproc(instructions: ^[dynamic]Instruction)
    emit_php_noneproc(instructions: ^[dynamic]Instruction)
    emit_phxproc(instructions: ^[dynamic]Instruction)
    emit_phx_noneproc(instructions: ^[dynamic]Instruction)
    emit_phyproc(instructions: ^[dynamic]Instruction)
    emit_phy_noneproc(instructions: ^[dynamic]Instruction)
    emit_plaproc(instructions: ^[dynamic]Instruction)
    emit_pla_noneproc(instructions: ^[dynamic]Instruction)
    emit_plpproc(instructions: ^[dynamic]Instruction)
    emit_plp_noneproc(instructions: ^[dynamic]Instruction)
    emit_plxproc(instructions: ^[dynamic]Instruction)
    emit_plx_noneproc(instructions: ^[dynamic]Instruction)
    emit_plyproc(instructions: ^[dynamic]Instruction)
    emit_ply_noneproc(instructions: ^[dynamic]Instruction)
    emit_rlaproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rla_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb0proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb0_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb1proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb1_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb2proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb2_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb3proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb3_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb4proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb4_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb5proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb5_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb6proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb6_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb7proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rmb7_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rol 2 forms
    emit_rol_aproc(instructions: ^[dynamic]Instruction)
    emit_rol_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_ror 2 forms
    emit_ror_aproc(instructions: ^[dynamic]Instruction)
    emit_ror_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rraproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rra_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_rtiproc(instructions: ^[dynamic]Instruction)
    emit_rti_noneproc(instructions: ^[dynamic]Instruction)
    emit_rtsproc(instructions: ^[dynamic]Instruction)
    emit_rts_noneproc(instructions: ^[dynamic]Instruction)
    emit_sax 2 forms
    emit_sax_noneproc(instructions: ^[dynamic]Instruction)
    emit_sax_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_sayproc(instructions: ^[dynamic]Instruction)
    emit_say_noneproc(instructions: ^[dynamic]Instruction)
    emit_sbc 2 forms
    emit_sbc_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_sbc_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_secproc(instructions: ^[dynamic]Instruction)
    emit_sec_noneproc(instructions: ^[dynamic]Instruction)
    emit_sedproc(instructions: ^[dynamic]Instruction)
    emit_sed_noneproc(instructions: ^[dynamic]Instruction)
    emit_seiproc(instructions: ^[dynamic]Instruction)
    emit_sei_noneproc(instructions: ^[dynamic]Instruction)
    emit_setproc(instructions: ^[dynamic]Instruction)
    emit_set_noneproc(instructions: ^[dynamic]Instruction)
    emit_shaproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_sha_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_shxproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_shx_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_shyproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_shy_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_sloproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_slo_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb0proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb0_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb1proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb1_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb2proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb2_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb3proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb3_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb4proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb4_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb5proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb5_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb6proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb6_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb7proc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_smb7_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_sreproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_sre_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_st0proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_st0_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_st1proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_st1_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_st2proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_st2_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_staproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_sta_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_stpproc(instructions: ^[dynamic]Instruction)
    emit_stp_noneproc(instructions: ^[dynamic]Instruction)
    emit_stxproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_stx_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_styproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_sty_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_stzproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_stz_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_sxyproc(instructions: ^[dynamic]Instruction)
    emit_sxy_noneproc(instructions: ^[dynamic]Instruction)
    emit_taiproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tai_blockproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tamproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_tam_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_tasproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_tas_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_taxproc(instructions: ^[dynamic]Instruction)
    emit_tax_noneproc(instructions: ^[dynamic]Instruction)
    emit_tayproc(instructions: ^[dynamic]Instruction)
    emit_tay_noneproc(instructions: ^[dynamic]Instruction)
    emit_tddproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tdd_blockproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tiaproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tia_blockproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tiiproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tii_blockproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tinproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tin_blockproc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16)
    emit_tmaproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_tma_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_topproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_top_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_trbproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_trb_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_tsbproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_tsb_mproc(instructions: ^[dynamic]Instruction, m: Memory)
    emit_tstproc(instructions: ^[dynamic]Instruction, imm: i64, m: Memory)
    emit_tst_tstproc(instructions: ^[dynamic]Instruction, imm: i64, m: Memory)
    emit_tsxproc(instructions: ^[dynamic]Instruction)
    emit_tsx_noneproc(instructions: ^[dynamic]Instruction)
    emit_txaproc(instructions: ^[dynamic]Instruction)
    emit_txa_noneproc(instructions: ^[dynamic]Instruction)
    emit_txsproc(instructions: ^[dynamic]Instruction)
    emit_txs_noneproc(instructions: ^[dynamic]Instruction)
    emit_tyaproc(instructions: ^[dynamic]Instruction)
    emit_tya_noneproc(instructions: ^[dynamic]Instruction)
    emit_usbcproc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_usbc_imm8proc(instructions: ^[dynamic]Instruction, imm: i64)
    emit_waiproc(instructions: ^[dynamic]Instruction)
    emit_wai_noneproc(instructions: ^[dynamic]Instruction)
    encodeproc(instructions: []Instruction, label_defs: []rexcode_isa.Label_Definition, code: []u8, relocs: ^[dynamic]Relocation, errors: ^[dynamic]rexcode_isa.Error, resolve: bool = true, base_address: u64 = 0) -> (byte_count: u32, ok: bool)
    encode_max_code_size(instructions: []Instruction) -> int
    encode_max_relocation_count(instructions: []Instruction) -> int
    encode_reserveproc(code: ^[dynamic]u8, relocs: ^[dynamic]Relocation, instructions: []Instruction)
    Pre-size the caller's encode outputs (code grown by length so code[:] is a valid emit target; relocs reserved by capacity) so the encode hot path never…

    Pre-size the caller's encode outputs (code grown by length so code[:] is a valid emit target; relocs reserved by capacity) so the encode hot path never reallocates. Allocates no new buffers; pass nil to skip either array.

    fprintproc(fd: ^os.File, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    fprintlnproc(fd: ^os.File, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    inst_a(m: Mnemonic) -> Instruction
    inst_adc 2 forms
    inst_adc_imm8(imm: i64) -> Instruction
    inst_adc_m(m: Memory) -> Instruction
    inst_alr(imm: i64) -> Instruction
    inst_alr_imm8(imm: i64) -> Instruction
    inst_anc(imm: i64) -> Instruction
    inst_anc_imm8(imm: i64) -> Instruction
    inst_and 2 forms
    inst_and_imm8(imm: i64) -> Instruction
    inst_and_m(m: Memory) -> Instruction
    inst_ane(imm: i64) -> Instruction
    inst_ane_imm8(imm: i64) -> Instruction
    inst_arr(imm: i64) -> Instruction
    inst_arr_imm8(imm: i64) -> Instruction
    inst_asl 2 forms
    inst_asl_a() -> Instruction
    inst_asl_m(m: Memory) -> Instruction
    inst_axs(imm: i64) -> Instruction
    inst_axs_imm8(imm: i64) -> Instruction
    inst_bbr0(zp: u8, label_id: u32) -> Instruction
    inst_bbr0_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbr1(zp: u8, label_id: u32) -> Instruction
    inst_bbr1_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbr2(zp: u8, label_id: u32) -> Instruction
    inst_bbr2_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbr3(zp: u8, label_id: u32) -> Instruction
    inst_bbr3_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbr4(zp: u8, label_id: u32) -> Instruction
    inst_bbr4_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbr5(zp: u8, label_id: u32) -> Instruction
    inst_bbr5_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbr6(zp: u8, label_id: u32) -> Instruction
    inst_bbr6_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbr7(zp: u8, label_id: u32) -> Instruction
    inst_bbr7_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbs0(zp: u8, label_id: u32) -> Instruction
    inst_bbs0_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbs1(zp: u8, label_id: u32) -> Instruction
    inst_bbs1_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbs2(zp: u8, label_id: u32) -> Instruction
    inst_bbs2_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbs3(zp: u8, label_id: u32) -> Instruction
    inst_bbs3_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbs4(zp: u8, label_id: u32) -> Instruction
    inst_bbs4_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbs5(zp: u8, label_id: u32) -> Instruction
    inst_bbs5_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbs6(zp: u8, label_id: u32) -> Instruction
    inst_bbs6_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bbs7(zp: u8, label_id: u32) -> Instruction
    inst_bbs7_zp_rel(zp: u8, label_id: u32) -> Instruction
    inst_bcc(label_id: u32) -> Instruction
    inst_bcc_rel(label_id: u32) -> Instruction
    inst_bcs(label_id: u32) -> Instruction
    inst_bcs_rel(label_id: u32) -> Instruction
    inst_beq(label_id: u32) -> Instruction
    inst_beq_rel(label_id: u32) -> Instruction
    inst_bit 2 forms
    inst_bit_m(m: Memory) -> Instruction
    inst_bit_imm8(imm: i64) -> Instruction
    inst_block(m: Mnemonic, src, dst, length_val: u16) -> Instruction
    HuC6280 block transfer: src, dst, length (7-byte encoding).
    inst_bmi(label_id: u32) -> Instruction
    inst_bmi_rel(label_id: u32) -> Instruction
    inst_bne(label_id: u32) -> Instruction
    inst_bne_rel(label_id: u32) -> Instruction
    inst_bpl(label_id: u32) -> Instruction
    inst_bpl_rel(label_id: u32) -> Instruction
    inst_bra(label_id: u32) -> Instruction
    inst_bra_rel(label_id: u32) -> Instruction
    inst_brk() -> Instruction
    inst_brk_none() -> Instruction
    inst_bsr(label_id: u32) -> Instruction
    inst_bsr_rel(label_id: u32) -> Instruction
    inst_bvc(label_id: u32) -> Instruction
    inst_bvc_rel(label_id: u32) -> Instruction
    inst_bvs(label_id: u32) -> Instruction
    inst_bvs_rel(label_id: u32) -> Instruction
    inst_cla() -> Instruction
    inst_cla_none() -> Instruction
    inst_clc() -> Instruction
    inst_clc_none() -> Instruction
    inst_cld() -> Instruction
    inst_cld_none() -> Instruction
    inst_cli() -> Instruction
    inst_cli_none() -> Instruction
    inst_clv() -> Instruction
    inst_clv_none() -> Instruction
    inst_clx() -> Instruction
    inst_clx_none() -> Instruction
    inst_cly() -> Instruction
    inst_cly_none() -> Instruction
    inst_cmp 2 forms
    inst_cmp_imm8(imm: i64) -> Instruction
    inst_cmp_m(m: Memory) -> Instruction
    inst_cpx 2 forms
    inst_cpx_imm8(imm: i64) -> Instruction
    inst_cpx_m(m: Memory) -> Instruction
    inst_cpy 2 forms
    inst_cpy_imm8(imm: i64) -> Instruction
    inst_cpy_m(m: Memory) -> Instruction
    inst_csh() -> Instruction
    inst_csh_none() -> Instruction
    inst_csl() -> Instruction
    inst_csl_none() -> Instruction
    inst_dcp(m: Memory) -> Instruction
    inst_dcp_m(m: Memory) -> Instruction
    inst_dea() -> Instruction
    inst_dea_a() -> Instruction
    inst_dec 2 forms
    inst_dec_m(m: Memory) -> Instruction
    inst_dec_a() -> Instruction
    inst_dex() -> Instruction
    inst_dex_none() -> Instruction
    inst_dey() -> Instruction
    inst_dey_none() -> Instruction
    inst_dop 2 forms
    inst_dop_imm8(imm: i64) -> Instruction
    inst_dop_m(m: Memory) -> Instruction
    inst_eor 2 forms
    inst_eor_imm8(imm: i64) -> Instruction
    inst_eor_m(m: Memory) -> Instruction
    inst_i(m: Mnemonic, imm: i64) -> Instruction
    inst_ina() -> Instruction
    inst_ina_a() -> Instruction
    inst_inc 2 forms
    inst_inc_m(m: Memory) -> Instruction
    inst_inc_a() -> Instruction
    inst_inx() -> Instruction
    inst_inx_none() -> Instruction
    inst_iny() -> Instruction
    inst_iny_none() -> Instruction
    inst_isc(m: Memory) -> Instruction
    inst_isc_m(m: Memory) -> Instruction
    inst_jam() -> Instruction
    inst_jam_none() -> Instruction
    inst_jmp(m: Memory) -> Instruction
    inst_jmp_m(m: Memory) -> Instruction
    inst_jsr(m: Memory) -> Instruction
    inst_jsr_m(m: Memory) -> Instruction
    inst_las(m: Memory) -> Instruction
    inst_las_m(m: Memory) -> Instruction
    inst_lax(m: Memory) -> Instruction
    inst_lax_m(m: Memory) -> Instruction
    inst_lda 2 forms
    inst_lda_imm8(imm: i64) -> Instruction
    inst_lda_m(m: Memory) -> Instruction
    inst_ldx 2 forms
    inst_ldx_imm8(imm: i64) -> Instruction
    inst_ldx_m(m: Memory) -> Instruction
    inst_ldy 2 forms
    inst_ldy_imm8(imm: i64) -> Instruction
    inst_ldy_m(m: Memory) -> Instruction
    inst_lsr 2 forms
    inst_lsr_a() -> Instruction
    inst_lsr_m(m: Memory) -> Instruction
    inst_lxa(imm: i64) -> Instruction
    inst_lxa_imm8(imm: i64) -> Instruction
    inst_m(m: Mnemonic, mm: Memory) -> Instruction
    inst_none(m: Mnemonic) -> Instruction
    inst_nop() -> Instruction
    inst_nop_none() -> Instruction
    inst_ora 2 forms
    inst_ora_imm8(imm: i64) -> Instruction
    inst_ora_m(m: Memory) -> Instruction
    inst_pha() -> Instruction
    inst_pha_none() -> Instruction
    inst_php() -> Instruction
    inst_php_none() -> Instruction
    inst_phx() -> Instruction
    inst_phx_none() -> Instruction
    inst_phy() -> Instruction
    inst_phy_none() -> Instruction
    inst_pla() -> Instruction
    inst_pla_none() -> Instruction
    inst_plp() -> Instruction
    inst_plp_none() -> Instruction
    inst_plx() -> Instruction
    inst_plx_none() -> Instruction
    inst_ply() -> Instruction
    inst_ply_none() -> Instruction
    inst_rel(m: Mnemonic, label_id: u32) -> Instruction
    inst_rla(m: Memory) -> Instruction
    inst_rla_m(m: Memory) -> Instruction
    inst_rmb0(m: Memory) -> Instruction
    inst_rmb0_m(m: Memory) -> Instruction
    inst_rmb1(m: Memory) -> Instruction
    inst_rmb1_m(m: Memory) -> Instruction
    inst_rmb2(m: Memory) -> Instruction
    inst_rmb2_m(m: Memory) -> Instruction
    inst_rmb3(m: Memory) -> Instruction
    inst_rmb3_m(m: Memory) -> Instruction
    inst_rmb4(m: Memory) -> Instruction
    inst_rmb4_m(m: Memory) -> Instruction
    inst_rmb5(m: Memory) -> Instruction
    inst_rmb5_m(m: Memory) -> Instruction
    inst_rmb6(m: Memory) -> Instruction
    inst_rmb6_m(m: Memory) -> Instruction
    inst_rmb7(m: Memory) -> Instruction
    inst_rmb7_m(m: Memory) -> Instruction
    inst_rol 2 forms
    inst_rol_a() -> Instruction
    inst_rol_m(m: Memory) -> Instruction
    inst_ror 2 forms
    inst_ror_a() -> Instruction
    inst_ror_m(m: Memory) -> Instruction
    inst_rra(m: Memory) -> Instruction
    inst_rra_m(m: Memory) -> Instruction
    inst_rti() -> Instruction
    inst_rti_none() -> Instruction
    inst_rts() -> Instruction
    inst_rts_none() -> Instruction
    inst_sax 2 forms
    inst_sax_none() -> Instruction
    inst_sax_m(m: Memory) -> Instruction
    inst_say() -> Instruction
    inst_say_none() -> Instruction
    inst_sbc 2 forms
    inst_sbc_imm8(imm: i64) -> Instruction
    inst_sbc_m(m: Memory) -> Instruction
    inst_sec() -> Instruction
    inst_sec_none() -> Instruction
    inst_sed() -> Instruction
    inst_sed_none() -> Instruction
    inst_sei() -> Instruction
    inst_sei_none() -> Instruction
    inst_set() -> Instruction
    inst_set_none() -> Instruction
    inst_sha(m: Memory) -> Instruction
    inst_sha_m(m: Memory) -> Instruction
    inst_shx(m: Memory) -> Instruction
    inst_shx_m(m: Memory) -> Instruction
    inst_shy(m: Memory) -> Instruction
    inst_shy_m(m: Memory) -> Instruction
    inst_slo(m: Memory) -> Instruction
    inst_slo_m(m: Memory) -> Instruction
    inst_smb0(m: Memory) -> Instruction
    inst_smb0_m(m: Memory) -> Instruction
    inst_smb1(m: Memory) -> Instruction
    inst_smb1_m(m: Memory) -> Instruction
    inst_smb2(m: Memory) -> Instruction
    inst_smb2_m(m: Memory) -> Instruction
    inst_smb3(m: Memory) -> Instruction
    inst_smb3_m(m: Memory) -> Instruction
    inst_smb4(m: Memory) -> Instruction
    inst_smb4_m(m: Memory) -> Instruction
    inst_smb5(m: Memory) -> Instruction
    inst_smb5_m(m: Memory) -> Instruction
    inst_smb6(m: Memory) -> Instruction
    inst_smb6_m(m: Memory) -> Instruction
    inst_smb7(m: Memory) -> Instruction
    inst_smb7_m(m: Memory) -> Instruction
    inst_sre(m: Memory) -> Instruction
    inst_sre_m(m: Memory) -> Instruction
    inst_st0(imm: i64) -> Instruction
    inst_st0_imm8(imm: i64) -> Instruction
    inst_st1(imm: i64) -> Instruction
    inst_st1_imm8(imm: i64) -> Instruction
    inst_st2(imm: i64) -> Instruction
    inst_st2_imm8(imm: i64) -> Instruction
    inst_sta(m: Memory) -> Instruction
    inst_sta_m(m: Memory) -> Instruction
    inst_stp() -> Instruction
    inst_stp_none() -> Instruction
    inst_stx(m: Memory) -> Instruction
    inst_stx_m(m: Memory) -> Instruction
    inst_sty(m: Memory) -> Instruction
    inst_sty_m(m: Memory) -> Instruction
    inst_stz(m: Memory) -> Instruction
    inst_stz_m(m: Memory) -> Instruction
    inst_sxy() -> Instruction
    inst_sxy_none() -> Instruction
    inst_tai(src, dst, length_val: u16) -> Instruction
    inst_tai_block(src, dst, length_val: u16) -> Instruction
    inst_tam(imm: i64) -> Instruction
    inst_tam_imm8(imm: i64) -> Instruction
    inst_tas(m: Memory) -> Instruction
    inst_tas_m(m: Memory) -> Instruction
    inst_tax() -> Instruction
    inst_tax_none() -> Instruction
    inst_tay() -> Instruction
    inst_tay_none() -> Instruction
    inst_tdd(src, dst, length_val: u16) -> Instruction
    inst_tdd_block(src, dst, length_val: u16) -> Instruction
    inst_tia(src, dst, length_val: u16) -> Instruction
    inst_tia_block(src, dst, length_val: u16) -> Instruction
    inst_tii(src, dst, length_val: u16) -> Instruction
    inst_tii_block(src, dst, length_val: u16) -> Instruction
    inst_tin(src, dst, length_val: u16) -> Instruction
    inst_tin_block(src, dst, length_val: u16) -> Instruction
    inst_tma(imm: i64) -> Instruction
    inst_tma_imm8(imm: i64) -> Instruction
    inst_top(m: Memory) -> Instruction
    inst_top_m(m: Memory) -> Instruction
    inst_trb(m: Memory) -> Instruction
    inst_trb_m(m: Memory) -> Instruction
    inst_tsb(m: Memory) -> Instruction
    inst_tsb_m(m: Memory) -> Instruction
    inst_tst(imm: i64, m: Memory) -> Instruction
    inst_tst_tst(imm: i64, m: Memory) -> Instruction
    inst_tsx() -> Instruction
    inst_tsx_none() -> Instruction
    inst_txa() -> Instruction
    inst_txa_none() -> Instruction
    inst_txs() -> Instruction
    inst_txs_none() -> Instruction
    inst_tya() -> Instruction
    inst_tya_none() -> Instruction
    inst_usbc(imm: i64) -> Instruction
    inst_usbc_imm8(imm: i64) -> Instruction
    inst_wai() -> Instruction
    inst_wai_none() -> Instruction
    inst_zp_rel(m: Mnemonic, zp: u8, label_id: u32) -> Instruction
    BBR/BBS: zero-page byte + relative branch (3-byte encoding).
    mem_abs(addr: u16) -> Memory
    mem_abs_x(addr: u16) -> Memory
    mem_abs_y(addr: u16) -> Memory
    mem_ind(addr: u16) -> Memory
    mem_ind_abs_x(addr: u16) -> Memory
    mem_ind_x(addr: u8) -> Memory
    mem_ind_y(addr: u8) -> Memory
    mem_ind_zp(addr: u8) -> Memory
    mem_zp(addr: u8) -> Memory
    mem_zp_x(addr: u8) -> Memory
    mem_zp_y(addr: u8) -> Memory
    mnemonic_to_stringproc(m: Mnemonic, lowercase: bool = true, allocator := context.temp_allocator) -> string
    op_abs(a: u16) -> Operand
    op_abs_x(a: u16) -> Operand
    op_abs_y(a: u16) -> Operand
    op_imm16(v: i64) -> Operand
    op_imm8(v: i64) -> Operand
    op_ind(a: u16) -> Operand
    op_ind_abs_x(a: u16) -> Operand
    op_ind_x(a: u8) -> Operand
    op_ind_y(a: u8) -> Operand
    op_ind_zp(a: u8) -> Operand
    op_label(label_id: u32, size: u8 = 1) -> Operand
    op_mem(m: Memory) -> Operand
    op_reg(r: Register) -> Operand
    op_rel_offset(offset: i64) -> Operand
    op_zp(a: u8) -> Operand
    Address-mode-named operand helpers (call site reads like asm).
    op_zp_x(a: u8) -> Operand
    op_zp_y(a: u8) -> Operand
    printproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    printlnproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    reg_class(r: Register) -> u16
    reg_hw(r: Register) -> u8
    reg_is_gp(r: Register) -> bool
    sbprintproc(sb: ^strings.Builder, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    sbprintlnproc(sb: ^strings.Builder, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    tprintproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil) -> string
    tprintlnproc(instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil) -> string
    wprintproc(w: io.Stream, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)
    wprintlnproc(w: io.Stream, instructions: []Instruction, inst_info: []Instruction_Info, label_defs: []rexcode_isa.Label_Definition, tokens: ^[dynamic]rexcode_isa.Token = nil, options: ^rexcode_isa.Print_Options = nil, label_names: ^map[rexcode_isa.Label_Offset]string = nil)

    Procedure Groups

    Listed with their procedures under Procedures.

    Source Files

    Generation Information

    Generated with odin version dev-2026-10 (vendor "odin") Windows_amd64 @ 2026-10-10 00:25:51.511820200 +0000 UTC