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

I need answer for this question The course is Microprocessor Applications 2. Con

ID: 3602558 • Letter: I

Question

I need answer for this question The course is Microprocessor Applications 2. Consider the following assembly language statements (Huang section 7.5.4). Explain what each instruction does to each pin in Port T movb movb movb #sco, #$39, #$09, RDRT PPST PERT 3. As outlined in the Parallel Input-Output Devices Port T notes, consider a conditional branch tha WI will branch if the lower four bits in Port T equal %1011 . Explain how the bit-wise AND as well as compare instructions can be used with the beq instruction to provide this behavior.

Explanation / Answer

2)

movb is a move instruction to move a byte value to the given port.

the first instruction is movb #$C6, DDRT

this will move hex value of C6 into DDRT.

Similarly other instructions will move value of C0 into RDRT

value of 39 in PPST

and value of 09 in PERT

3)

We can use bitwise,compare and branch instruction for this behavior.

To find if the lower 4 bits are 1011 we can extract the lower four bits from the port using bitwise and. We need to mask this with 0x0F value setting the lower 4 bits to 1 to extract the lower 4 bits. Once extracted we can compare the result and if equal we can branch. Comparision should return 0. In case it does then we can use the beq instruction.

AND DDRT,#$0F // to extract the first bit

CMP DDRT

BEQ

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote