From 9baf684be6af1c96db269ebf844c1af32dd07b0e Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Mon, 4 May 2026 02:29:58 -0700 Subject: octal and binary literals that was easy :) Force-Push: yes Change-Id: I43933b373566d83e1c8a7dd12f5e7d203952fcc2 --- quine.asm | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'quine.asm') diff --git a/quine.asm b/quine.asm index a2eff4a..2744f8a 100644 --- a/quine.asm +++ b/quine.asm @@ -7291,14 +7291,16 @@ cold_start: ; This is the case where the leading digit is a zero. ; (original string pointer, advanced string pointer) dq litstring, "unpack8", 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, "x", 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 ; This is the case where the second character is equal to "x". - ; (original string pointer, doubly advanced string pointer) + ; (original string pointer, doubly advanced string pointer, character) + dq litstring, "drop", early_find, entry_to_execution_token, early_comma dq litstring, "swap", early_find, entry_to_execution_token, early_comma dq litstring, "drop", early_find, entry_to_execution_token, early_comma dq litstring, "lit", early_find, entry_to_execution_token, early_comma @@ -7307,8 +7309,45 @@ cold_start: dq 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, "lit", early_find, entry_to_execution_token, early_comma + dq lit, "o", 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, 8*8, early_comma + + ; This is the case where the second character is equal to "o". + ; (original string pointer, doubly advanced string pointer, character) + dq litstring, "drop", early_find, entry_to_execution_token, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "drop", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 8, early_comma + dq litstring, "read-base-unsigned", early_find, entry_to_execution_token + dq 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, "lit", early_find, entry_to_execution_token, early_comma + dq lit, "b", 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, 8*8, early_comma + + ; This is the case where the second character is equal to "b". + ; (original string pointer, doubly advanced string pointer, character) + dq litstring, "drop", early_find, entry_to_execution_token, early_comma + dq litstring, "swap", early_find, entry_to_execution_token, early_comma + dq litstring, "drop", early_find, entry_to_execution_token, early_comma + dq litstring, "lit", early_find, entry_to_execution_token, early_comma + dq lit, 2, early_comma + dq litstring, "read-base-unsigned", early_find, entry_to_execution_token + dq early_comma + dq litstring, "exit", early_find, entry_to_execution_token, early_comma + ; This is the case where the second character is something else. - ; (original string pointer, doubly advanced string pointer) + ; (original string pointer, doubly advanced string pointer, character) + dq litstring, "drop", early_find, entry_to_execution_token, early_comma dq litstring, "drop", early_find, entry_to_execution_token, early_comma dq litstring, "lit", early_find, entry_to_execution_token, early_comma dq lit, 10, early_comma -- cgit 1.4.1