ORG 000H LJMP START RS: BIT P3.7 ++ RW: BIT P3.6 ++ E: BIT P3.5 ++ START: MOV SP,#40H MOV P3,#FFH ++ GAIN: MOV P1,#01H LCALL ENABLE LCALL DELAY MOV P1,#38H LCALL ENABLE MOV P1,#0FH LCALL ENABLE MOV P1,#06H LCALL ENABLE MOV P1,#80H LCALL ENABLE MOV DPTR,#BUF1 LCALL WRITE1 LCALL ENABLE MOV P1,#0C0H LCALL ENABLE MOV DPTR,#BUF2 +++ LCALL WRITE1 LCALL ENABLE LCALL DELAY LCALL DELAY JMP AGAIN +++ ENABLE:CLR RS +++ CLR RW +++ CLR E +++ LCALL DELAY SETB E +++ RET WRITE1:MOV R7,#16H NEXT: MOV A,#00H MOVC A,@A+DPTR LCALL WRITE2 LOOP NEXT +++ RET WRITE2:MOV P1,A SETB RS ++++ CLR RW ++++ CLR E ++++ CALL DELAY SETB E ++++ RET DELAY: MOV R6,#0FFH DEL1: MOV R5,#0FFH DEL2: DJNZ R5,DEL2 DJNZ R6,DEL1 RET BUF1: DB 20H,20H,"Welcome",20H,20H,20H,"To",20H,20H BUF1: DB"XidianUniversity" ++++++ END
|