summary refs log tree commit diff
path: root/hello.e
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-05-07 18:56:23 -0700
committerIrene Knapp <ireneista@irenes.space>2026-05-07 20:05:52 -0700
commit1fdeeb54b127fcd600d16c48c3b1b90e91f2ca28 (patch)
treebdf51f4797f292e72baba1a7bfb057b30872e468 /hello.e
parentf206829ac1a58a27657e1c264aabdd2cc760ff28 (diff)
document labels.e; also clean up elf.e
the documentation in labels.e is entirely new, synthesized from informal private discussions.

this is also intended as a final pass to make sure all the comments and nuances in the ELF code from quine.asm are incorporated in elf.e.

also this uses the new `L@'` and `L!'` facilities for terseness

Force-Push: yes
Change-Id: Ieabb2bb26f4b83260f0072dcdcd0950f9aa9fab2
Diffstat (limited to 'hello.e')
-rw-r--r--hello.e12
1 files changed, 6 insertions, 6 deletions
diff --git a/hello.e b/hello.e
index 63f19c4..fcafa25 100644
--- a/hello.e
+++ b/hello.e
@@ -1,11 +1,11 @@
 ~ cat labels.e elf.e hello.e | ./quine > hello && chmod 755 hello && ./hello
 
 : output-start-routine
-  current-offset L' start set-label
+  current-offset L!' cold-start
   1 :rax mov-reg64-imm32
   1 :rdi mov-reg64-imm64
-  origin L' greeting use-label + :rsi mov-reg64-imm64
-  L' greeting-size use-label :rdx mov-reg64-imm64
+  origin L@' greeting + :rsi mov-reg64-imm64
+  L@' greeting-size :rdx mov-reg64-imm64
   syscall
   60 :rax mov-reg64-imm32
   0 :rdi mov-reg64-imm32
@@ -13,9 +13,9 @@
   ;
 
 : output-greeting
-  current-offset dup L' greeting set-label 3unroll
+  current-offset dup L!' greeting 3unroll
   s" Hello, Irenes!" packstring
-  current-offset 4 roll - L' greeting-size set-label ;
+  current-offset 4 roll - L!' greeting-size ;
 
 ~ (output memory start, current output point
 ~  -- output memory start, current output point)
@@ -27,7 +27,7 @@
   elf-program-header
   output-start-routine
   output-greeting
-  current-offset L' total-size set-label
+  current-offset L!' total-size
   ;
 
 ' all-contents entry-to-execution-token label-loop