23 lines
569 B
Common Lisp
23 lines
569 B
Common Lisp
((code
|
|
(label main
|
|
(load-immediate $1 &hello-str) ; load hello string ptr
|
|
(push $1)
|
|
(call &pln)
|
|
(halt)) ; done
|
|
(label pln
|
|
(load-immediate $0 &terminal-namespace) ; get terminal device
|
|
(load-immediate $11 0)
|
|
(syscall OPEN $0 $0 $11)
|
|
(load-immediate $3 &new-line)
|
|
(pop $1)
|
|
(load-offset-32 $7 $0 4) ; load handle
|
|
(string-length $2 $1)
|
|
(syscall WRITE $7 $1 $2)
|
|
(string-length $4 $3)
|
|
(syscall WRITE $7 $3 $4)
|
|
(return)))
|
|
(data
|
|
(label terminal-namespace "/dev/term/0")
|
|
(label new-line "\n")
|
|
(label hello-str "nuqneH 'u'?")))
|