summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--evoke.e3
-rw-r--r--execution.e4
-rw-r--r--transform.e26
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