From 18db55ec6d6f98b4d4495ecaab68f255f9fae60a Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Wed, 6 May 2026 20:24:31 -0700 Subject: "word" no longer consumes the terminating whitespace this fixes a "bug" where a "~" as the last thing on a line would comment the following line this is a user-visible API change, but the only thing that needed to be modified right now was s" Force-Push: yes Change-Id: Iad062581dfdd8603ab75d58b1ca304ea6eb55c37 --- quine.asm | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/quine.asm b/quine.asm index 53580e7..2386a82 100644 --- a/quine.asm +++ b/quine.asm @@ -6600,10 +6600,10 @@ cold_start: dq early_here, fetch, lit, 8, packalign, early_here_store - dq litstring, "key", early_create, early_docol_codeword + dq litstring, "peek", early_create, early_docol_codeword dq litstring, "main-input-buffer", early_find, entry_to_execution_token dq early_comma - dq litstring, "key-from", 0, early_find, entry_to_execution_token + dq litstring, "peek-from", early_find, entry_to_execution_token dq early_comma dq litstring, "exit", early_find, entry_to_execution_token, early_comma dq early_here, fetch, lit, 8, packalign, early_here_store @@ -6616,6 +6616,14 @@ cold_start: dq litstring, "exit", early_find, entry_to_execution_token, early_comma dq early_here, fetch, lit, 8, packalign, early_here_store + dq litstring, "key", early_create, early_docol_codeword + dq litstring, "main-input-buffer", early_find, entry_to_execution_token + dq early_comma + dq litstring, "key-from", 0, early_find, entry_to_execution_token + dq early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + dq early_here, fetch, lit, 8, packalign, early_here_store + ;;; As a convenience for "word", we have some facilities for working with ;;; stack-allocated strings. Yeah, trippy concept. Also, it would be a @@ -6990,7 +6998,7 @@ cold_start: dq litstring, "accumulate-string", early_find, entry_to_execution_token dq early_comma - dq litstring, "key", early_find, entry_to_execution_token, early_comma + dq litstring, "peek", early_find, entry_to_execution_token, early_comma dq litstring, "dup", early_find, entry_to_execution_token, early_comma dq litstring, "is-space", 0, early_find, entry_to_execution_token dq early_comma @@ -6998,14 +7006,15 @@ cold_start: dq lit, 0, early_comma dq litstring, "=", early_find, entry_to_execution_token, early_comma dq litstring, "0branch", early_find, entry_to_execution_token, early_comma - dq lit, 7*8, early_comma + dq lit, 8*8, early_comma dq litstring, "dup", early_find, entry_to_execution_token, early_comma dq litstring, "0branch", early_find, entry_to_execution_token, early_comma - dq lit, 4*8, early_comma + dq lit, 5*8, early_comma + dq litstring, "consume", early_find, entry_to_execution_token, early_comma dq litstring, "accumulate-string", early_find, entry_to_execution_token dq early_comma dq litstring, "branch", early_find, entry_to_execution_token, early_comma - dq lit, -13*8, early_comma + dq lit, -14*8, early_comma dq litstring, "drop", early_find, entry_to_execution_token, early_comma dq litstring, "exit", early_find, entry_to_execution_token, early_comma @@ -11704,6 +11713,7 @@ defword boot_source, 0x40 ; Let's have strings now. dq ": s"" " + dq " consume " dq " interpreter-flags @ 1 & " dq " { ' litstring entry-to-execution-token , } if " dq " here @ key { dup dup 34 != && } { pack8 key } while " -- cgit 1.4.1