Question: Write PIC24 assembly language equivalents for the following C code fragments. Assume variables u16 i, u16_k, u16 j, and u16_n are uint16_t variables, while
Write PIC24 assembly language equivalents for the following C code fragments. Assume variables u16 i, u16_k, u16 j, and u16_n are uint16_t variables, while u8_p, u8_q, and u8 r are uint8_t variables. 1. Code fragment: ul6_k= u16 i + (u16_j < < 1)-0x30; 2. Code fragment: u16_k=(uint16_t) u8 p + (u16_j < < 1)-0x30; 3. Code fragment (use place holders for if-body, else-body): if ((u16_k!=0x0400) && (u8_r>u8_p)) { //if-body statements } else { //else-body statements } 4. Code fragment (use place holders for while-body): While(u16_k>u16_j) { //While-body statements } //... rest of code
Step by Step Solution
There are 3 Steps involved in it
Answer 1 Assembly equivalent for code fragment movw i wo movwj w1 clrw w2 setc w2 subc 1 w2 Move val... View full answer
Get step-by-step solutions from verified subject matter experts
