Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I cannot get my code to print the correct values when converting kilometers to miles in MARS. .data km: .asciiz Kilometers = mi:

I cannot get my code to print the correct values when converting kilometers to miles in MARS.

.data km: .asciiz " Kilometers = " mi: .asciiz " Miles = " nl: .asciiz " " number1: .float 0.62137 .text .globl main

main: li $t0, 0 loop: bgt $t0, 20, end_loop li $v0, 4 la $a0, km syscall move $a0, $t0 li $v0, 1 syscall li $v0, 4 la $a0, mi syscall mtc1 $t0, $f12 l.s $f31, number1 mul.s $f0, $f12, $f31 mov.s $f12, $f0 li $v0, 2 syscall li $v0, 4 la $a0, nl syscall addi $t0, $t0, 1 j loop end_loop: li $v0, 10 syscall

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago