diff options
| -rw-r--r-- | quine.asm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/quine.asm b/quine.asm index be301f5..fb1a8f2 100644 --- a/quine.asm +++ b/quine.asm @@ -11299,6 +11299,10 @@ defword boot_source, 0x40 dq ": is-docol-itself " dq " entry-to-name s"" docol"" stringcmp 0 = ; " + ; The word named "docol" has the job of returning the value that gets used + ; as the actual codeword. We make the assumption that, if so, the codeword + ; will point somewhere near the entry header; we allow for the possibility + ; that it might be before or after. dq ": is-docol-codeword " dq " dup is-in-heap { drop 0 exit } unless " dq " containing-entry dup " @@ -11307,13 +11311,14 @@ defword boot_source, 0x40 dq " { next-newer-entry dup { is-docol-itself } if } if-else " dq " } if ; " + ; TODO this only works on heap words dq ": is-docol-word " dq " dup is-assembly-word { drop 0 exit } if " dq " entry-to-execution-token @ is-docol-codeword ; " dq ": word-heading " dq " dup entry-to-name dup emitstring space " - dq " stringlen 1+ 70 swap - 0 max indent dup .hex64 " + dq " stringlen 1+ 54 swap - 0 max indent dup .hex64 " dq " dup entry-flags@ dup " dq " { space " dq " dup 128 & { s"" H"" emitstring } if " |