Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. (TCO 7) What C-language construct does the following assembly code implement?

ID: 2989520 • Letter: 1

Question

1. (TCO 7) What C-language construct does the following assembly code implement?

                    LDAB                    #10
L1:               ADDA                    0, x
                    INX
                    DECB
                    BNE                      L1       

      A. Loop
       B. If
       C. If /else
       D. All of the above
       E. None of the above

2. Assume that PORTB has a value of 0x37. Which of the following gives us Unpacked BCD for 7?        PORTB= PORTB & 0x37;
       PORTB= PORTB | 0x30;
       PORTB= PORTB | 0x0F;
       PORTB= PORTB & 0x0F;

Explanation / Answer

1) A. Loop

2) PORTB= PORTB & 0x0F