From e54e75e6f07ec4ca508ac1bd2ff2c1ed3f02e591 Mon Sep 17 00:00:00 2001 From: able Date: Fri, 3 May 2024 12:43:04 -0500 Subject: [PATCH] add in logging for when errors happen --- lasp.S | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lasp.S b/lasp.S index 4bb3c4d..eb18506 100644 --- a/lasp.S +++ b/lasp.S @@ -60,14 +60,14 @@ open_paren: jmp inc_ptr_ld_char closed_paren: - un + jmp log_lisp_error eval_stack: jmp pop_u64_stack jmp panic panic: - tx + jmp log_lisp_error lisp: .db "(+ 1 2 3 4 5 6 7 8 9 10)" @@ -78,4 +78,16 @@ builtin_lambda: .db "λ" builtin_quote: - .db "'" \ No newline at end of file + .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 \ No newline at end of file