Mips assembly code a) Wrile MIPs assembly code that wi execute the folkowing C s
ID: 3796707 • Letter: M
Question
Mips assembly code
Explanation / Answer
1(A)
a=(a+b)-(c-33)
MIPS code is as follows
li $v0, 5 # to load the approriate system call code into register $v0;
# code for reading an integer is 5
syscall # call the operating system to perform operation
sw $v0, int_value # value which is read from keyboard is returned in register $v0;
# store this value in the required location
add t0,$s0,$s1
sub t1,$s2,$v0
sub $s0,t0,t1
1(B)
MIPS code is as follows
lw $t2,16($a1)
add $t2,$t2,$a0
sub $t3,$t0,$t2
lw $t1,$t3
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.