{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

test1 - move $prev $a0 move $a0 $next lw $data 0($a0 lw...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 1) xor $v0, $a0, $a1 xor $v0, $v0, $a2 jr $ra 2) func: li $t0, 2 addi $t0, $t0, 127 sll $t0, $t0, 23 addi $sp, $sp, -4 sw $ra, 0($sp) bgt $a0, $t0, base li $t0, 0xf0000 add $a0, $a0, $t0 jal func lw $ra, 0($sp) addi $sp, $sp, 4 jr $ra base: jal base lw $ra, 0($sp) addi $sp, $sp, 4 jr $ra 3) maximum: lw $m, 0($a0) li $prev, 0 lw $next, 4($a0) Loop: beq $next, $0, done
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: move $prev, $a0 move $a0, $next lw $data, 0($a0) lw $ptr, 4($a0) xor $next, $ptr, $prev blt $data, $m, other move $m, $data other: j Loop done: move $v0, $m jr $ra 4) Using div to operate this operation and modify the exception of q==0. When q=0, the an exception will be invoked and allows t h...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online