Comp Mark II: Simple 4-bit/1 Hz Virtual Computer
github.com
github.com
https://github.com/gto76/comp-m2/tree/master/src
...that's quite a bit more code than I was expecting.
https://github.com/gto76/comp-m2/blob/master/src/specific_in...
https://github.com/gto76/comp-m2/blob/master/src/specific_in...
IMHO this is a good example of how OOP can obfuscate. Over a dozen classes, all almost the same. This could easily be condensed into a single lookup table.
For comparison, here is a complete 8086 emulator, and it also includes some code to emulate other hardware of the PC:
https://github.com/adriancable/8086tiny/blob/master/8086tiny...