Creating a MIPS machine in Java/C/C++ -


All of us, I am in an assembly language and computer organization class. Recently I got an assignment for which I will create a program which emulates a MIPS machine in Java, C, or C ++.

The program reads hex from ASM file and stores rows in an array so it is supposed to emulate the MIPS machine.

I am searching around, but I do not know how to start. Does anyone have some idea or falsification code to get me on the right idea?

An example of the file should be read:

  24080019 2409001e 240a0023 01094020 010a4020 00082021   

If someone can start right now The perfect way down that would be fantastic, thanks!

First of all you have to learn to leave those instructions.

It seems that they are 8 hex digits. It is good, because the MIP instructions are 32-bit long (a hex digit is 4 beats i.e.)

So each in the file coropendas In line with an instruction

Look at the format of the instructions given here:

You need to keep track of some registers inside the machine. (You know what the MIPS registers are, do not you?)

Then you need to decide what the operations do, and how they register.

Comments