A while back, my buddy Mike decided it would be fun to write a quine. It was clever. But one good quine deserves another (or something like that). But I couldn't think of any approach for a 'C' quine that hadn't already been done in some form or another. And the empty file <insert-your-favorite-script-language-here> quine was too easy. So I wrote a self-disassembler in ARM asm: quine-1.S. Technically, it doesn't do any file I/O (if you ignore the fact that the program loader mmap's executable files / shared libraries), so I don't think it is cheating. If you are curious, the original with comments (slightly easier to follow) is here: quine-0.S. If you happen to have some sort of ARM platform running linux, the comments in the second file should explain how to compile it. If you don't, go out and buy one of these.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment