From 17e9bfaefd92e436e27da134cd16c4b8cb4e10a2 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Wed, 2 Feb 2022 18:07:42 -0800 Subject: [PATCH] Make size measures easier to use, use 32-bit for emu. --- ueforth/Makefile | 5 ++++- ueforth/common/utils.fs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ueforth/Makefile b/ueforth/Makefile index 806ed84..2798e00 100644 --- a/ueforth/Makefile +++ b/ueforth/Makefile @@ -345,7 +345,7 @@ $(ESP32_SIM): $(GEN)/print-esp32-builtins: \ esp32/print-builtins.cpp esp32/builtins.h | $(GEN) - $(CXX) $(CFLAGS) $< -o $@ + $(CXX) $(CFLAGS) -m32 $< -o $@ $(GEN)/esp32_sim_opcodes.h: $(GEN)/print-esp32-builtins | $(GEN) $< >$@ @@ -364,6 +364,9 @@ $(ESP32_SIM)/Esp32forth-sim: \ $(CXX) $(CFLAGS) $< -o $@ strip $(STRIP_ARGS) $@ +size: + echo internals size-all bye | $(ESP32_SIM)/Esp32forth-sim + # ---- ESP32 ---- esp32: esp32_target esp32_sim esp32_tests esp32_sim_tests diff --git a/ueforth/common/utils.fs b/ueforth/common/utils.fs index 2c60691..4c61917 100644 --- a/ueforth/common/utils.fs +++ b/ueforth/common/utils.fs @@ -79,7 +79,7 @@ internals definitions ( Words to measure size of things ) : size-vocabulary ( voc ) @ begin dup nonvoc? while - dup see. dup >size . cr >link + dup >size . dup see. cr >link repeat drop cr ; : size-all last-vocabulary @ begin dup while