20 lines
307 B
Common Lisp
20 lines
307 B
Common Lisp
((code (
|
|
(label main)
|
|
(load-imm $0 1)
|
|
(push $0)
|
|
(load-imm $0 1)
|
|
(call &add)
|
|
(pop $0)
|
|
(itos $1 $0)
|
|
(load $3 &terminal_str)
|
|
(strlen $2 $1)
|
|
(syscall DEVICE_WRITE, $3, $1, $2)
|
|
(halt)
|
|
(label add)
|
|
(pop $0)
|
|
(pop $1)
|
|
(addi $2 $1 $0)
|
|
(push $2)
|
|
(return)))
|
|
(data (label terminal_str "/dev/term/0")))
|