Question
Write a simple loop program in MIPS/QtSpim that will examine each number in the data declaration below and do the following: If the number is
Write a simple loop program in MIPS/QtSpim that will examine each number in the data declaration below and do the following: If the number is negative, it is printed out to the console using syscall 1. If it is positive, the 2s compliment of the number is calculated and stored back in the same data location. Thus at the end of the program, ALL of the data will be negative. After you output a data word to the console, output a CR/LF so that each number is on a separate line. (No manual calculation is needed).
Question 1 is the program
Question 2 is : List the numbers that are printed out (as address labels or Hex representation)
.data
num1: .word 0x76546162
num2: .word 0x33346a6b
num3: .word 0x96548b8d
num4: .word 0x20666a4b
num5: .word 0x92773445
num6: .word 0x343f787c
num7: .word 0x86578778
num8: .word 0x41456669
num9: .word 0x8072204f
num0: .word 0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started