Question

please write this following in MIPS(Assembly Language) -write hourly program with following -how many hours you...

please write this following in MIPS(Assembly Language)
-write hourly program with following
-how many hours you work in a week ?
-total hours in week !
-hourly rate $12
-with total hours pay for the week
please can use main and print ! Thank you

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the code below::::

.data
prompt: .asciiz "Enter hours worked in a week: "
prompt2: .asciiz "Enter hourly wage rate in dollars: "
prompt3: .asciiz "\nThe total wage for the week is $"

.text
.globl main
main:
li $v0,4
la $a0,prompt #it will print prompt
syscall
li $v0,5
syscall
move $s0,$v0 #store worked hours


li $v0,4
la $a0,prompt2 #it will print prompt
syscall
li $v0,5
syscall
move $s1,$v0 #store hour pay

mul $t0,$s0,$s1


li $v0,4
la $a0,prompt3 #it will print prompt
syscall
li $v0,1
move $a0,$t0 #store worked hours
syscall


output:

Add a comment
Know the answer?
Add Answer to:
please write this following in MIPS(Assembly Language) -write hourly program with following -how many hours you...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT