MIPS main: lui $a0,0x8000 jal first1pos jal printv0 lui $a0,0x0001 jal first1pos
ID: 3804088 • Letter: M
Question
MIPS
main:
lui $a0,0x8000
jal first1pos
jal printv0
lui $a0,0x0001
jal first1pos
jal printv0
li $a0,1
jal first1pos
jal printv0
add $a0,$0,$0
jal first1pos
jal printv0
li $v0,10
syscall
first1pos: # your code goes here
printv0:
addi $sp,$sp,-4
sw $ra,0($sp)
add $a0,$v0,$0
li $v0,1
syscall
li $v0,11
li $a0,' '
syscall
lw $ra,0($sp)
addi $sp,$sp,4
jr $ra
MIPS programs.
Once again start from first1pos.v to find the exact same bit as first However, this version should start a mask at 0x8 0000000 and repeatedly shift the mask to the right to check each bit in sao (Without modifying the original value in $ad). You should make sure the output in version 1 and 2 are matching