Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWANI/O HANEL
PROGRAMMINGDifferent ways of Accessing Entire 8 BitsThe entire 8 bits of Port 1 are accessedBACK:
MOVA,#55H
MOVP1,A
ACALL DELAYMOVA,#0AAH
MOV P1,AACALLDELAY
SJMPBACKRewrite the code in a more efficient manner by accessing the port directly without going through the accumulatorBACK:MOVP1,#55H
ACALL DELAYMOVP1,#0AAH
ACALLDELAY
SJMPBACKAnother way of doing the same thingMOVA,#55HBACK:MOVP1,A
ACALL DELAYCPLA
SJMPBACK