ANSWERS: 4
-
Have to make it debug itself and then translate debug output into some programming language.
-
You could write a program which reads its own source file and writes it to stdout (or whatever device you want).
-
Another approach would be to have the program disassemble its own text section, and produce an assembly language source file. You then assemble and link that, and when you run it, it will again produce the same file, because the text section will be identical.
-
I did that once for a class. I still remember it was called the ACM (Auto Cannibal Maker). Anyways...you can google a lot of those programs.
Copyright 2023, Wired Ivy, LLC

by 