From 7b28a68eb9fb032f5e71193ac858b1cc9848156b Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sat, 8 Nov 2025 02:31:11 -0800 Subject: add workaround for 8-byte strings (yepppppp) Force-Push: yepppppp Change-Id: I3afbaf2af5b2d31ba435fdad759117c7fb52c1d8 --- quine.asm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'quine.asm') diff --git a/quine.asm b/quine.asm index d588b1c..54e9d2f 100644 --- a/quine.asm +++ b/quine.asm @@ -2193,10 +2193,10 @@ cold_start: dq lit, 8, packalign, early_here_store ; TODO why does this crash? - ;dq litstring, "stringlen", early_create, early_self_codeword, early_here - ;dq fetch + dq litstring, "stringlen", early_create, early_self_codeword, early_here + dq fetch ; TODO - ;dq lit, 8, packalign, early_here_store + dq lit, 8, packalign, early_here_store dq litstring, "branch", early_create, early_self_codeword, early_here, fetch ; TODO @@ -2208,11 +2208,12 @@ cold_start: ; TODO dq lit, 8, packalign, early_here_store - ; TODO why does this crash? - ;dq litstring, "sys_exit", early_create, early_self_codeword, early_here - ;dq fetch + ; This name is exactly eight bytes long. Don't even ask (go read litstring's + ; code if you really need to know). + dq litstring, "sys_exit", 0, early_create, early_self_codeword, early_here + dq fetch ; TODO - ;dq lit, 8, packalign, early_here_store + dq lit, 8, packalign, early_here_store dq litstring, "sys_write", early_create, early_self_codeword, early_here dq fetch @@ -2220,9 +2221,8 @@ cold_start: dq lit, 8, packalign, early_here_store dq litstring, "emitstring", early_create, early_self_codeword, early_here - ; TODO this is actually in Forth dq fetch - ; TODO + ; TODO this is actually in Forth dq lit, 8, packalign, early_here_store dq litstring, "crash", early_create, early_self_codeword, early_here, fetch @@ -2276,11 +2276,12 @@ cold_start: ; TODO dq lit, 8, packalign, early_here_store - ; TODO why does this crash? - ;dq litstring, "litpack8", early_create, early_self_codeword, early_here - ;dq fetch + ; This name is exactly eight bytes long. Don't even ask (go read litstring's + ; code if you really need to know). + dq litstring, "litpack8", 0, early_create, early_self_codeword, early_here + dq fetch ; TODO - ;dq lit, 8, packalign, early_here_store + dq lit, 8, packalign, early_here_store ;;; For triage's sake, here's an inventory of everything else in the file. ;;; -- cgit 1.4.1