forth-riscv

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

commit b5a94e81d55c06ada9fc70de3a50b8f843130447
parent 81167dcccd000cd0ff297a9f42464c0fbf43b215
Author: Christian Ermann <christianermann@gmail.com>
Date:   Fri,  8 Nov 2024 21:28:23 -0800

Add 'words' to print all words in dictionary

Diffstat:
Mforth.f | 12++++++++++++
Mforth.s | 1-
Mriscv32-virt.ld | 2++
3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/forth.f b/forth.f @@ -137,3 +137,15 @@ create stack-actual 32 cells allot drop ; t{ 1 1 + -> 2 }t + +: words + latest + begin + @ ?dup + while + dup 2 cells + @ + ?dup if + dup 1 + swap c@ + type cr + then + repeat ; diff --git a/forth.s b/forth.s @@ -82,7 +82,6 @@ link_\+: .endm this_link -.int 0 .macro defhead name, label, hash, code, flags=0 .section ".rodata" diff --git a/riscv32-virt.ld b/riscv32-virt.ld @@ -22,5 +22,7 @@ SECTIONS { . = ALIGN(4); __here_start = .; __meta_start = __here_start + 0x7000000; + + link_0 = 0; }