Question: MPLAB PIC 32 Question 3 for HW 2 The program below contains several comments (all of which start with ) describing an operation to be

 MPLAB PIC 32 Question 3 for HW 2 The program below
MPLAB PIC 32

Question 3 for HW 2 The program below contains several comments (all of which start with ) describing an operation to be performed on one or more of the variables declared at the start of the program. Replace each comment with one appropriate instruction to complete the program (or, as I've done below, simply move each conment to the right of the instruction) # EACH INSTRUCTION YOU USE MUST BE A BITWISE, SHIPS, OR ROTATE INSTRUCTION SOME OF THE INSTRUCTIONS LISTED BELOW ACTUALLY REQUIRE MULTIPLE INSTRUCTIONS THESE LINES HAVE BEEN MARKED, AND YOU ARE ALLOWED TO USE >I INSTRUCTION FOR EACH ONE OF THE MARKED LINES (THE LINES THAT CHANGE Sto, $t1, AND $t6) This program gives you some practice working with bitwise, shift, and rotate operators -global main vl: V2: .data . Word .word 12 OXFEEDABEE .text noreorder main .ent main lv si, vi Ss1 - v1 lv $32, v2 ## $s2 - 2 ***REQUIRES >1 INSTRUCTION** Sto - v2 with lowest 12 bits cleared (set to 0), other bits staying the same ***REQUIRES >1 INSTRUCTION $t1 - v2 with a highent bits set to o, other bits staying the same St2 - vi multiplied by 8 *vithout using a multiply instruction **REQUIRES >I INSTRUCTION **: St3 - V2 multiplied by 12 without sing a multiply instruction St4 - vl divided by 2 without using a divide instruction $5 - v2 with the lowest 16 bits flipped (inverted) and the upper 16 bits staying the same ***REQUIRES >1 INSTRUCTIONS - OXFD000010 without using the 11 pseudo-instruction This code simply loope infinitely pint apin nop end main Question 3 for HW 2 The program below contains several comments (all of which start with ) describing an operation to be performed on one or more of the variables declared at the start of the program. Replace each comment with one appropriate instruction to complete the program (or, as I've done below, simply move each conment to the right of the instruction) # EACH INSTRUCTION YOU USE MUST BE A BITWISE, SHIPS, OR ROTATE INSTRUCTION SOME OF THE INSTRUCTIONS LISTED BELOW ACTUALLY REQUIRE MULTIPLE INSTRUCTIONS THESE LINES HAVE BEEN MARKED, AND YOU ARE ALLOWED TO USE >I INSTRUCTION FOR EACH ONE OF THE MARKED LINES (THE LINES THAT CHANGE Sto, $t1, AND $t6) This program gives you some practice working with bitwise, shift, and rotate operators -global main vl: V2: .data . Word .word 12 OXFEEDABEE .text noreorder main .ent main lv si, vi Ss1 - v1 lv $32, v2 ## $s2 - 2 ***REQUIRES >1 INSTRUCTION** Sto - v2 with lowest 12 bits cleared (set to 0), other bits staying the same ***REQUIRES >1 INSTRUCTION $t1 - v2 with a highent bits set to o, other bits staying the same St2 - vi multiplied by 8 *vithout using a multiply instruction **REQUIRES >I INSTRUCTION **: St3 - V2 multiplied by 12 without sing a multiply instruction St4 - vl divided by 2 without using a divide instruction $5 - v2 with the lowest 16 bits flipped (inverted) and the upper 16 bits staying the same ***REQUIRES >1 INSTRUCTIONS - OXFD000010 without using the 11 pseudo-instruction This code simply loope infinitely pint apin nop end main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!