Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MIPS question: .data .half 6, 2 num: .word 7 .globl main .text main: lui $t1, 0x1001 top: lw $t2, -4($t1) beq $s1, $s3, end jal
MIPS question:
.data
.half 6, 2
num: .word 7
.globl main
.text
main:
lui $t1, 0x1001
top:
lw $t2, -4($t1)
beq $s1, $s3, end
jal func
add $s1, $s2, $t1
andi $s1, $0, 0xFFFF
j top
bne $s1, $0, top
end:
func:
sll $v0, $t2, 4
jr $ra
assume (.data starts @ 0x10010000), (.text 0x00400400)
1- find lables values?
2- find the addressing mode of all instructions.
3- convert the program to machine code (hex).
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