12.07.2015 Views

Quiz 1 Review (MIPS Assembly) 1. Examine each of the following ...

Quiz 1 Review (MIPS Assembly) 1. Examine each of the following ...

Quiz 1 Review (MIPS Assembly) 1. Examine each of the following ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Quiz</strong> 1 <strong>Review</strong> (<strong>MIPS</strong> <strong>Assembly</strong>)<strong>1.</strong> <strong>Examine</strong> <strong>each</strong> <strong>of</strong> <strong>the</strong> <strong>following</strong> instructions. Assume that <strong>each</strong> instruction is independent andresets with <strong>the</strong> initial condition before <strong>the</strong> next instruction. For <strong>each</strong> instruction show <strong>the</strong>entire 32-bit contents <strong>of</strong> <strong>each</strong> destination register. Work for <strong>the</strong> different operations can beshown next to <strong>the</strong> instruction (this will allow me to assign partial credit). Assume <strong>the</strong> datasections starts at 0x10000000.$t0= 000071A8 EF05 C738 M[0x71B8]$t1= 000001AC 3456 789A M[0x71B4]$t2= 000000B1 BCDE F012 M[0x71B0]$t3= 00000006 CDEF 0123 M[0x71AC]$t4= fffffff8 2345 6789 M[0x71A8]$t5= 10000000 45DE 50F0 M[0x71A4]89AB 1234 M[0x71A0]DV:Instruction Result Work.data.word 0x5678FEDCa) la $t5,DV $t5 = ______________b) lb $t6,0($t5) $t6 = ______________c) lh $t6,2($t5) $t6 = ______________d) lh $t1,10($t0) $t1 = ______________e) lw $t1,0x0c($t0) $t1 = ______________f) lbu $t1,0xfffe($t0) $t1 = ______________g) sub $t1,$t1,$t2 $t1 = ______________h) ori $t3,$t3,0xfff8 $t3 = ______________i) sll $t3,$t3,1 $t3 = ______________j) andi $t4,$t4,0x000f $t4 = ______________k) slt $t1,$t1,$t2 $t1 = ______________l) lui $t1,0xabcd $t1 = ______________


<strong>Quiz</strong> 1 <strong>Review</strong> (<strong>MIPS</strong> <strong>Assembly</strong>)<strong>1.</strong> <strong>Examine</strong> <strong>each</strong> <strong>of</strong> <strong>the</strong> <strong>following</strong> instructions. Assume that <strong>each</strong> instruction is independentand resets with <strong>the</strong> initial condition before <strong>the</strong> next instruction. For <strong>each</strong> instruction show<strong>the</strong> entire 32-bit contents <strong>of</strong> <strong>each</strong> destination register. Work for <strong>the</strong> different operationscan be shown next to <strong>the</strong> instruction (this will allow me to assign partial credit). Assume<strong>the</strong> data sections starts at 0x10000000.$t0= 000071A8 EF05 C738 M[0x71B8]$t1= 000001AC 3456 789A M[0x71B4]$t2= 000000B1 BCDE F012 M[0x71B0]$t3= 00000006 CDEF 0123 M[0x71AC]$t4= fffffff8 2345 6789 M[0x71A8]$t5= 10000000 45DE 50F0 M[0x71A4]89AB 1234 M[0x71A0]DV:Instruction Result Work.data.word 0x5678FEDCa) la $t5,DV $t5 = 0x10000000b) lb $t6,0($t5) $t6 = 0xffffffdcc) lh $t6,2($t5) $t6 = 0x00005678d) lh $t1,10($t0) $t1 = 0xffffbcdee) lw $t1,0x0c($t0) $t1 = 0x3456789af) lbu $t1,0xfffe($t0) $t1 = 0x000000deg) sub $t1,$t1,$t2 $t1 = 0x000000fbh) ori $t3,$t3,0xfff8 $t3 = 0x0000fffei) sll $t3,$t3,1 $t3 = 0x0000000cj) andi $t4,$t4,0x000f $t4 = 0x00000008k) slt $t1,$t1,$t2 $t1 = 0x00000000l) lui $t1,0xabcd $t1 = 0xabcd0000

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!