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

1. A Register (REGO) in the GPR is loaded with the hex code 6A (binary 0110101)T

ID: 2293025 • Letter: 1

Question

1. A Register (REGO) in the GPR is loaded with the hex code 6A (binary 0110101)The Carry bit (C) in the Status register is set to zero. State the contents of REGO (use and C bit after the following operation on REGO. (LS bit of REGO is bit o and the MS Each of the operations below is independent of each other. (10 pts) hex notation) bit is 7) a. Clear b. Decrement c. Complement d. Rotate left twice e. Clear Bit 5 REGO REGO REGO REGO 2. Which of the following is not a PIC Assembler Directive? (circle the correct answers (10 pts) a. EQU b· LABEL C. END d. ORG e. None of the above

Explanation / Answer

Hex code of REG0 is 6A ( 01101010)

Carry bit in the status register is 0

     

REG0=00H( 00000000)C= 0

REG0= 69H( 01101001) C= 0

REG0= 95H( 10010101) C= 0

REG0= 6A H    ( 01101010 ) .After rotating the contents of register left once it becomes

REG0= D4H   (11010100 ). After rotating the contents of register lefttwice it becomes

REG0= A9H   (10101001 )

The contents are

REG0= A9­H ( 10101001)C= 0

REG0= 4AH( 01001010) C= 0

2. LABEL is not an assembler directive. EQU, ORG,END are assembler directives.

EQU is an assembler directive which assigns value to a constant

ORG is an assembler directive which defines an address from which the program is stored in memory

END is an assembler directive which is used to end the program.