Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

}

image text in transcribed

(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

What is the purpose of bond ratings?

Answered: 1 week ago