new directory

and a last JR is often just main returning. Note does not reed to implement pseudo-instructions or instructions outside the specified subset
Some example MIPS programs are available in a zip file You will also need to do your own testing and construct your own examples using 1521 mlps2hes .
Note the assembler for the example programs contains pseudo-instructions such as U. 1521 nips2hex translates these pseudo-instructions to real instruction codes in the subset for this assignment
Getting Started
Create a new directory for this assignment called Nip” . change to this directory. and fetch the provided examples: by running these commands:
$ akar -m 700 mipsc S cd mipsc S 1521 fetch mipsc S unzip examples.cip
Or, if you’re not working on CSE, you can download the and starting code You have been given starting code for this assignment in ns.psc.c which already implements handling command line arguments and reading the hexadecimal instruction code into an array.
S des nipsc.c -o mipsc S ./mtpse examples/42.hes 0: 042e04002A 1: 0s20020001 2: exeeeeeeec 3: 0x2e040004 4: ex20e200ee 5: exeeeeeeec
The code calls the function execute_instructions to simulate execution but the supplied code in execute instructions prints the instruction codes.
You need to change the code in execute instructions to simulate the execution of the instructions. You should add extra functions and *defines. You may (but are not required to) create extra .c or .h
Assumptions and Clarifications
Like all good programmers, you should make as few assumptions as possible. If in doubt match the output of the reference implementation. You can assume eipsc.c is given a single file as a command line argument You do not have to implement MIPS instructions, system calls, or features that are not explicitly mentioned in the tables above. Your program should print an error message if given a hexadecimal number that does not correspond to an instruction in the above MIPS subset. You can print this error message before executing the program or when execution reaches the invalid instruction code. Match the reference implementation’s message:
S echo 12858AA > lnvalld. hex S cat blvall.d.hex 12858.4A S 1521 West invalid.hex Invalid instruction 0,0312858AP at PC – 0
In the case of an invalid instruction. any output to stdout will be ignored. As long as the given error message is printed to stderr, you program is correct
Aims The Alignment Reference implementation MIPS Instruction Subset System Calls Registers Malting Converting min Assembler Instruction codes Examples Getting Started Assumptions and Clarifications Change Log Assessment