forth-riscv

My forth
git clone git://git.electrosoup.com/forth-riscv
Log | Files | Refs

commit ddb4715034d482ef8cb1df14f13868e0c7fa8410
parent 5e84c64a4cc060164e6823d96e7ba193abc55756
Author: Christian Ermann <christianermann@gmail.com>
Date:   Sun, 30 Mar 2025 13:49:35 -0700

Change input of 'execute' from a 'cfa' to an 'xt'

Diffstat:
Msrc/forth.s | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/forth.s b/src/forth.s @@ -760,7 +760,9 @@ defcode ">cfa", to_cfa, 0x8CAC3233 next defcode "execute", execute, 0xA01E3D98 - load_cell x, 0(w) + # Execute a word + # ( xt -- ) + mv x, w pop w jr x # 'next' should be called by the executed word @@ -790,9 +792,8 @@ _interpret_word: jal compile_comma j _interpret_start _interpret_macro: - load_cell x, 0(w) - pop w - jalr x + load_cell w, 0(w) + jal execute j _interpret_start _interpret_number: jal drop