ORG 00H
MOV A,#38H
ACALL COMNWRT
ACALL DELAY
MOV A,#0EH ; display on, cursor blinking
ACALL COMNWRT
ACALL DELAY
MOV A,#01H ;clear display screen
ACALL COMNWRT
ACALL DELAY
MOV A,#06H ;increment cursor, (shift to right)
ACALL COMNWRT
ACALL DELAY
MOV A,#86H
ACALL COMNWRT
ACALL DELAY
MOV A,#N
ACALL DATAWRT
ACALL DELAY
MOV A,#O
ACALL DATAWRT
AGAIN: SJMP AGAIN
COMNWRT:
MOV P1,A
CLR P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
CLR P2.2
RET
DATAWRT:
MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
CLR P2.2
RET
DELAY: MOV R3,#50H
HERE2: MOV R4,#255H
HERE: DJNZ R4,HERE
DJNZ R3,HERE2
RET
END