Question: Write a MIPS assembly language program that converts ASCII binary to decimal using MARS. It will do the following tasks. Please pay attention to the

Write a MIPS assembly language program that converts ASCII binary to decimal using MARS. It will do the following tasks.

Please pay attention to the notes as well.

1. Read a user entered program argument (8 bit twos complement binary number). 2. Print the user input. 3. Convert the ASCII string into a sign-extended integer value, and store it in $s0. 4. Convert the sign-extended integer value to an ASCII string that displays the value as a hexadecimal number. Print the ASCII string to the console. 5. Convert the sign-extended integer value to an ASCII string that displays the value as a decimal number. Print the ASCII string to the console.

Important Notes

For the user input, don't use syscall but use the program arguments which can be found in MARS settings and says "Program arguments provided to MIPS program."

When printing the decimal representation, do not you syscall service 1.

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!