8086tiny: The world's smallest PC emulator
megalith.co.uk
megalith.co.uk
I didn't look at the IOCCC contest entry, but I can see the influence of the IOCCC rules on this code for sure. Having lookup tables in the BIOS binary to handle instruction decode seems bizarre to me (other than to get the code size under the IOCCC maximum). It has the effect of splitting the source code for the emulator between the C source and the BIOS assembler source. It evokes a feeling of the CPU microcode being stored in the BIOS.
Anyone else having luck?
An obfuscated version of 8086tiny (condensed into just 4043 bytes of C code) was a winner of the 2013 IOCCC contest. Significant interest followed for a documented, commented, maintainable version. The result is the distribution presented here.