1. The following C code shifts u16_k to the left for each 0 bit present in u16_j. Convert this to PIC24 assembly code. You may want to convert the for loop structure to a while loop structure....


1. The following
C
code shifts u16_k to the left for each 0 bit present in u16_j. Convert this to PIC24 assembly code. You may want to convert the for loop structure to a while loop structure.


uint16_t u16_i,u16_j,u16_k;


u16_k = 1; // initialize k


for (u16_i = 0; u16_i != 16; u16_i++) { // do for 16 bits


if ((u16_j & 0x0001) == 0) {


u16_k = u16_k


}


u16_j = u16_j >> 1; // look at the next bit


}







May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here