A codegolf challenge captured my attention, Emulate an Intel 8086 CPU.
Here is the result:
ild.c
is the core that fulfill the "fetch and decode" step. It has been extracted from a personal project that will be soon available.
cpu.c
offers a basic CPU initialization.
cpu_exec.c
emulates an instruction previously disassembled by ild.
Please note that the video memory is not properly emulated; features such as segments and interrupts are not supported.
The program is licensed under GPL v.3.