Question: 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

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!