The Core i7 can simulate the 8088 instruction set. Assume that each ISA level instruction from the 8088 can be interpreted to 2 ISA level instructions on the Core i7.
Interp
function from class. The main program has been given already, write all the missing routines.
I have modified the code a little from the example from class. The find_data
returns the location of the data, not the data. This allows more flexibility.
int PC; int ACC; int instr; int instr_type; int data_loc; int data; boolean run_bit = true; public void Interp(int starting_address) { PC = starting_address; while (run_bit) { instr = memory[PC]; PC = (int) (PC + 1); instr_type = get_instr_type(instr); data_loc = find_data(instr, instr_type); execute(instr_type, data_loc); } }
If you already have an idea of how to implement this, then use your idea. If you are stuck, here are a few suggestions for a simple architecture.
A program can be as simple as:
After the program is interpretted, display the contents of the 32 bytes of memory, to see if your program worked.
A OR B (A OR B)C OR (A OR B)(NOT C)
I have created a running example of this circuit using digital works. Download digital works and my example to run it