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
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
}
(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 pmStep 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