summary refs log tree commit diff
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-04-13 00:56:24 -0700
committerIrene Knapp <ireneista@irenes.space>2026-04-13 00:56:24 -0700
commit67af5f27f4a63a1539a6835924d9101bca396c70 (patch)
treee0e3e9eb0837db82d48661413ae3eea0b99e5231
parent912b8798482cd786a2ffe4db93be205f5b7d05d2 (diff)
stop heap implementations from referencing the data segment
there were a few places where this was inadvertently happening, mostly due to using the wrong name for things

this should be all of them, based on searching the debug output for references to the wrong memory area

Force-Push: yes
Change-Id: I2023e3986f6ab15ff394cca759af3cb98c8ee923
-rw-r--r--quine.asm50
1 files changed, 29 insertions, 21 deletions
diff --git a/quine.asm b/quine.asm
index 05e3fb3..e2703a4 100644
--- a/quine.asm
+++ b/quine.asm
@@ -2641,7 +2641,7 @@ cold_start:
   dq lit, 5, early_comma
   dq litstring, "unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "*", early_find, entry_to_execution_token, early_comma
-  dq litstring, "roll3", early_find, entry_to_execution_token, early_comma
+  dq litstring, "3roll", early_find, entry_to_execution_token, early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
   dq litstring, "+", early_find, entry_to_execution_token, early_comma
@@ -2817,7 +2817,7 @@ cold_start:
   dq lit, -1, early_comma
   dq litstring, "*", early_find, entry_to_execution_token, early_comma
   dq litstring, "litstring", early_find, entry_to_execution_token, early_comma
-  dq litstring, "-", early_comma
+  dq lit, "-", early_comma
   dq litstring, "emitstring", early_find, entry_to_execution_token
   dq early_comma
   dq litstring, "swap", early_find, entry_to_execution_token, early_comma
@@ -3160,7 +3160,8 @@ cold_start:
   dq early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token
+  dq early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   dq litstring, "extrareg64", early_create, early_docol_codeword
@@ -3244,7 +3245,8 @@ cold_start:
   dq early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token
+  dq early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   dq litstring, "reg32", early_create, early_docol_codeword
@@ -3328,7 +3330,8 @@ cold_start:
   dq early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token
+  dq early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   dq litstring, "reg16", early_create, early_docol_codeword
@@ -3412,7 +3415,8 @@ cold_start:
   dq early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token
+  dq early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   dq litstring, "reg8", early_create, early_docol_codeword
@@ -3496,7 +3500,8 @@ cold_start:
   dq early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token
+  dq early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   dq litstring, "scalefield", early_create, early_docol_codeword
@@ -3548,7 +3553,8 @@ cold_start:
   dq early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token
+  dq early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   dq litstring, "conditioncode", early_create, early_docol_codeword
@@ -3633,7 +3639,7 @@ cold_start:
   dq lit, 7, early_comma
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq litstring, "dup", early_find, entry_to_execution_token, early_comma
-  dq litstring, ":cc-sign", early_find, entry_to_execution_token
+  dq litstring, ":cc-sign", 0, early_find, entry_to_execution_token
   dq early_comma
   dq litstring, "=", early_find, entry_to_execution_token, early_comma
   dq litstring, "0branch", early_find, entry_to_execution_token, early_comma
@@ -3653,7 +3659,7 @@ cold_start:
   dq lit, 9, early_comma
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq litstring, "dup", early_find, entry_to_execution_token, early_comma
-  dq litstring, ":cc-even", early_find, entry_to_execution_token
+  dq litstring, ":cc-even", 0, early_find, entry_to_execution_token
   dq early_comma
   dq litstring, "=", early_find, entry_to_execution_token, early_comma
   dq litstring, "0branch", early_find, entry_to_execution_token, early_comma
