Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. What would be the output of the following MIPS code? globl main main: addu $7, $0, ?ra add addi $s3, $0, $0 $S4, $0,

image text in transcribed

1. What would be the output of the following MIPS code? globl main main: addu $7, $0, ?ra add addi $s3, $0, $0 $S4, $0, 1 $s5, $0, $0 $s6, save add data align 2 globl save # the next line creates an array of 10 words that can be referred to as save # the array is initialized to the 10 values after .word # so the first array entry is a 0 and the last entry is a 2 save: .word 0, 0, 0, 0, 0, 0, 0, 6, 3, 2 .text Loop St8, $s3, $s3 add add add bne St9, $s5, Exit $s3, $s3, $s4 Loop add Exit: data globl messagel messagel: asciiz " The value of i is: text 1i $vO, 4 ?a0, messagel syscall 1i add syscall Svo, 1 $a0, $0, $s3 addu ?ra, $0, $S7 ?ra $0, $0, $0 add 1. What would be the output of the following MIPS code? globl main main: addu $7, $0, ?ra add addi $s3, $0, $0 $S4, $0, 1 $s5, $0, $0 $s6, save add data align 2 globl save # the next line creates an array of 10 words that can be referred to as save # the array is initialized to the 10 values after .word # so the first array entry is a 0 and the last entry is a 2 save: .word 0, 0, 0, 0, 0, 0, 0, 6, 3, 2 .text Loop St8, $s3, $s3 add add add bne St9, $s5, Exit $s3, $s3, $s4 Loop add Exit: data globl messagel messagel: asciiz " The value of i is: text 1i $vO, 4 ?a0, messagel syscall 1i add syscall Svo, 1 $a0, $0, $s3 addu ?ra, $0, $S7 ?ra $0, $0, $0 add

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 Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions