Answered step by step
Verified Expert Solution
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
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