diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-05-03 22:32:32 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-05-03 22:32:32 -0700 |
| commit | bd4fa17e0c0a8550ea5e66d787e94eeba3e95ba3 (patch) | |
| tree | 0ac2c8cfd0428936b396a847effce719bf342aa7 | |
| parent | 1bbe5fd948fb4f433db811ea326592abb1d8e921 (diff) | |
add comments
also .", which reads a string and prints it immediately Force-Push: yes Change-Id: I70ed0aea25d79b45ff11f587a8ff328d5dc28db3
| -rw-r--r-- | quine.asm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/quine.asm b/quine.asm index 910013d..6208f85 100644 --- a/quine.asm +++ b/quine.asm @@ -11325,12 +11325,25 @@ defword boot_source, 0x40 dq " interpreter-flags @ 1 & " dq " { ' litstring entry-to-execution-token , } if " dq " here @ key { dup dup 34 != && } { pack8 key } while " - dq " drop dup 0 pack8 " + dq " drop 0 pack8 " dq " interpreter-flags @ 1 & " - dq " { 8 packalign here ! drop } " + dq " { 8 packalign here ! } " dq " { drop here @ } if-else " dq " ; make-immediate " + ; Finicky semantics, but also important. + dq ": ."" " + dq " ' s"" entry-to-execution-token execute " + dq " interpreter-flags @ 1 & " + dq " { ' emitstring entry-to-execution-token , } " + dq " { emitstring } if-else " + dq " ; make-immediate " + + ; While we're thinking about input, let's also have comments. + dq ": ~ " + dq " key { dup dup 10 != && } { drop key } while drop " + dq " ; make-immediate " + ; Some output formatting tools. dq ": space 32 value@ emitstring drop ; " dq ": newline 10 value@ emitstring drop ; " |