_offc_probe_m0b.nx source
↩ module page · 16 lines · 440 B
1// probe_m0b.nx -- minimal smoke for the gcc-as -> nxasm swap.
2//
3// Prints "OK\n" + exits 0. If nxasm produces a working ELF for this,
4// the indirect-call codegen is healthy AND the alias-stub mechanism
5// holds through the full toolchain.
6
7import "syscalls.nx"
8
9func main() -> i64 {
10 let msg: *u8 = sys_mmap(8)
11 msg[0] = 0x4F // 'O'
12 msg[1] = 0x4B // 'K'
13 msg[2] = 0x0A // '\n'
14 sys_write(1, msg, 3)
15 return 0
16}