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

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!