1 Data Figure 1 Using Instructions Andwf Andlw Bcf Operation Clearing Group Bits Variable Q37131203

1. For the data of figure 1, and using the instructions andwf,andlw and bcf, the operation of clearing a group of bits ofvariable i will be performed by writing a portion of code inassembly that performs i = i & 0x0F for each instruction(remember all will do the same “clearing bits”).

2. For the data of figure 1, and using the instructions iorwf,iorlw and bsf, the operation of setting a group of bits of thevariable j writing a portion of code in assembly that performs j =j | 0x0E for each instruction (remember all will do the same”setting bits”).

Data Memory Location contents (i) Ox020 0x2C () 0x021 |0xB2 (k) 0x022 0x8A Figure 1. Data Memory Location and Contents

Assembly

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.