Question: Write a MIPS assembler program using MARS 4.5 that prints itself in the output window. The output text of the program will not have labels
Write a MIPS assembler program using MARS 4.5 that prints itself in the output window.
The output text of the program will not have labels or data values.
It will have HEX addresses before all the instructions and each instruction will be
correctly formatted. All immediate operands will be printed as signed decimal numbers.
Here is an example of the required layout:
HEX address: \t mnemonic \t operand1, operand2, operand3
Where \t means a tab character and there is a comma followed by a space between any two operands.
Only print the operands needed to display the instruction correctly. For example (this is just nonsense code):
0x0040000: add $a0, $v0, $t1 0x0040004: add $t9, $v0, $t2 0x0040008: sub $t6, $t3, $t2 0x004000c: add $t1, $v0, $t3 0x0040010: addi $v0, $v0, 4 0x0040014: addi $a0, $t1, 0 0x0040018: syscall
Even though you will use pseudoinstructions when writing your program, the assembler will turn them into regular basic MIPS instructions for you. Your program will only need to deal with the basic instruction set as listed in the notes on the Assembler.
Assembler Notes and instructions found here: https://drive.google.com/file/d/1he_cHMuKr9eS3a3hk9DNFxEw-5FqUYzH/view?usp=sharing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
