add in logging for when errors happen

This commit is contained in:
able 2024-05-03 12:43:04 -05:00
parent 2019b49447
commit e54e75e6f0

16
lasp.S
View file

@ -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