在C++下做MIPS模拟器(在线等)
小弟新手,不知这个问题怎么解决,大家给个方向-也好
Description
You are to write in C++ an emulator for a simple MIPS machine with the following subset of the MIPS core instruction set as its instruction set:
* lw
* sw
* add
* addi
* sub
* and
* or
* beq
* slt
Your emulator must run on the bsu-cs machine as if it were a Unix command with one command line argument. The command line argument will be the name of a binary file containing MIPS machine language commands. Your emulator must provide 4096 words of instruction memory and a separate block of 4096 words of data memory.
The output of your emulator should be a file named "core.txt" that contains a readable copy of the content of all 32 general purpose registers together with the content of the data memory, 4 words per line. Each line of the data memory content should begin with the 4 hex digit address of the left-most byte on that line.