SPINE-64 is a custom assembly language that compiles to x86-64 binary. It is the assembly layer of the ThOS stack, sitting beneath Ground which sits beneath Thorn.
Readable syntax, not x86 syntax. Clean mnemonics, English-style keywords.
ret / rax — return value / accumulatorr1 / rbx — general purposecnt / rcx — counterdta / rdx — second return valuesrc / rsi — sourcedst / rdi — destinationr2–r9 — general purposem1, m2 — reserved for processes (kernel cannot touch)Special registers (compiler managed):
stp / rsp — stack top pointersbp / rbp — stack base pointersip / rip — stack instruction pointercarry — set if unsigned overflowoverflow — set if signed overflowzero — set if result is exactly 0Appended to memory instructions with dot notation:
.1 — 1 byte.2 — 2 bytes.4 — 4 bytes.8 — 8 bytesExample: move.4 ret [0x1000]
module code — all code goes heremodule data — all initialized data goes heremodule reserve — all uninitialized data goes hereRegisters can be aliased for readability:
alias reg myCounter
Data Movement: move, push, pop, lma (load memory address), swap, movesx (move + sign extend), movezx (move + zero extend)
Arithmetic: add, sub, mul, smul (signed multiply), div, sdiv (signed divide), inc, dec, neg, awc (add with carry), swb (subtract with borrow)
Bitwise: and, or, xor, not, shl, shr, asr, rotl, rotr, racl, racr
Comparison and Jump: cmp with operators: ==, !=, >=, <=, >, < — go label
Functions: fn funcname / fn global funcname / raw fn funcname — call, return, extern
Loops: loop ... end
System: syscall, nope (nop), halt, ioff, ion, pr, pw, int, reti
[0x1000] — fixed address[r1] — address in register[r1 + 8] — base + fixed offset[r1 + r2] — base + register offset[r1 + r2 * 4] — base + scaled index[r1 + r2 * 4 + 16] — base + scaled index + offsetmodule data
message "hello world" 0
count 0 4
module reserve
buffer 1024
module code
fn global main
start
lma src message
move cnt 11
loop
start
move.1 ret [src]
inc src
dec cnt
cmp cnt == 0 go done
end
done:
halt
end
Copyright ©2026 hikikomori.no — All Rights Reserved