@@ -3673,7 +3679,7 @@ cold_start:
   dq lit, 11, early_comma
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq litstring, "dup", early_find, entry_to_execution_token, early_comma
-  dq litstring, ":cc-less", early_find, entry_to_execution_token
+  dq litstring, ":cc-less", 0, early_find, entry_to_execution_token
   dq early_comma
   dq litstring, "=", early_find, entry_to_execution_token, early_comma
   dq litstring, "0branch", early_find, entry_to_execution_token, early_comma
@@ -3721,7 +3727,8 @@ cold_start:
   dq early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token
+  dq early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   ; This was "rex_w".
@@ -3831,7 +3838,8 @@ cold_start:
   dq early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token
+  dq early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   ; This was "addressing_disp8_reg64".
@@ -3906,7 +3914,7 @@ cold_start:
   dq litstring, "emitstring", early_find, entry_to_execution_token
   dq early_comma
   dq lit, 1, early_comma
-  dq litstring, "sys-exit", early_find, entry_to_execution_token, early_comma
+  dq litstring, "sys-exit", 0, early_find, entry_to_execution_token, early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
 
   ; This was "addressing_disp8_indexed_reg64".
@@ -3947,7 +3955,7 @@ cold_start:
   dq litstring, "reg8", early_find, entry_to_execution_token, early_comma
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 3, early_comma
-  dq litstring, "unroll3", early_find, entry_to_execution_token, early_comma
+  dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "modrm", early_find, entry_to_execution_token, early_comma
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
@@ -4037,7 +4045,7 @@ cold_start:
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 0x89, early_comma
   dq litstring, "pack8", early_find, entry_to_execution_token, early_comma
-  dq litstring, "unroll3", early_find, entry_to_execution_token, early_comma
+  dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "swap", early_find, entry_to_execution_token, early_comma
   dq litstring, "reg64", early_find, entry_to_execution_token, early_comma
   dq litstring, "swap", early_find, entry_to_execution_token, early_comma
@@ -4119,7 +4127,7 @@ cold_start:
   dq litstring, "unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "swap", early_find, entry_to_execution_token, early_comma
-  dq litstring, "addressing-indexed-reg64", early_find
+  dq litstring, "addressing-indexed-reg64", 0, early_find
   dq entry_to_execution_token, early_comma
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
@@ -4145,7 +4153,7 @@ cold_start:
   dq litstring, "unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "swap", early_find, entry_to_execution_token, early_comma
-  dq litstring, "addressing-indexed-reg64", early_find
+  dq litstring, "addressing-indexed-reg64", 0, early_find
   dq entry_to_execution_token, early_comma
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store
@@ -4179,7 +4187,7 @@ cold_start:
   dq litstring, "unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "3roll", early_find, entry_to_execution_token, early_comma
   dq litstring, "reg32", early_find, entry_to_execution_token, early_comma
-  dq litstring, "unroll3", early_find, entry_to_execution_token, early_comma
+  dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "addressing-disp8-reg64", early_find
   dq entry_to_execution_token, early_comma
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
@@ -4338,7 +4346,7 @@ cold_start:
   dq litstring, "lit", early_find, entry_to_execution_token, early_comma
   dq lit, 0x8A, early_comma
   dq litstring, "pack8", early_find, entry_to_execution_token, early_comma
-  dq litstring, "unroll3", early_find, entry_to_execution_token, early_comma
+  dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "reg8", early_find, entry_to_execution_token, early_comma
   dq litstring, "swap", early_find, entry_to_execution_token, early_comma
   dq litstring, "addressing-indirect-reg64", early_find
@@ -4417,7 +4425,7 @@ cold_start:
   dq litstring, "unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "3unroll", early_find, entry_to_execution_token, early_comma
   dq litstring, "swap", early_find, entry_to_execution_token, early_comma
-  dq litstring, "addressing-indexed-reg64", early_find
+  dq litstring, "addressing-indexed-reg64", 0, early_find
   dq entry_to_execution_token, early_comma
   dq litstring, "exit", early_find, entry_to_execution_token, early_comma
   dq early_here, fetch, lit, 8, packalign, early_here_store