PG1995
Active Member
Hi
Do you find the code below correct? I don't understand the code given in the book. What's the purpose of "ORL" and "ANL" instructions? Please help me. Thank you.
Do you find the code below correct? I don't understand the code given in the book. What's the purpose of "ORL" and "ANL" instructions? Please help me. Thank you.
Code:
;Assume that bit P2.2 is used to control an outdoor light and bit P2.5 a light inside a building.
;Show how to turn on the outside light and turn off the inside one.
ORG 0H
SETB C
MOV P2.2, C
CLR C
MOV P2.5, C
SJMP $
END