Question: In Java the program is a command line program that takes two arguments: a path to a . text file, and a path to a
In Java the program is a command line program that takes two arguments: a path to a text file, and a path to a data file
the program will simulate the execution of the MIPS program contained in the text and data files.
the program will correctly interface with the users when syscall instructions are executed
printing a string will print a string from the simulated memory from the data file to the terminal. This means that you will need to be able to recreate a Java string from a sequence of bytes up to the null terminator byte $a will contain the address of the first character in the string.printing an integer will print the value of $a as an integer to the terminalreading an integer will read user input from the terminal, cast it to an integer, and place it in the simulated $v registerexiting will cleanly exit your simulator program
How the program exits should mimic the behavior of MARS. That is when the exit syscall is executed, your program should print program is finished running to the terminal, and then exit the program. If the simulator reaches the end of the program otherwise if the next instruction equals x then your program should print program finished running dropped off bottom and exit.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
