package core:rexcode/isa/mos6502
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
Types (30)
Constants (13)
Listed one per row under Constants.
Variables (4)
Procedures (633)
Listed one per row under Procedures.
Procedure Groups (40)
Listed one per row under Procedures.
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 }
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).
Encode_Run ¶
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).
Error_Code ¶
Error_Code :: rexcode_isa.Error_Code
Label_Map ¶
Label_Map :: rexcode_isa.Label_Map
Label_Names ¶
Label_Names :: map[rexcode_isa.Label_Offset]string
Label_Offset ¶
Label_Offset :: rexcode_isa.Label_Offset
Memory ¶
Memory :: struct #packed { address: u16, mode: Address_Mode, _: u8, }
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_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.
Print_Options ¶
Print_Options :: rexcode_isa.Print_Options
Related Procedures With Parameters
Related Constants
Print_Result ¶
Print_Result :: rexcode_isa.Print_Result
Relocation_Type ¶
Relocation_Type :: enum u8 { NONE = 0, ABS16, REL8, }
Token_Kind ¶
Token_Kind :: rexcode_isa.Token_Kind
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 | :: 7HuC6280 block transfer |
| NONE | :: Register(0xFFFF) |
| P | :: Register(REG_SYS | 1) |
| PC | :: Register(REG_SYS | 2) |
| REG_… 3 | |
|---|---|
| REG_GP | :: 0x0100A / X / Y |
| REG_NONE | :: 0x0000 |
| REG_SYS | :: 0x0200S / 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.
| 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[rexcode_isa.Label_Offset]string = nil, allocator := context.allocator) -> string |
| 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[rexcode_isa.Label_Offset]string = nil, allocator := context.allocator) -> string |
| 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[rexcode_isa.Label_Offset]string = nil) -> string |
| 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[rexcode_isa.Label_Offset]string = nil) -> string |
| 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, cpu: CPU = .NMOS) -> (byte_count: u32, ok: bool) |
| decode_estimate_instruction_count | (data: []u8) -> intTypical-case estimate of the instruction count for data.Typical-case estimate of the instruction count for |
| decode_max_instruction_count | (data: []u8) -> intInstruction-count ceiling for data (shortest instruction is 1 byte).Instruction-count ceiling for |
| 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).Pre-size the caller's decode output arrays for |
| emit_adc 2 forms | |
|---|---|
| emit_adc_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_adc_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_alr | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_alr_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_anc | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_anc_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_and 2 forms | |
| emit_and_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_and_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_ane | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_ane_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_arr | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_arr_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_asl 2 forms | |
| emit_asl_a | proc(instructions: ^[dynamic]Instruction) |
| emit_asl_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_axs | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_axs_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_bbr0 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr0_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr1 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr1_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr2 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr2_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr3 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr3_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr4 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr4_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr5 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr5_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr6 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr6_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr7 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbr7_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs0 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs0_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs1 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs1_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs2 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs2_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs3 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs3_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs4 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs4_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs5 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs5_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs6 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs6_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs7 | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bbs7_zp_rel | proc(instructions: ^[dynamic]Instruction, zp: u8, label_id: u32) |
| emit_bcc | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bcc_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bcs | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bcs_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_beq | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_beq_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bit 2 forms | |
| emit_bit_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_bit_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_bmi | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bmi_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bne | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bne_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bpl | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bpl_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bra | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bra_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_brk | proc(instructions: ^[dynamic]Instruction) |
| emit_brk_none | proc(instructions: ^[dynamic]Instruction) |
| emit_bsr | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bsr_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bvc | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bvc_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bvs | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_bvs_rel | proc(instructions: ^[dynamic]Instruction, label_id: u32) |
| emit_cla | proc(instructions: ^[dynamic]Instruction) |
| emit_cla_none | proc(instructions: ^[dynamic]Instruction) |
| emit_clc | proc(instructions: ^[dynamic]Instruction) |
| emit_clc_none | proc(instructions: ^[dynamic]Instruction) |
| emit_cld | proc(instructions: ^[dynamic]Instruction) |
| emit_cld_none | proc(instructions: ^[dynamic]Instruction) |
| emit_cli | proc(instructions: ^[dynamic]Instruction) |
| emit_cli_none | proc(instructions: ^[dynamic]Instruction) |
| emit_clv | proc(instructions: ^[dynamic]Instruction) |
| emit_clv_none | proc(instructions: ^[dynamic]Instruction) |
| emit_clx | proc(instructions: ^[dynamic]Instruction) |
| emit_clx_none | proc(instructions: ^[dynamic]Instruction) |
| emit_cly | proc(instructions: ^[dynamic]Instruction) |
| emit_cly_none | proc(instructions: ^[dynamic]Instruction) |
| emit_cmp 2 forms | |
| emit_cmp_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_cmp_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_cpx 2 forms | |
| emit_cpx_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_cpx_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_cpy 2 forms | |
| emit_cpy_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_cpy_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_csh | proc(instructions: ^[dynamic]Instruction) |
| emit_csh_none | proc(instructions: ^[dynamic]Instruction) |
| emit_csl | proc(instructions: ^[dynamic]Instruction) |
| emit_csl_none | proc(instructions: ^[dynamic]Instruction) |
| emit_dcp | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_dcp_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_dea | proc(instructions: ^[dynamic]Instruction) |
| emit_dea_a | proc(instructions: ^[dynamic]Instruction) |
| emit_dec 2 forms | |
| emit_dec_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_dec_a | proc(instructions: ^[dynamic]Instruction) |
| emit_dex | proc(instructions: ^[dynamic]Instruction) |
| emit_dex_none | proc(instructions: ^[dynamic]Instruction) |
| emit_dey | proc(instructions: ^[dynamic]Instruction) |
| emit_dey_none | proc(instructions: ^[dynamic]Instruction) |
| emit_dop 2 forms | |
| emit_dop_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_dop_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_eor 2 forms | |
| emit_eor_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_eor_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_ina | proc(instructions: ^[dynamic]Instruction) |
| emit_ina_a | proc(instructions: ^[dynamic]Instruction) |
| emit_inc 2 forms | |
| emit_inc_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_inc_a | proc(instructions: ^[dynamic]Instruction) |
| emit_inx | proc(instructions: ^[dynamic]Instruction) |
| emit_inx_none | proc(instructions: ^[dynamic]Instruction) |
| emit_iny | proc(instructions: ^[dynamic]Instruction) |
| emit_iny_none | proc(instructions: ^[dynamic]Instruction) |
| emit_isc | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_isc_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_jam | proc(instructions: ^[dynamic]Instruction) |
| emit_jam_none | proc(instructions: ^[dynamic]Instruction) |
| emit_jmp | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_jmp_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_jsr | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_jsr_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_las | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_las_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_lax | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_lax_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_lda 2 forms | |
| emit_lda_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_lda_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_ldx 2 forms | |
| emit_ldx_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_ldx_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_ldy 2 forms | |
| emit_ldy_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_ldy_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_lsr 2 forms | |
| emit_lsr_a | proc(instructions: ^[dynamic]Instruction) |
| emit_lsr_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_lxa | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_lxa_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_nop | proc(instructions: ^[dynamic]Instruction) |
| emit_nop_none | proc(instructions: ^[dynamic]Instruction) |
| emit_ora 2 forms | |
| emit_ora_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_ora_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_pha | proc(instructions: ^[dynamic]Instruction) |
| emit_pha_none | proc(instructions: ^[dynamic]Instruction) |
| emit_php | proc(instructions: ^[dynamic]Instruction) |
| emit_php_none | proc(instructions: ^[dynamic]Instruction) |
| emit_phx | proc(instructions: ^[dynamic]Instruction) |
| emit_phx_none | proc(instructions: ^[dynamic]Instruction) |
| emit_phy | proc(instructions: ^[dynamic]Instruction) |
| emit_phy_none | proc(instructions: ^[dynamic]Instruction) |
| emit_pla | proc(instructions: ^[dynamic]Instruction) |
| emit_pla_none | proc(instructions: ^[dynamic]Instruction) |
| emit_plp | proc(instructions: ^[dynamic]Instruction) |
| emit_plp_none | proc(instructions: ^[dynamic]Instruction) |
| emit_plx | proc(instructions: ^[dynamic]Instruction) |
| emit_plx_none | proc(instructions: ^[dynamic]Instruction) |
| emit_ply | proc(instructions: ^[dynamic]Instruction) |
| emit_ply_none | proc(instructions: ^[dynamic]Instruction) |
| emit_rla | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rla_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb0 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb0_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb1 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb1_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb2 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb2_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb3 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb3_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb4 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb4_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb5 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb5_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb6 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb6_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb7 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rmb7_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rol 2 forms | |
| emit_rol_a | proc(instructions: ^[dynamic]Instruction) |
| emit_rol_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_ror 2 forms | |
| emit_ror_a | proc(instructions: ^[dynamic]Instruction) |
| emit_ror_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rra | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rra_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_rti | proc(instructions: ^[dynamic]Instruction) |
| emit_rti_none | proc(instructions: ^[dynamic]Instruction) |
| emit_rts | proc(instructions: ^[dynamic]Instruction) |
| emit_rts_none | proc(instructions: ^[dynamic]Instruction) |
| emit_sax 2 forms | |
| emit_sax_none | proc(instructions: ^[dynamic]Instruction) |
| emit_sax_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_say | proc(instructions: ^[dynamic]Instruction) |
| emit_say_none | proc(instructions: ^[dynamic]Instruction) |
| emit_sbc 2 forms | |
| emit_sbc_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_sbc_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_sec | proc(instructions: ^[dynamic]Instruction) |
| emit_sec_none | proc(instructions: ^[dynamic]Instruction) |
| emit_sed | proc(instructions: ^[dynamic]Instruction) |
| emit_sed_none | proc(instructions: ^[dynamic]Instruction) |
| emit_sei | proc(instructions: ^[dynamic]Instruction) |
| emit_sei_none | proc(instructions: ^[dynamic]Instruction) |
| emit_set | proc(instructions: ^[dynamic]Instruction) |
| emit_set_none | proc(instructions: ^[dynamic]Instruction) |
| emit_sha | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_sha_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_shx | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_shx_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_shy | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_shy_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_slo | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_slo_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb0 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb0_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb1 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb1_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb2 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb2_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb3 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb3_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb4 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb4_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb5 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb5_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb6 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb6_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb7 | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_smb7_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_sre | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_sre_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_st0 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_st0_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_st1 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_st1_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_st2 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_st2_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_sta | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_sta_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_stp | proc(instructions: ^[dynamic]Instruction) |
| emit_stp_none | proc(instructions: ^[dynamic]Instruction) |
| emit_stx | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_stx_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_sty | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_sty_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_stz | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_stz_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_sxy | proc(instructions: ^[dynamic]Instruction) |
| emit_sxy_none | proc(instructions: ^[dynamic]Instruction) |
| emit_tai | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tai_block | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tam | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_tam_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_tas | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_tas_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_tax | proc(instructions: ^[dynamic]Instruction) |
| emit_tax_none | proc(instructions: ^[dynamic]Instruction) |
| emit_tay | proc(instructions: ^[dynamic]Instruction) |
| emit_tay_none | proc(instructions: ^[dynamic]Instruction) |
| emit_tdd | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tdd_block | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tia | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tia_block | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tii | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tii_block | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tin | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tin_block | proc(instructions: ^[dynamic]Instruction, src, dst, length_val: u16) |
| emit_tma | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_tma_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_top | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_top_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_trb | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_trb_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_tsb | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_tsb_m | proc(instructions: ^[dynamic]Instruction, m: Memory) |
| emit_tst | proc(instructions: ^[dynamic]Instruction, imm: i64, m: Memory) |
| emit_tst_tst | proc(instructions: ^[dynamic]Instruction, imm: i64, m: Memory) |
| emit_tsx | proc(instructions: ^[dynamic]Instruction) |
| emit_tsx_none | proc(instructions: ^[dynamic]Instruction) |
| emit_txa | proc(instructions: ^[dynamic]Instruction) |
| emit_txa_none | proc(instructions: ^[dynamic]Instruction) |
| emit_txs | proc(instructions: ^[dynamic]Instruction) |
| emit_txs_none | proc(instructions: ^[dynamic]Instruction) |
| emit_tya | proc(instructions: ^[dynamic]Instruction) |
| emit_tya_none | proc(instructions: ^[dynamic]Instruction) |
| emit_usbc | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_usbc_imm8 | proc(instructions: ^[dynamic]Instruction, imm: i64) |
| emit_wai | proc(instructions: ^[dynamic]Instruction) |
| emit_wai_none | proc(instructions: ^[dynamic]Instruction) |
| 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 | (instructions: []Instruction) -> int |
| encode_max_relocation_count | (instructions: []Instruction) -> int |
| 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…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 | 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[rexcode_isa.Label_Offset]string = nil) |
| 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[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) -> InstructionHuC6280 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) -> InstructionBBR/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_string | proc(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) -> OperandAddress-mode-named operand helpers (call site reads like asm). |
| op_zp_x | (a: u8) -> Operand |
| op_zp_y | (a: u8) -> Operand |
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[rexcode_isa.Label_Offset]string = nil) | |
| 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[rexcode_isa.Label_Offset]string = nil) |
| reg_class | (r: Register) -> u16 |
| reg_hw | (r: Register) -> u8 |
| reg_is_gp | (r: Register) -> bool |
| 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[rexcode_isa.Label_Offset]string = nil) |
| 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[rexcode_isa.Label_Offset]string = nil) |
| 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[rexcode_isa.Label_Offset]string = nil) -> string |
| 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[rexcode_isa.Label_Offset]string = nil) -> string |
| 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[rexcode_isa.Label_Offset]string = nil) |
| 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[rexcode_isa.Label_Offset]string = nil) |
Procedure Groups
Listed with their procedures under Procedures.
Source Files
- decoder.odin
- encoder.odin
- encoding_types.odin
- instructions.odin
- mnemonic_builders.odin
- mnemonics.odin
- operands.odin
- printer.odin
- registers.odin
- reloc.odin
- tables.odin
Generation Information
Generated with odin version dev-2026-10 (vendor "odin") Windows_amd64 @ 2026-10-10 00:25:51.511820200 +0000 UTC