Files
damn_simple_architecture/resources/dsa/test.dsa
T
2026-02-13 21:42:59 +00:00

51 lines
693 B
Plaintext

// GENERATED BY DSC COMPILER
// Generated at 2026-02-10 01:04:01
// Imports
include print: "./lib/io/print.dsa"
// Globals & Reserved Memory
// Entry Point
dw stack: 0x10000
db message: "Process Exited with code:"
_init:
ldw stack, bpr
mov bpr, spr
push zero
call main
call print::print_newline
lwi message, rg0
push rg0
call print::print
pop zero
call print::print_hex_word
pop zero
hlt
// Return
_ret:
mov bpr, spr
pop bpr
return
// Compiled Code Starts...
// fn main() -> u32
main:
push bpr
mov spr, bpr
lli 30, rg0
push rg0 // free var:x offset:-8
push rg0 // push arg 0
call print::print_num
pop zero
lli 200, rg0
lli 5, rg1
add rg0, rg1, rg2
jmp _ret