code wiki / (root) / nx_smoke_nxasm_demo.nx

nx_smoke_nxasm_demo.nx

buildroot/runtime/nx_smoke_nxasm_demo.nx

1433 B28 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind smoketopic smoke
docsdependenciesstructsconstsfunctions

about

Take nxc2's actual asm output for a simple program and try to assemble it with nxasm_v2. Returns: 200 + 0..63 if assemble returned -1 (unknown mnemonic) 201 if assemble returned -2 (pass 1 fail) 202 if assemble returned -3 (pass 2 fail) 0..127 = code byte count (n & 0x7F) 128..199 if n was unexpectedly negative

dependencies 2 imports · 0 importers

nx_syscalls.nx nxasm_v2.nx nx_smoke_nxasm_demo.nx

imports: nx_syscalls.nxnxasm_v2.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main alloc assemble alloc assemble_pass next_tok lex_one is_space asm_is_digit is_hex asm_is_digit ↻ hexv asm_is_alpha skip_to_newline label_define sys_write s_eq5 handle_word expect_int next_tok ↻ emit_u32 next_tok ↻ handle_byte expect_int ↻ emit_byte next_tok ↻ handle_skip expect_int ↻ emit_byte ↻ s_eq6 handle_asciz next_tok ↻ emit_byte ↻ assemble_mnemonic parse_j_label next_tok ↻ sys_write ↻ enc_j label_find label_eq

structs

none

consts

none

functions

18func main() -> i64
calls 2: allocassemble