commit 5fc529a960accf10f51736dbb3e8f29db7708259
parent 261b648b59dde9167f8e8bdb86bec8f62d624cbd
Author: Christian Ermann <christianermann@gmail.com>
Date: Thu, 5 Dec 2024 19:04:45 -0800
Restart on exception (for now)
Diffstat:
2 files changed, 2 insertions(+), 35 deletions(-)
diff --git a/src/forth.s b/src/forth.s
@@ -1003,14 +1003,6 @@ _branch_done:
addi ra, ra, cell
next
-defword "debug>", debug_prompt, 0xCCE21C52
- push w
- la w, _debug_prompt
- la x, _debug_prompt_len
- jal uart_put_string
- pop w
- exit
-
defcode "prompt", prompt, 0xDFE6493B
push w
la w, _prompt
@@ -1042,23 +1034,8 @@ defword "quit", quit, 0x47878736
jal branch
.int quit
-defword "debug", debug, 0x5864ED98
- jal debug_prompt
- jal refill
- jal drop
- jal interpret
- jal okay
- j debug
-
-defcode "resume", resume, 0xFF39A36A
- la w, abort
- pop_ret zero
- next
-
defcode "abort", abort, 0xA52BCAF9
- la psp, __stacktop
- li w, 0xDEADC0DE
- jal quit
+ jal start
# -----------------------------------------------------------------------------
# memory access
@@ -1829,10 +1806,6 @@ _prompt:
.ascii "> "
_prompt_len = (. - _prompt)
-_debug_prompt:
- .ascii "debug> "
-_debug_prompt_len = (. - _debug_prompt)
-
_okay:
.ascii "ok\n"
_okay_len = (. - _okay)
@@ -1870,8 +1843,5 @@ start:
push_addr version_string
push_imm version_string_len
- push_addr version_string
- push_imm version_string_len
-
jal program
diff --git a/src/trap.s b/src/trap.s
@@ -34,10 +34,7 @@ trap_exception:
lw w, 4(w)
jal uart_put_string
- lw w, 0(psp)
- addi psp, psp, 4
-
- jal debug
+ la w, abort
csrw mepc, w
csrr t0, mscratch