package core:rexcode/isa/mos65816

⌘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

    Index

    Procedures (449)

    Types

    Address_Mode ¶

    Address_Mode :: enum u8 {
    	DP, 
    	DP_X, 
    	DP_Y, 
    	DP_IND, 
    	DP_IND_X, 
    	DP_IND_Y, 
    	DP_IND_LONG, 
    	DP_IND_LONG_Y, 
    	ABS, 
    	ABS_X, 
    	ABS_Y, 
    	ABS_IND, 
    	ABS_IND_LONG, 
    	ABS_IND_X, 
    	LONG, 
    	LONG_X, 
    	SR, 
    	SR_IND_Y, 
    }

    Assumed_State ¶

    Assumed_State :: struct {
    	m: bool,
    	// M=1 (8-bit A/memory)         M=0 (16-bit A/memory)
    	x: bool,
    	// X=1 (8-bit X/Y)              X=0 (16-bit X/Y)
    	e: bool,
    }
     

    Mode-flag state the caller asserts at decode time.

    Related Procedures With Parameters
    Related Constants

    Decode_Entry ¶

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

    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
    	flags:    Encoding_Flags,
    }

    Encoding_Flags ¶

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

    Error ¶

    Error :: rexcode_isa.Error

    Error_Code ¶

    Error_Code :: rexcode_isa.Error_Code

    GP ¶

    GP :: enum u8 {
    	A = 0, 
    	X = 1, 
    	Y = 2, 
    	S = 3, 
    	D = 4, 
    }

    Instruction ¶

    Instruction :: struct #packed {
    	ops:           [2]Operand `fmt:"v,operand_count"`,
    	// 20 bytes (only MVN/MVP use 2; rest use 0 or 1)
    	mnemonic:      Mnemonic,
    	// 2
    	operand_count: u8,
    	// 1
    	flags:         Instruction_Flags,
    	// 1
    	length:        u8,
    	// 1
    	_:             [7]u8,
    }
    Related Procedures With Returns

    Instruction_Flags ¶

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

    Instruction_Info ¶

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

    Label_Definition ¶

    Label_Definition :: rexcode_isa.Label_Definition
    Related Constants

    Label_Map ¶

    Label_Map :: rexcode_isa.Label_Map

    Memory ¶

    Memory :: distinct bit_field u32 {
    	address: u32 | 24,
    	mode:    Address_Mode | 8,
    }
     

    24-bit address packed alongside the mode in 4 bytes.

    Related Procedures With Parameters
    Related Procedures With Returns

    Mnemonic ¶

    Mnemonic :: enum u16 {
    	INVALID = 0, 
    	// 6502 core
    	ADC, 
    	AND, 
    	ASL, 
    	BIT, 
    	CMP, 
    	CPX, 
    	CPY, 
    	DEC, 
    	DEX, 
    	DEY, 
    	EOR, 
    	INC, 
    	INX, 
    	INY, 
    	LSR, 
    	ORA, 
    	ROL, 
    	ROR, 
    	SBC, 
    	LDA, 
    	LDX, 
    	LDY, 
    	STA, 
    	STX, 
    	STY, 
    	TAX, 
    	TAY, 
    	TSX, 
    	TXA, 
    	TXS, 
    	TYA, 
    	PHA, 
    	PHP, 
    	PLA, 
    	PLP, 
    	JMP, 
    	JSR, 
    	RTI, 
    	RTS, 
    	BRK, 
    	NOP, 
    	// Branches
    	BCC, 
    	BCS, 
    	BEQ, 
    	BMI, 
    	BNE, 
    	BPL, 
    	BVC, 
    	BVS, 
    	// Flags
    	CLC, 
    	CLD, 
    	CLI, 
    	CLV, 
    	SEC, 
    	SED, 
    	SEI, 
    	// 65C02 additions (carry over to 65816)
    	BRA, 
    	STZ, 
    	TRB, 
    	TSB, 
    	PHX, 
    	PHY, 
    	PLX, 
    	PLY, 
    	STP, 
    	WAI, 
    	// 65816 new
    	BRL,         // 16-bit relative branch
    	COP,         // co-processor enable (interrupt)
    	JML,         // jump long (24-bit)
    	JSL,         // jump-to-subroutine long (24-bit)
    	MVN, 
    	MVP,         // block move negative / positive
    	PEA,         // push effective absolute address
    	PEI,         // push effective indirect address
    	PER,         // push effective PC-relative
    	PHB, 
    	PHD, 
    	PHK,         // push DBR / D / PBR
    	PLB, 
    	PLD,         // pull  DBR / D
    	REP, 
    	SEP,         // reset / set status bits (immediate mask)
    	RTL,         // return long
    	TCD, 
    	TDC,         // A <-> D
    	TCS, 
    	TSC,         // A <-> S
    	TXY, 
    	TYX,         // X <-> Y
    	WDM,         // reserved (assembles as 2-byte no-op)
    	XBA,         // exchange A halves (B <-> A)
    	XCE,         // exchange Carry and Emulation flags
    }
    Related Procedures With Parameters

    Operand ¶

    Operand :: struct #packed {
    	using _: struct #raw_union {
    		reg:       Register,
    		mem:       Memory,
    		immediate: i64,
    		relative:  i64,
    	},
    	kind: Operand_Kind,
    	size: u8,
    }
    Related Procedures With Returns

    Operand_Encoding ¶

    Operand_Encoding :: enum u8 {
    	NONE, 
    	IMPL, 
    	BYTE_1_IMM,  // 8-bit at offset 1
    	WORD_1_IMM,  // 16-bit LE at offset 1
    	BYTE_1_ADDR, // 8-bit zero/direct page address at offset 1
    	WORD_1_ADDR, // 16-bit LE absolute at offset 1
    	LONG_1_ADDR, // 24-bit LE long at offset 1
    	BYTE_1_REL,  // signed 8-bit PC-rel at offset 1
    	WORD_1_REL,  // signed 16-bit PC-rel at offset 1
    	BYTE_1_BANK, // dst bank byte at offset 1 (MVN/MVP)
    	BYTE_2_BANK, // src bank byte at offset 2 (MVN/MVP)
    }
     

    Byte-offset + width within the instruction 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 -- no operand bytes
    	// Immediates
    	IMM_8,             // always 8-bit (COP, REP, SEP, WDM, BRK signature, ...)
    	IMM_M8,            // 8-bit when M=1
    	IMM_M16,           // 16-bit when M=0
    	IMM_X8,            // 8-bit when X=1
    	IMM_X16,           // 16-bit when X=0
    	// Branches
    	REL,               // signed 8-bit PC-rel
    	REL_LONG,          // signed 16-bit PC-rel (BRL, PER)
    	// Memory (one per addressing mode)
    	MEM_DP, 
    	MEM_DP_X, 
    	MEM_DP_Y, 
    	MEM_DP_IND, 
    	MEM_DP_IND_X, 
    	MEM_DP_IND_Y, 
    	MEM_DP_IND_LONG, 
    	MEM_DP_IND_LONG_Y, 
    	MEM_ABS, 
    	MEM_ABS_X, 
    	MEM_ABS_Y, 
    	MEM_ABS_IND, 
    	MEM_ABS_IND_LONG, 
    	MEM_ABS_IND_X, 
    	MEM_LONG, 
    	MEM_LONG_X, 
    	MEM_SR, 
    	MEM_SR_IND_Y, 
    	// Block move: two 8-bit bank operands. Source order in the syntax
    	// (MVN src, dst) is the REVERSE of the byte order in the encoding.
    	BANK_SRC, 
    	BANK_DST, 
    }
    Print_Result :: rexcode_isa.Print_Result

    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, 
    	ABS24, 
    	REL8, 
    	REL16, 
    }

    Token ¶

    Token :: rexcode_isa.Token

    Token_Kind ¶

    Token_Kind :: rexcode_isa.Token_Kind

    Constants

    A ¶

    A :: Register(REG_GP | 0)

    D ¶

    D :: Register(REG_GP | 4)

    DBR ¶

    DBR :: Register(REG_SYS | 0)

    DEFAULT_PRINT_OPTIONS ¶

    DEFAULT_PRINT_OPTIONS: rexcode_isa.Print_Options : isa.DEFAULT_PRINT_OPTIONS

    EMULATION ¶

    EMULATION :: Assumed_State{m = true, x = true, e = true}

    LABEL_UNDEFINED ¶

    LABEL_UNDEFINED: rexcode_isa.Label_Definition : isa.LABEL_UNDEFINED

    MAX_INST_SIZE ¶

    MAX_INST_SIZE :: 4

    NATIVE_16 ¶

    NATIVE_16 :: Assumed_State{m = false, x = false, e = false}

    NATIVE_8 ¶

    NATIVE_8 :: Assumed_State{m = true, x = true, e = false}

    NONE ¶

    NONE :: Register(0xFFFF)

    P ¶

    P :: Register(REG_SYS | 2)

    PBR ¶

    PBR :: Register(REG_SYS | 1)

    PC ¶

    PC :: Register(REG_SYS | 3)

    REG_GP ¶

    REG_GP :: 0x0100
     

    A / X / Y / S / D

    REG_NONE ¶

    REG_NONE :: 0x0000

    REG_SYS ¶

    REG_SYS :: 0x0200
     

    DBR / PBR / P / PC

    S ¶

    S :: Register(REG_GP | 3)

    X ¶

    X :: Register(REG_GP | 1)

    Y ¶

    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

    aprint ¶

    aprint :: proc(
    	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[u32]string = nil, 
    	allocator := context.allocator, 
    ) -> string {…}

    aprintln ¶

    aprintln :: proc(
    	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[u32]string = nil, 
    	allocator := context.allocator, 
    ) -> string {…}

    bprint ¶

    bprint :: proc(
    	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[u32]string = nil, 
    ) -> string {…}

    bprintln ¶

    bprintln :: proc(
    	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[u32]string = nil, 
    ) -> string {…}

    decode ¶

    decode :: proc(
    	data:         []u8, 
    	relocs:       []Relocation, 
    	instructions: ^[dynamic]Instruction, 
    	inst_info:    ^[dynamic]Instruction_Info, 
    	label_defs:   ^[dynamic]rexcode_isa.Label_Definition, 
    	errors:       ^[dynamic]rexcode_isa.Error, 
    	state:        Assumed_State = NATIVE_16, 
    ) -> (byte_count: u32, ok: bool) {…}

    decode_estimate_instruction_count ¶

    decode_estimate_instruction_count :: proc "contextless" (data: []u8) -> int {…}
     

    Typical-case estimate of the instruction count for data.

    decode_max_instruction_count ¶

    decode_max_instruction_count :: proc "contextless" (data: []u8) -> int {…}
     

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

    decode_reserve ¶

    decode_reserve :: proc(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).

    emit_adc_imm16 ¶

    emit_adc_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_adc_imm8 ¶

    emit_adc_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_adc_mem ¶

    emit_adc_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_and_imm16 ¶

    emit_and_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_and_imm8 ¶

    emit_and_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_and_mem ¶

    emit_and_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_asl_a ¶

    emit_asl_a :: proc(instructions: ^[dynamic]Instruction) {…}
    Related Procedure Groups

    emit_asl_mem ¶

    emit_asl_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_bcc_rel ¶

    emit_bcc_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_bcs_rel ¶

    emit_bcs_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_beq_rel ¶

    emit_beq_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_bit_imm16 ¶

    emit_bit_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_bit_imm8 ¶

    emit_bit_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_bit_mem ¶

    emit_bit_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_bmi_rel ¶

    emit_bmi_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_bne_rel ¶

    emit_bne_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_bpl_rel ¶

    emit_bpl_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_bra_rel ¶

    emit_bra_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_brk_imm8 ¶

    emit_brk_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}

    emit_brl_rel_long ¶

    emit_brl_rel_long :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_bvc_rel ¶

    emit_bvc_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_bvs_rel ¶

    emit_bvs_rel :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_clc_none ¶

    emit_clc_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_cld_none ¶

    emit_cld_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_cli_none ¶

    emit_cli_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_clv_none ¶

    emit_clv_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_cmp_imm16 ¶

    emit_cmp_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_cmp_imm8 ¶

    emit_cmp_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_cmp_mem ¶

    emit_cmp_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_cop_imm8 ¶

    emit_cop_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}

    emit_cpx_imm16 ¶

    emit_cpx_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_cpx_imm8 ¶

    emit_cpx_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_cpx_mem ¶

    emit_cpx_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_cpy_imm16 ¶

    emit_cpy_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_cpy_imm8 ¶

    emit_cpy_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_cpy_mem ¶

    emit_cpy_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_dec_a ¶

    emit_dec_a :: proc(instructions: ^[dynamic]Instruction) {…}
    Related Procedure Groups

    emit_dec_mem ¶

    emit_dec_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_dex_none ¶

    emit_dex_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_dey_none ¶

    emit_dey_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_eor_imm16 ¶

    emit_eor_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_eor_imm8 ¶

    emit_eor_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_eor_mem ¶

    emit_eor_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_inc_a ¶

    emit_inc_a :: proc(instructions: ^[dynamic]Instruction) {…}
    Related Procedure Groups

    emit_inc_mem ¶

    emit_inc_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_inx_none ¶

    emit_inx_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_iny_none ¶

    emit_iny_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_jml_mem ¶

    emit_jml_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_jmp_mem ¶

    emit_jmp_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_jsl_mem ¶

    emit_jsl_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_jsr_mem ¶

    emit_jsr_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_lda_imm16 ¶

    emit_lda_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_lda_imm8 ¶

    emit_lda_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_lda_mem ¶

    emit_lda_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_ldx_imm16 ¶

    emit_ldx_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_ldx_imm8 ¶

    emit_ldx_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_ldx_mem ¶

    emit_ldx_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_ldy_imm16 ¶

    emit_ldy_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_ldy_imm8 ¶

    emit_ldy_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_ldy_mem ¶

    emit_ldy_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_lsr_a ¶

    emit_lsr_a :: proc(instructions: ^[dynamic]Instruction) {…}
    Related Procedure Groups

    emit_lsr_mem ¶

    emit_lsr_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_mvn_banks ¶

    emit_mvn_banks :: proc(instructions: ^[dynamic]Instruction, src_bank, dst_bank: u8) {…}

    emit_mvp_banks ¶

    emit_mvp_banks :: proc(instructions: ^[dynamic]Instruction, src_bank, dst_bank: u8) {…}

    emit_nop_none ¶

    emit_nop_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_ora_imm16 ¶

    emit_ora_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_ora_imm8 ¶

    emit_ora_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_ora_mem ¶

    emit_ora_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_pea_mem ¶

    emit_pea_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_pei_mem ¶

    emit_pei_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_per_rel_long ¶

    emit_per_rel_long :: proc(instructions: ^[dynamic]Instruction, label: u32) {…}

    emit_pha_none ¶

    emit_pha_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_phb_none ¶

    emit_phb_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_phd_none ¶

    emit_phd_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_phk_none ¶

    emit_phk_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_php_none ¶

    emit_php_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_phx_none ¶

    emit_phx_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_phy_none ¶

    emit_phy_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_pla_none ¶

    emit_pla_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_plb_none ¶

    emit_plb_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_pld_none ¶

    emit_pld_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_plp_none ¶

    emit_plp_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_plx_none ¶

    emit_plx_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_ply_none ¶

    emit_ply_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_rep_imm8 ¶

    emit_rep_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}

    emit_rol_a ¶

    emit_rol_a :: proc(instructions: ^[dynamic]Instruction) {…}
    Related Procedure Groups

    emit_rol_mem ¶

    emit_rol_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_ror_a ¶

    emit_ror_a :: proc(instructions: ^[dynamic]Instruction) {…}
    Related Procedure Groups

    emit_ror_mem ¶

    emit_ror_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_rti_none ¶

    emit_rti_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_rtl_none ¶

    emit_rtl_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_rts_none ¶

    emit_rts_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_sbc_imm16 ¶

    emit_sbc_imm16 :: proc(instructions: ^[dynamic]Instruction, imm: i16) {…}
    Related Procedure Groups

    emit_sbc_imm8 ¶

    emit_sbc_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}
    Related Procedure Groups

    emit_sbc_mem ¶

    emit_sbc_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}
    Related Procedure Groups

    emit_sec_none ¶

    emit_sec_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_sed_none ¶

    emit_sed_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_sei_none ¶

    emit_sei_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_sep_imm8 ¶

    emit_sep_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}

    emit_sta_mem ¶

    emit_sta_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_stp_none ¶

    emit_stp_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_stx_mem ¶

    emit_stx_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_sty_mem ¶

    emit_sty_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_stz_mem ¶

    emit_stz_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_tax_none ¶

    emit_tax_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_tay_none ¶

    emit_tay_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_tcd_none ¶

    emit_tcd_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_tcs_none ¶

    emit_tcs_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_tdc_none ¶

    emit_tdc_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_trb_mem ¶

    emit_trb_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_tsb_mem ¶

    emit_tsb_mem :: proc(instructions: ^[dynamic]Instruction, m: Memory) {…}

    emit_tsc_none ¶

    emit_tsc_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_tsx_none ¶

    emit_tsx_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_txa_none ¶

    emit_txa_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_txs_none ¶

    emit_txs_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_txy_none ¶

    emit_txy_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_tya_none ¶

    emit_tya_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_tyx_none ¶

    emit_tyx_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_wai_none ¶

    emit_wai_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_wdm_imm8 ¶

    emit_wdm_imm8 :: proc(instructions: ^[dynamic]Instruction, imm: i8) {…}

    emit_xba_none ¶

    emit_xba_none :: proc(instructions: ^[dynamic]Instruction) {…}

    emit_xce_none ¶

    emit_xce_none :: proc(instructions: ^[dynamic]Instruction) {…}

    encode ¶

    encode :: proc(
    	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 ¶

    encode_max_code_size :: proc "contextless" (instructions: []Instruction) -> int {…}

    encode_max_relocation_count ¶

    encode_max_relocation_count :: proc "contextless" (instructions: []Instruction) -> int {…}

    encode_reserve ¶

    encode_reserve :: proc(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 reallocates. Allocates no new buffers; pass nil to skip either array.

    fprint ¶

    fprint :: proc(
    	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[u32]string = nil, 
    ) {…}

    fprintln ¶

    fprintln :: proc(
    	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[u32]string = nil, 
    ) {…}

    inst_a ¶

    inst_a :: proc "contextless" (m: Mnemonic) -> Instruction {…}

    inst_adc_imm16 ¶

    inst_adc_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_adc_imm8 ¶

    inst_adc_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_adc_mem ¶

    inst_adc_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_and_imm16 ¶

    inst_and_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_and_imm8 ¶

    inst_and_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_and_mem ¶

    inst_and_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_asl_a ¶

    inst_asl_a :: proc "contextless" () -> Instruction {…}
    Related Procedure Groups

    inst_asl_mem ¶

    inst_asl_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_bcc_rel ¶

    inst_bcc_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_bcs_rel ¶

    inst_bcs_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_beq_rel ¶

    inst_beq_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_bit_imm16 ¶

    inst_bit_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_bit_imm8 ¶

    inst_bit_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_bit_mem ¶

    inst_bit_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_block_move ¶

    inst_block_move :: proc "contextless" (m: Mnemonic, src_bank, dst_bank: u8) -> Instruction {…}
     

    MVN/MVP src, dst -- caller writes "natural" order; encoder reverses to the WDC-specified opcode | dst_bank | src_bank byte layout.

    inst_bmi_rel ¶

    inst_bmi_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_bne_rel ¶

    inst_bne_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_bpl_rel ¶

    inst_bpl_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_bra_rel ¶

    inst_bra_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_brk_imm8 ¶

    inst_brk_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}

    inst_brl_rel_long ¶

    inst_brl_rel_long :: proc "contextless" (label: u32) -> Instruction {…}

    inst_bvc_rel ¶

    inst_bvc_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_bvs_rel ¶

    inst_bvs_rel :: proc "contextless" (label: u32) -> Instruction {…}

    inst_clc_none ¶

    inst_clc_none :: proc "contextless" () -> Instruction {…}

    inst_cld_none ¶

    inst_cld_none :: proc "contextless" () -> Instruction {…}

    inst_cli_none ¶

    inst_cli_none :: proc "contextless" () -> Instruction {…}

    inst_clv_none ¶

    inst_clv_none :: proc "contextless" () -> Instruction {…}

    inst_cmp_imm16 ¶

    inst_cmp_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_cmp_imm8 ¶

    inst_cmp_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_cmp_mem ¶

    inst_cmp_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_cop_imm8 ¶

    inst_cop_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}

    inst_cpx_imm16 ¶

    inst_cpx_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_cpx_imm8 ¶

    inst_cpx_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_cpx_mem ¶

    inst_cpx_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_cpy_imm16 ¶

    inst_cpy_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_cpy_imm8 ¶

    inst_cpy_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_cpy_mem ¶

    inst_cpy_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_dec_a ¶

    inst_dec_a :: proc "contextless" () -> Instruction {…}
    Related Procedure Groups

    inst_dec_mem ¶

    inst_dec_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_dex_none ¶

    inst_dex_none :: proc "contextless" () -> Instruction {…}

    inst_dey_none ¶

    inst_dey_none :: proc "contextless" () -> Instruction {…}

    inst_eor_imm16 ¶

    inst_eor_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_eor_imm8 ¶

    inst_eor_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_eor_mem ¶

    inst_eor_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_i16 ¶

    inst_i16 :: proc "contextless" (m: Mnemonic, v: i64) -> Instruction {…}

    inst_i8 ¶

    inst_i8 :: proc "contextless" (m: Mnemonic, v: i64) -> Instruction {…}

    inst_inc_a ¶

    inst_inc_a :: proc "contextless" () -> Instruction {…}
    Related Procedure Groups

    inst_inc_mem ¶

    inst_inc_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_inx_none ¶

    inst_inx_none :: proc "contextless" () -> Instruction {…}

    inst_iny_none ¶

    inst_iny_none :: proc "contextless" () -> Instruction {…}

    inst_jml_mem ¶

    inst_jml_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_jmp_mem ¶

    inst_jmp_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_jsl_mem ¶

    inst_jsl_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_jsr_mem ¶

    inst_jsr_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_lda_imm16 ¶

    inst_lda_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_lda_imm8 ¶

    inst_lda_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_lda_mem ¶

    inst_lda_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_ldx_imm16 ¶

    inst_ldx_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_ldx_imm8 ¶

    inst_ldx_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_ldx_mem ¶

    inst_ldx_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_ldy_imm16 ¶

    inst_ldy_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_ldy_imm8 ¶

    inst_ldy_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_ldy_mem ¶

    inst_ldy_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_lsr_a ¶

    inst_lsr_a :: proc "contextless" () -> Instruction {…}
    Related Procedure Groups

    inst_lsr_mem ¶

    inst_lsr_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_m ¶

    inst_m :: proc "contextless" (m: Mnemonic, mm: Memory) -> Instruction {…}

    inst_mvn_banks ¶

    inst_mvn_banks :: proc "contextless" (src_bank, dst_bank: u8) -> Instruction {…}

    inst_mvp_banks ¶

    inst_mvp_banks :: proc "contextless" (src_bank, dst_bank: u8) -> Instruction {…}

    inst_none ¶

    inst_none :: proc "contextless" (m: Mnemonic) -> Instruction {…}

    inst_nop_none ¶

    inst_nop_none :: proc "contextless" () -> Instruction {…}

    inst_ora_imm16 ¶

    inst_ora_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_ora_imm8 ¶

    inst_ora_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_ora_mem ¶

    inst_ora_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_pea_mem ¶

    inst_pea_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_pei_mem ¶

    inst_pei_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_per_rel_long ¶

    inst_per_rel_long :: proc "contextless" (label: u32) -> Instruction {…}

    inst_pha_none ¶

    inst_pha_none :: proc "contextless" () -> Instruction {…}

    inst_phb_none ¶

    inst_phb_none :: proc "contextless" () -> Instruction {…}

    inst_phd_none ¶

    inst_phd_none :: proc "contextless" () -> Instruction {…}

    inst_phk_none ¶

    inst_phk_none :: proc "contextless" () -> Instruction {…}

    inst_php_none ¶

    inst_php_none :: proc "contextless" () -> Instruction {…}

    inst_phx_none ¶

    inst_phx_none :: proc "contextless" () -> Instruction {…}

    inst_phy_none ¶

    inst_phy_none :: proc "contextless" () -> Instruction {…}

    inst_pla_none ¶

    inst_pla_none :: proc "contextless" () -> Instruction {…}

    inst_plb_none ¶

    inst_plb_none :: proc "contextless" () -> Instruction {…}

    inst_pld_none ¶

    inst_pld_none :: proc "contextless" () -> Instruction {…}

    inst_plp_none ¶

    inst_plp_none :: proc "contextless" () -> Instruction {…}

    inst_plx_none ¶

    inst_plx_none :: proc "contextless" () -> Instruction {…}

    inst_ply_none ¶

    inst_ply_none :: proc "contextless" () -> Instruction {…}

    inst_rel ¶

    inst_rel :: proc "contextless" (m: Mnemonic, label_id: u32) -> Instruction {…}

    inst_rel_long ¶

    inst_rel_long :: proc "contextless" (m: Mnemonic, label_id: u32) -> Instruction {…}

    inst_rep_imm8 ¶

    inst_rep_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}

    inst_rol_a ¶

    inst_rol_a :: proc "contextless" () -> Instruction {…}
    Related Procedure Groups

    inst_rol_mem ¶

    inst_rol_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_ror_a ¶

    inst_ror_a :: proc "contextless" () -> Instruction {…}
    Related Procedure Groups

    inst_ror_mem ¶

    inst_ror_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_rti_none ¶

    inst_rti_none :: proc "contextless" () -> Instruction {…}

    inst_rtl_none ¶

    inst_rtl_none :: proc "contextless" () -> Instruction {…}

    inst_rts_none ¶

    inst_rts_none :: proc "contextless" () -> Instruction {…}

    inst_sbc_imm16 ¶

    inst_sbc_imm16 :: proc "contextless" (imm: i16) -> Instruction {…}
    Related Procedure Groups

    inst_sbc_imm8 ¶

    inst_sbc_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}
    Related Procedure Groups

    inst_sbc_mem ¶

    inst_sbc_mem :: proc "contextless" (m: Memory) -> Instruction {…}
    Related Procedure Groups

    inst_sec_none ¶

    inst_sec_none :: proc "contextless" () -> Instruction {…}

    inst_sed_none ¶

    inst_sed_none :: proc "contextless" () -> Instruction {…}

    inst_sei_none ¶

    inst_sei_none :: proc "contextless" () -> Instruction {…}

    inst_sep_imm8 ¶

    inst_sep_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}

    inst_sta_mem ¶

    inst_sta_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_stp_none ¶

    inst_stp_none :: proc "contextless" () -> Instruction {…}

    inst_stx_mem ¶

    inst_stx_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_sty_mem ¶

    inst_sty_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_stz_mem ¶

    inst_stz_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_tax_none ¶

    inst_tax_none :: proc "contextless" () -> Instruction {…}

    inst_tay_none ¶

    inst_tay_none :: proc "contextless" () -> Instruction {…}

    inst_tcd_none ¶

    inst_tcd_none :: proc "contextless" () -> Instruction {…}

    inst_tcs_none ¶

    inst_tcs_none :: proc "contextless" () -> Instruction {…}

    inst_tdc_none ¶

    inst_tdc_none :: proc "contextless" () -> Instruction {…}

    inst_trb_mem ¶

    inst_trb_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_tsb_mem ¶

    inst_tsb_mem :: proc "contextless" (m: Memory) -> Instruction {…}

    inst_tsc_none ¶

    inst_tsc_none :: proc "contextless" () -> Instruction {…}

    inst_tsx_none ¶

    inst_tsx_none :: proc "contextless" () -> Instruction {…}

    inst_txa_none ¶

    inst_txa_none :: proc "contextless" () -> Instruction {…}

    inst_txs_none ¶

    inst_txs_none :: proc "contextless" () -> Instruction {…}

    inst_txy_none ¶

    inst_txy_none :: proc "contextless" () -> Instruction {…}

    inst_tya_none ¶

    inst_tya_none :: proc "contextless" () -> Instruction {…}

    inst_tyx_none ¶

    inst_tyx_none :: proc "contextless" () -> Instruction {…}

    inst_wai_none ¶

    inst_wai_none :: proc "contextless" () -> Instruction {…}

    inst_wdm_imm8 ¶

    inst_wdm_imm8 :: proc "contextless" (imm: i8) -> Instruction {…}

    inst_xba_none ¶

    inst_xba_none :: proc "contextless" () -> Instruction {…}

    inst_xce_none ¶

    inst_xce_none :: proc "contextless" () -> Instruction {…}

    mem_abs ¶

    mem_abs :: proc "contextless" (a: u16) -> Memory {…}

    mem_abs_ind ¶

    mem_abs_ind :: proc "contextless" (a: u16) -> Memory {…}

    mem_abs_ind_long ¶

    mem_abs_ind_long :: proc "contextless" (a: u16) -> Memory {…}

    mem_abs_ind_x ¶

    mem_abs_ind_x :: proc "contextless" (a: u16) -> Memory {…}

    mem_abs_x ¶

    mem_abs_x :: proc "contextless" (a: u16) -> Memory {…}

    mem_abs_y ¶

    mem_abs_y :: proc "contextless" (a: u16) -> Memory {…}

    mem_dp ¶

    mem_dp :: proc "contextless" (a: u8) -> Memory {…}

    mem_dp_ind ¶

    mem_dp_ind :: proc "contextless" (a: u8) -> Memory {…}

    mem_dp_ind_long ¶

    mem_dp_ind_long :: proc "contextless" (a: u8) -> Memory {…}

    mem_dp_ind_long_y ¶

    mem_dp_ind_long_y :: proc "contextless" (a: u8) -> Memory {…}

    mem_dp_ind_x ¶

    mem_dp_ind_x :: proc "contextless" (a: u8) -> Memory {…}

    mem_dp_ind_y ¶

    mem_dp_ind_y :: proc "contextless" (a: u8) -> Memory {…}

    mem_dp_x ¶

    mem_dp_x :: proc "contextless" (a: u8) -> Memory {…}

    mem_dp_y ¶

    mem_dp_y :: proc "contextless" (a: u8) -> Memory {…}

    mem_long ¶

    mem_long :: proc "contextless" (a: u32) -> Memory {…}

    mem_long_x ¶

    mem_long_x :: proc "contextless" (a: u32) -> Memory {…}

    mem_sr ¶

    mem_sr :: proc "contextless" (a: u8) -> Memory {…}

    mem_sr_ind_y ¶

    mem_sr_ind_y :: proc "contextless" (a: u8) -> Memory {…}

    mnemonic_to_string ¶

    mnemonic_to_string :: proc(m: Mnemonic, lowercase: bool = true, allocator := context.temp_allocator) -> string {…}

    op_imm16 ¶

    op_imm16 :: proc "contextless" (v: i64) -> Operand {…}

    op_imm8 ¶

    op_imm8 :: proc "contextless" (v: i64) -> Operand {…}

    op_label ¶

    op_label :: proc "contextless" (label_id: u32, size: u8 = 1) -> Operand {…}

    op_mem ¶

    op_mem :: proc "contextless" (m: Memory) -> Operand {…}

    op_reg ¶

    op_reg :: proc "contextless" (r: Register) -> Operand {…}

    op_rel_offset ¶

    op_rel_offset :: proc "contextless" (off: i64) -> Operand {…}

    print ¶

    print :: proc(
    	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[u32]string = nil, 
    ) {…}

    println ¶

    println :: proc(
    	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[u32]string = nil, 
    ) {…}

    reg_class ¶

    reg_class :: proc "contextless" (r: Register) -> u16 {…}

    reg_hw ¶

    reg_hw :: proc "contextless" (r: Register) -> u8 {…}

    sbprint ¶

    sbprint :: proc(
    	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[u32]string = nil, 
    ) {…}

    sbprintln ¶

    sbprintln :: proc(
    	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[u32]string = nil, 
    ) {…}

    tprint ¶

    tprint :: proc(
    	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[u32]string = nil, 
    ) -> string {…}

    tprintln ¶

    tprintln :: proc(
    	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[u32]string = nil, 
    ) -> string {…}

    wprint ¶

    wprint :: proc(
    	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[u32]string = nil, 
    ) {…}

    wprintln ¶

    wprintln :: proc(
    	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[u32]string = nil, 
    ) {…}

    Procedure Groups

    Source Files

    Generation Information

    Generated with odin version dev-2026-07 (vendor "odin") Windows_amd64 @ 2026-07-20 21:55:33.512923200 +0000 UTC