Ah, I love virtual machines/cpus :] Some weeks ago I found out that you can create pointers to goto labels in C (gcc and clang that is - it's a non standard extension afaik).
I then implemented a super small subset of the 6502 to test how messy the code would like:
That's neat. I like how your code is so concise and readable. Now all you need to do is to emulate a display, a sound chip and a tape cassette drive. :-)
I then implemented a super small subset of the 6502 to test how messy the code would like:
https://github.com/jsz/6502/blob/master/vm/cpu.c
I don't know if I should like it or not :)