diff --git a/2015/endoh3/README.md b/2015/endoh3/README.md index 5a0ae0da9..d92f7146d 100644 --- a/2015/endoh3/README.md +++ b/2015/endoh3/README.md @@ -49,13 +49,14 @@ This program is a joke PDP-11 emulator. ("ll-dpd" is embedded in the code. Rea You got it? This program is supposed to be used in this way: - $ wget http://ioccc.org/1984/mullender.c - $ clang -o prog prog.c mullender.c - $ ./prog +```sh +wget http://ioccc.org/1984/mullender.c +clang -o prog prog.c mullender.c +./prog +``` You can enjoy the legendary winner of the first IOCCC, again. - ### Internal This program uses `__attribute__((constructor))`, which is a GCC extension, to hijack the main function call. And then it interprets main as an instruction sequence. @@ -77,7 +78,6 @@ It supports the minimal subset of instructions and addressing modes which are ne * 4: Autodecrement deferred * 6: Index (incomplete) - ### Limitation Non-trivial combination of instruction and addressing mode may cause undefined behavior (unsequenced modification), such as attempting to autoincrement a destination register. Index addressing mode works well only for R7 (PC register).