add in logging for when errors happen
This commit is contained in:
parent
2019b49447
commit
e54e75e6f0
16
lasp.S
16
lasp.S
|
@ -60,14 +60,14 @@ open_paren:
|
||||||
jmp inc_ptr_ld_char
|
jmp inc_ptr_ld_char
|
||||||
|
|
||||||
closed_paren:
|
closed_paren:
|
||||||
un
|
jmp log_lisp_error
|
||||||
|
|
||||||
eval_stack:
|
eval_stack:
|
||||||
jmp pop_u64_stack
|
jmp pop_u64_stack
|
||||||
jmp panic
|
jmp panic
|
||||||
|
|
||||||
panic:
|
panic:
|
||||||
tx
|
jmp log_lisp_error
|
||||||
|
|
||||||
lisp:
|
lisp:
|
||||||
.db "(+ 1 2 3 4 5 6 7 8 9 10)"
|
.db "(+ 1 2 3 4 5 6 7 8 9 10)"
|
||||||
|
@ -79,3 +79,15 @@ builtin_lambda:
|
||||||
|
|
||||||
builtin_quote:
|
builtin_quote:
|
||||||
.db "'"
|
.db "'"
|
||||||
|
|
||||||
|
log_lisp_error:
|
||||||
|
li64 r1, 3
|
||||||
|
li64 r2, 1
|
||||||
|
lra16 r3, r0, lisp_error
|
||||||
|
li64 r4, 32
|
||||||
|
eca
|
||||||
|
tx
|
||||||
|
|
||||||
|
lisp_error:
|
||||||
|
.db "Some sort of error has occured."
|
||||||
|
.db 0
|
Loading…
Reference in a new issue