added serial-out support to emulator + serial lib & command line mode for dsa emulator
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
// GENERATED BY DSC COMPILER
|
||||
// Generated at 2026-02-23 18:58:53
|
||||
|
||||
// Imports
|
||||
include print: "./lib/print.dsa"
|
||||
|
||||
// Globals & Reserved Memory
|
||||
|
||||
// Entry Point
|
||||
dw stack: 0x010000
|
||||
db message: "Process Exited with code:"
|
||||
_init:
|
||||
ldw stack, bpr, 0
|
||||
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
|
||||
|
||||
db str_1: "Hello, World!"
|
||||
// fn main() -> void
|
||||
main:
|
||||
push bpr
|
||||
mov spr, bpr
|
||||
lwi str_1, rg0
|
||||
// push arg 0
|
||||
push rg0
|
||||
call print::print
|
||||
pop zero
|
||||
jmp _ret
|
||||
Reference in New Issue
Block a user