Question: Program Specifications Your job is to create a program, contained in a single C file called proj1.c, which takes as input (from standard input) a

 Program Specifications Your job is to create a program, contained ina single C file called proj1.c, which takes as input (from standardinput) a small simplified MIPS assembly program and prints to the standard

Program Specifications Your job is to create a program, contained in a single C file called proj1.c, which takes as input (from standard input) a small simplified MIPS assembly program and prints to the standard output the corresponding machine code instructions and their associated addresses. Your program takes the input, an simple MIPS assembly program, from the standard input. That is, use the following command to execute your program, assuming your program is compiled as asm _mips $ . /asm-mips test. asm test.asm is an example input file. It is passed to asm_mips through the shell redirection. You should not rely on other input methods. A sample executable is provided as well as some test cases. Make use of the sample executable to help verify your output. Note, the sample executable is not guaranteed to be bug-free or completely conform to the project requirement. Also be aware that passing all of the included test cases does not guarantee a perfect score take the time to come up with your own additional test cases to verify that your program works in all scenarios Assembly File Format The input assembly file to your program follows the following format: 1. Every line of the assembly contains either a directive or an instruction. 2. No lines will be blank and a label will not appear on a line by itself. 3There are no more than 256 instructions in an assembly file. 4. Lines containing directives have the following format (where "" indicates an optional element, and indicates a mandatory element): Program Specifications Your job is to create a program, contained in a single C file called proj1.c, which takes as input (from standard input) a small simplified MIPS assembly program and prints to the standard output the corresponding machine code instructions and their associated addresses. Your program takes the input, an simple MIPS assembly program, from the standard input. That is, use the following command to execute your program, assuming your program is compiled as asm _mips $ . /asm-mips test. asm test.asm is an example input file. It is passed to asm_mips through the shell redirection. You should not rely on other input methods. A sample executable is provided as well as some test cases. Make use of the sample executable to help verify your output. Note, the sample executable is not guaranteed to be bug-free or completely conform to the project requirement. Also be aware that passing all of the included test cases does not guarantee a perfect score take the time to come up with your own additional test cases to verify that your program works in all scenarios Assembly File Format The input assembly file to your program follows the following format: 1. Every line of the assembly contains either a directive or an instruction. 2. No lines will be blank and a label will not appear on a line by itself. 3There are no more than 256 instructions in an assembly file. 4. Lines containing directives have the following format (where "" indicates an optional element, and indicates a mandatory element)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!