Code:
ORG 0000h MAIN: MOV R1,#0 LAPLAI: MOV R0,#0 LAP: CALL HIENTHI INC R0 CJNE R0,#100,LAP INC R1 CJNE R1,#1,LAPLAI MOV R0,#0 DEMTIEP: MOV R1,#1 CALL HIENTHI INC R0 CJNE R0,#88,DEMTIEP ;------------------------------------------- HIENTHI: MOV R7,#255 QUET: MOV P3,#00H MOV A,R0 MOV B,#10 DIV AB MOV DPTR,#MALED MOVC A,@A+DPTR MOV P2,A CALL DELAY SETB P1.1 CALL DELAY CLR P1.1 MOV A,B MOVC A,@A+DPTR MOV P2,A SETB P1.0 CALL DELAY CLR P1.0 CALL DELAY MOV A,R1 MOV B,#10 DIV AB MOV DPTR,#MALED MOVC A,@A+DPTR MOV P2,A CALL DELAY SETB P1.3 CALL DELAY CLR P1.3 MOV A,B MOVC A,@A+DPTR MOV P2,A SETB P1.2 CALL DELAY CLR P1.2 CALL DELAY RET DJNZ R7,QUET MALED:DB 11000000B,11111001B,10100100B,10110000B,10011001B,10010010B,10000010B,11111000B,10000000B,10010000B RET DELAY: MOV R3,#35 LAP1: MOV R2,#20 LAPA: NOP NOP NOP NOP DJNZ R2,LAPA DJNZ R3,LAP1 RET END
Comment