From b564cab848ca4de050304cc8b53196a3420018a6 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sat, 16 May 2026 00:56:52 -0700 Subject: it WORKS. WOW. nice. more specifically, a generated hello-world that uses cold- and warm-start, and both assembly and Forth words, correctly calls the kernel's exit() with a parameter provided by a literal. Force-Push: yes Change-Id: I9a08f9cdad6bd0037a41655eecff6debea5f9ac3 --- transform.e | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'transform.e') diff --git a/transform.e b/transform.e index e913d42..e788836 100644 --- a/transform.e +++ b/transform.e @@ -224,9 +224,9 @@ allocate-transform-state s" transform-state" variable : L; ~ This looks up "exit" by label. swap-transform-variables - L@' exit L@' origin + L@' exit swap-transform-variables - + , + transform-offset , latest @ unhide-entry @@ -242,7 +242,10 @@ allocate-transform-state s" transform-state" variable ~ before attempting to understand "L;asm". : L;asm here @ pack-next 8 packalign here ! - latest @ dup unhide-entry entry-to-execution-token dup 8 + swap ! + latest @ dup unhide-entry entry-to-execution-token + ~ The codeword needs to be transformed to the target address space. + dup 8 + transform-offset + swap ! ~ Since [ is an immediate word, we have to go to extra trouble to compile ~ it as part of ;asm. @@ -344,7 +347,7 @@ allocate-transform-state s" transform-state" variable ~ ~ Fortunately we don't have to look at it, just append it to the heap ~ and clean up. - drop , dropstring 0 exit + transform-offset , drop dropstring 0 exit } if } if } if -- cgit 1.4.1