CD EQU P3.2
READ EQU P3.3
WRIT EQU P3.4
DAT1 EQU 30H
DAT2 EQU 31H
COM EQU 32H
COD EQU 33H
COT EQU 34H
Y EQU 35H
X EQU 36H
MAIN: MOV SP,#60H
ORL P3,#1CH
MOV DAT1,#00H
MOV DAT2,#00H
MOV COM,#40H
LCALL PR1
MOV DAT1,#20H
MOV DAT2,#00H
MOV COM,#41H
LCALL PR1
MOV DAT1,#00H
MOV DAT2,#08H
MOV COM,#42H
LCALL PR1
MOV DAT1,#20H
MOV DAT2,#00H
MOV COM,#43H
LCALL PR1
MOV COM,#0A7H
LCALL PR12
MOV COM,#80H
LCALL PR12
MOV COM,#9CH
LCALL PR12
CLEAR: MOV DAT1,#00H
MOV DAT2,#00H
MOV COM ,#24H
LCALL PR1
MOV R3,#00H
MOV R4,#20H
MOV COM,#0B0H
LCALL PR12
CLEAR1: LCALL ST3
MOV A,#00H
LCALL PR13
DJNZ R3,CLEAR1
DJNZ R4,CLEAR1
MOV COM,#0B2H
LCALL PR12
MOV COT,#60H
;
MOV DAT1,#03H
MOV DAT2,#00H
MOV COM,#22H
LCALL PR1
MOV DAT1,#00H
MOV DAT2,#1CH
MOV COM,#24H
LCALL PR1
MOV COM,#0B0H
LCALL PR12