From 2cf147357ce578c3bc589b894930c71d709022e1 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Fri, 15 May 2026 05:15:39 -0700 Subject: fix things up so it gets through cold-start then it crashes on warm-start because warm-start doesn't exist yet Force-Push: yes Change-Id: I9eba481b31d48f9d32c3790f296204c5c8d90938 --- evoke.e | 3 ++- execution.e | 4 ++-- transform.e | 26 +++++++++++++------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/evoke.e b/evoke.e index 14ac458..f6052a5 100644 --- a/evoke.e +++ b/evoke.e @@ -1,4 +1,5 @@ -~ cat labels.e elf.e execution.e evoke.e | ./quine > evoke && chmod 755 evoke && ./evoke +~ cat labels.e elf.e execution.e transform.e evoke.e \ +~ | ./quine > evoke && chmod 755 evoke && ./evoke ~ (output memory start, current output point ~ -- output memory start, current output point) diff --git a/execution.e b/execution.e index 9ddcec6..04c859b 100644 --- a/execution.e +++ b/execution.e @@ -463,7 +463,7 @@ ~ We are about to set up rsi, we did rbp already, and rsp came to us ~ already set up. That's all that "next" needs, so take it away! - L@' warm-start :rsi mov-reg64-imm64 + L@' warm-start origin + :rsi mov-reg64-imm64 pack-next ; ~ Routine warm-start @@ -592,7 +592,7 @@ ~ Since docol is not a normal word, the label points to the value we care ~ about from the assembly side of things, which is the address we use as the ~ codeword. - L!' docol + current-offset L!' docol :rsi pack-pushcontrol 8 :rax add-reg64-imm8 :rax :rsi mov-reg64-reg64 diff --git a/transform.e b/transform.e index 83eea8a..7226ff1 100644 --- a/transform.e +++ b/transform.e @@ -212,17 +212,17 @@ { main-input-buffer pop-input-buffer exit } if } forever ; -1024 allocate dup -." compilation output buffer" newline dup hexdump -transform -: za ." ZA" 12 13 - . ; -: ' word value@ find dropstring-with-result - interpreter-flags @ 1 & { literal } if ; make-immediate -~ ' za . newline -pyrzqxgl -." back back back " here @ .hex64 newline -~ ." stack after " stackhex -~ 2dup swap hexdump-between -~ : piz ." PIZ" ' za . newline ; piz -bye +~ 1024 allocate dup +~ ." compilation output buffer" newline dup hexdump +~ transform +~ : za ." ZA" 12 13 - . ; +~ : ' word value@ find dropstring-with-result +~ interpreter-flags @ 1 & { literal } if ; make-immediate +~ ~ ' za . newline +~ pyrzqxgl +~ ." back back back " here @ .hex64 newline +~ ~ ." stack after " stackhex +~ ~ 2dup swap hexdump-between +~ ~ : piz ." PIZ" ' za . newline ; piz +~ bye -- cgit 1.4.1