Question: convert this c++ code to mips assembly code that can run on qtspim source code: #include using namespace std; int main() { int no =

convert this c++ code to mips assembly code that can run on qtspim

source code:

#include using namespace std;

int main() { int no = 1, size = 10; int storeno[10]; for (int i = 0; i > no; while (no 255) { cout > no; } storeno[i] = no; }

cout

//array display decimal int storeBinary[10]; int j; for (int i = 0; i 0; j++) { storeBinary[j] = n % 2; n = n / 2; } cout = 0; j--) { cout

cout

//array display decimal to octal int octalNumber[10]; for (int i = 0; i 0; j++) { octalNumber[j] = n % 8; n = n / 8; } cout = 0; j--) { cout

//array display decimal to hexadecimal cout 0; j++) { temp = n % 16;

if (temp = 0; j--) { cout

}

convert this c++ code to mips assembly code that can run on

(the picture attached is an example)

data num:.word 10 input: .asciiz "value of a: " input1: .asciiz " " .text .globl main main: lw $t1, num add $t0,$t1,$zero Loop: li $v0,4 la $a0,input syscall li $v0,1 move $a0,$t0 syscall li $v0,4 la $a0,input1 syscall addi $t0,$t0,1 slti $t2,$t0,20 bne $t2,$zero,Loop li $v0,10 syscall 6:54 pm

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!