21-8
x86 MICROPROCESSORS
ACALL COMMAND ;call the COMMAND procedure
ACALL DELAY ;call a delay
MOV A, #0EH ;command for display on, cursor on
A CALL DELAY ;call a delay
MOV A, #01 ;command to clear LCD
ACALL COMMAND ;call the COMMAND procedure
ACALL DELAY ;call a delay
MOV A, #80 H ;cursor at line 1, position 1
ACALL COMMAND ;call the COMMAND procedure
ACALL DELAY ;call a delay
STRT: MOV A, #'Y' ;move to AL, the ASCII of 'y'
ACALL DAT ;call the DAT procedure
ACALL DELAY ;call a delay
HERE: SJMP HERE
COMMAND: ;procedure named COMMAND
MOV DISP, A ;send data in A to port
CLR RS ;RS = 0 for selecting command
register
SETB EN ;EN = 1
ACALL DELAY ;call the delay program
CLR EN ;EN = 0
RET
DAT: ;procedure ...