Open larsbrinkhoff opened 6 years ago
Idea.
Decode instructions to three function pointers:
Store these in an array shadowing main memory. Initialize all pointers to decode_instruction. Also reset to this whenever a memory location is written.
Main instruction loop:
Pure pages can be filled with decode_page. The first intrstruction to be executed triggers translation of the whole page.
EA calculation also has some subcases:
Possibly generate machine code:
Machine state registers:
When decoding instruction and syscalls, might as well add the option to execute them as well.