Question: Use the program below to answer the following questions. Line Number 4. 5 6 7 cblock 0x03 MyReg BSR_Set endc ORG 0x0000 Main: movlb BSR_Set


Use the program below to answer the following questions. Line Number 4. 5 6 7 cblock 0x03 MyReg BSR_Set endc ORG 0x0000 Main: movlb BSR_Set clrf MyReg, A clrf MyReg, BANKED 1 movlw 0x78 movwf MyReg, A movlw Ox37 addwf MyReg, W, A 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 daw movlw OxF0 iorwf MyReg, F, A movf MyReg, W, A movwf MyReg, BANKED movlw Ox00 andwf MyReg, F, BANKED ;********* End of program ; END (a) Write down the 12-bit address of the memory location in which the result of the iorwf operation in Line 25 of the above program is stored. (b) Write down the 12-bit address of the memory location in which the result of the andwf operation in Line 30 of the above program is stored. (c) What are the statuses of the five flags in the STATUS register immediately following the execution of Lines 20, 25, 30? You must demonstrate how you come up with the statuses of the five flags to receive credit. (d) What is the value stored in WREG after the execution of Line 22? Determine the five flags in the STATUS register immediately after the execution of Line 22. You must demonstrate how your answers to receive credit. Use the program below to answer the following questions. Line Number 4. 5 6 7 cblock 0x03 MyReg BSR_Set endc ORG 0x0000 Main: movlb BSR_Set clrf MyReg, A clrf MyReg, BANKED 1 movlw 0x78 movwf MyReg, A movlw Ox37 addwf MyReg, W, A 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 daw movlw OxF0 iorwf MyReg, F, A movf MyReg, W, A movwf MyReg, BANKED movlw Ox00 andwf MyReg, F, BANKED ;********* End of program ; END (a) Write down the 12-bit address of the memory location in which the result of the iorwf operation in Line 25 of the above program is stored. (b) Write down the 12-bit address of the memory location in which the result of the andwf operation in Line 30 of the above program is stored. (c) What are the statuses of the five flags in the STATUS register immediately following the execution of Lines 20, 25, 30? You must demonstrate how you come up with the statuses of the five flags to receive credit. (d) What is the value stored in WREG after the execution of Line 22? Determine the five flags in the STATUS register immediately after the execution of Line 22. You must demonstrate how your answers to receive credit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
