flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Quines : Progams that copy themselves |
| Author |
|
|
bitRAKE 22 Jan 2026, 07:25
In fasmg not only does an empty file copy itself, but "file __FILE__" also copies itself. Moving beyond these trivial examples (305 bytes):
Code: virtual A::db 'virtual|A::db ~|end virtual|repeat sizeof A|load a:1 from A:%-1|if a=7Eh|load a:%% from A:0|db 27h,a,27h|else if a=7Ch|db 10|else|db a|end if|end repeat' end virtual repeat sizeof A load a:1 from A:%-1 if a=7Eh load a:%% from A:0 db 27h,a,27h else if a=7Ch db 10 else db a end if end repeat (Of course, a smaller version is possible - down to 291.) _________________ ¯\(°_o)/¯ AI may [not] have aided with the above reply. |
|||
|
|
bitRAKE 22 Jan 2026, 12:11
That's bonkers - yet, insightful.
Three distinctly different corner cases. |
|||
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.