diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-05-14 21:02:02 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-05-14 21:02:02 -0700 |
| commit | 64d4667d9ffec1f3386400f03e3b781733acd9b3 (patch) | |
| tree | f1531de8198a3c9cc0c0dd82185e76c446facfb6 /quine.asm | |
| parent | 31d2a4d52330bb72f282333531594b48e1589975 (diff) | |
add a next-source field, as-yet unused, to the input buffer metadata
this will support transformations Force-Push: yes Change-Id: I741e8f18eef456c836d8eb1b01ec4463a6c8898c
Diffstat (limited to 'quine.asm')
| -rw-r--r-- | quine.asm | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/quine.asm b/quine.asm index 5419cd2..df771db 100644 --- a/quine.asm +++ b/quine.asm @@ -6254,6 +6254,18 @@ cold_start: dq litstring, "exit", early_find, entry_to_execution_token, early_comma dq early_here, fetch, lit, 8, packalign, early_here_store + ; In: + ; pointer to input buffer metadata + ; Out: + ; pointer to input buffer "next-source" field + dq litstring, "input-buffer-next-source", 0, early_create + dq early_docol_codeword + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 5*8, early_comma + dq litstring, "+", 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 + ; Given an initialized buffer (input or otherwise), sets its logical-start ; and logical-length fields to indicate the buffer is empty. This relies on ; the buffer having a backing store attached, but does not alter the backing @@ -6319,13 +6331,20 @@ cold_start: dq lit, 0, early_comma dq litstring, "swap", early_find, entry_to_execution_token, early_comma dq litstring, "!", early_find, entry_to_execution_token, early_comma - ; Notice the absence of a dup this time. + dq litstring, "dup", early_find, entry_to_execution_token, early_comma dq litstring, "input-buffer-refill", early_find, entry_to_execution_token dq early_comma dq litstring, "lit", early_find, entry_to_execution_token, early_comma dq lit, 0, early_comma dq litstring, "swap", early_find, entry_to_execution_token, early_comma dq litstring, "!", early_find, entry_to_execution_token, early_comma + ; Notice the absence of a dup this time. + dq litstring, "input-buffer-next-source", 0, early_find + dq entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 0, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "!", 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 @@ -6337,7 +6356,7 @@ cold_start: dq litstring, "allocate-input-buffer-metadata", early_create dq early_docol_codeword dq litstring, "lit", early_find, entry_to_execution_token, early_comma - dq lit, 5*8, early_comma + dq lit, 6*8, early_comma dq litstring, "allocate", 0, early_find, entry_to_execution_token dq early_comma dq litstring, "dup", early_find, entry_to_execution_token, early_comma @@ -6356,7 +6375,7 @@ cold_start: dq litstring, "allocate-input-buffer", early_create, early_docol_codeword dq litstring, "dup", early_find, entry_to_execution_token, early_comma dq litstring, "lit", early_find, entry_to_execution_token, early_comma - dq lit, 5*8, early_comma + dq lit, 6*8, early_comma dq litstring, "+", early_find, entry_to_execution_token, early_comma dq litstring, "allocate", 0, early_find, entry_to_execution_token dq early_comma @@ -6367,7 +6386,7 @@ cold_start: dq litstring, "dup", early_find, entry_to_execution_token, early_comma dq litstring, "dup", early_find, entry_to_execution_token, early_comma dq litstring, "lit", early_find, entry_to_execution_token, early_comma - dq lit, 5*8, early_comma + dq lit, 6*8, early_comma dq litstring, "+", early_find, entry_to_execution_token, early_comma ; (capacity in bytes, metadata pointer, metadata pointer, physical start) dq litstring, "swap", early_find, entry_to_execution_token, early_comma |