Re:An 8086 PC emulator in 4043 bytes
by coin on Saturday January 04, 2014 @04:27PM
(#7013016)
The BIOS is part of the PC, yet it's not included in the 4043 bytes.
[ Parent
| on HN ]
The BIOS is replaceable software. Standard on the IBM PC, but not the "bare metal" itself. One can only emulate so much within 4096 bytes.
"Due to the complexities of the 8086’s arbitrary-length instruction decoding and flags, 8086 instructions are first converted to a simpler intermediate format before being executed. This conversion, along with instruction lengths and how each instruction modifies the flags, is assisted by some lookup tables which form part of the BIOS binary."
I agree regarding the BIOS, but this sounds like the BIOS image contains "microcode" necessary for the emulator to run, which would seem to be cheating just a little.