Given the following segment of a MIPS assembly code and its corresponding machin
ID: 3891411 • Letter: G
Question
Given the following segment of a MIPS assembly code and its corresponding machine code. Fill in the blanks assuming the message1 occupies 33 characters and stored in locations 0x11110000-0x1111020 and message2 follows message1.
Location Machine Code Assembly Program
0x00400000 0x3402 ________ loop: li $v0, -7
0x00400004 0x3c04_________ la $a0, message1
0x00400008 0x1844_________ blez $v0, next
0x0040000c 0x3408_________ li $t0, 2
0x00400010 0x01024020 : add $t0,$t0,$v0
0x00400014 0x1440__________ bnez $v0, loop
0x00400018 0x3c01___________ next: la $a0, messge2
0x0040001c 0x3424_________
Explanation / Answer
Location Machine Code Assembly Program
0x00400000 0x2402fff9 loop: li $v0, -7
0x00400004 0x3c041020 la $a0, message1
0x00400008 0x18440018 blez $v0, next
0x0040000c 0x2408 0002 li $t0, 2
0x00400010 0x01024020 : add $t0,$t0,$v0
0x00400014 0x1440fff9 bnez $v0, loop
0x00400018 0x3c011040 next: la $a0, messge2
--------------------------------------------------------------------------------------------
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.