MOV R5, #08H LOOP11: MOV A, 3BH MOV DPTR,#TABE MOVC A,@A+DPTR MOV P2, R4 MOV P0, A MOV P1, #0FDH INC 3BH INC R4 LCALL DELAY DJNZ R5, LOOP11
MOV A,32H ;显示要显档的数字 MOV B, #08H MUL AB MOV 3BH, A MOV R4, #00H MOV R5, #08H LOOP22: MOV A, 3BH MOV DPTR, #TABE MOVC A,@A+DPTR MOV P2, R4
word文档 可自由复制编辑
MOV P0, A MOV P1, #0FBH INC 3BH INC R4 LCALL DELAY DJNZ R5, LOOP22
MOV A,33H ;显示要显档的数字 MOV B, #08H MUL AB MOV 3BH, A MOV R4, #00H MOV R5, #08H LOOP33: MOV A, 3BH MOV DPTR, #TABE MOVC A,@A+DPTR MOV P2, R4 MOV P0, A MOV P1, #0F7H INC 3BH INC R4
word文档 可自由复制编辑
LCALL DELAY DJNZ R5, LOOP33
MOV A,34H ;显示要显档的数字 MOV B, #08H MUL AB MOV 3BH, A MOV R4, #00H MOV R5, #08H LOOP44: MOV A, 3BH MOV DPTR, #TABE MOVC A,@A+DPTR MOV P2, R4 MOV P0, A MOV P1, #0EFH INC 3BH INC R4 LCALL DELAY DJNZ R5, LOOP44 POP PSW POP ACC RET
word文档 可自由复制编辑
DELAY: MOV 37H, #50 DEL: MOV 38H, #4 DJNZ 38H, $ DJNZ 37H, DEL RET
TABE: ;0
DB 00H,18H,24H,24H,24H,24H,18H,00H ;1
DB 00H,10H,30H,10H,10H,10H,38H,00H ;2
DB 00H,18H,24H,04H,18H,20H,3CH,00H ;3
DB 00H,18H,24H,18H,04H,24H,18H,00H ;4
DB 00H,08H,18H,28H,7CH,08H,08H,00H ;5
DB 00H,1CH,10H,18H,04H,24H,18H,00H ;6
DB 00H,18H,24H,38H,24H,24H,18H,00H ;7
DB 00H,3CH,28H,08H,10H,10H,10H,00H
word文档 可自由复制编辑