Question: 5. Which program fragment correctly performs this function: ads the contents of the working register W with the number 00001001 (in decimal counting system 9)
5. Which program fragment correctly performs this function: ads the contents of the working register W with the number 00001001 (in decimal counting system 9) and checks if the addition result did not overflow the low order nibble i.e. if the sum of the numbers did not exceed the binary number 00001111 and, if so, complements the contents of the register 21h and saves the result obtained in the same register 21h. 4 1 bsf STATUS, 1 addiw b'00001001 btfsc STATUS, 1 comf 21h, 1 2 bef STATUS, 1 addiw d'9 btfss STATUS, 1 comf 21h, 1 3 bcf STATUS, 1 addlw d'9' btfsc STATUS, 1 comf 21h, 1 bcf STATUS, addiw d'9' btfsc STATUS, O comf 21h, 1 5 bcf STATUS, 1 addlw d'9' btfsc STATUS, 1 swapf 21h, 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
