第一个:
ORG 0000H
LJMP DIR1
ORG 0100H
DIR1:MOV 30H,#127
MOV DPTR,#TAB
MOV A,30H
MOV B,#100
DIV AB
MOVC A,@A+DPTR
MOV DPTR,#0DFFFH
MOVX @DPTR,A
MOV A,B
MOV B,#10
DIV AB
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
MOV A,B
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
SJMP $
TAB:DB 0C0H,0F9H,0A4H,0B0H,99H
DB 92H,82H,0F8H,80H,90H
END
第2个:
ORG 0000H
LJMP DIR2
ORG 0100H
DIR2:mov 30h,#0F8H
mov 31h,#0A4H
mov 32h,#0F9H
MOV SCON,#00H
CLR ES
SETB P1.0
MOV SBUF,30H
JNB TI,$
CLR TI
MOV SBUF,31H
JNB TI,$
CLR TI
MOV SBUF,32H
JNB TI,$
CLR TI
CLR P1.0
SJMP $
END
第三个:
ORG 0000H
LJMP DIR3
ORG 0100H
DIR3:MOV 30H,#0001B
MOV 31H,#0011B
MOV 32H,#0001B
MOV P1,#11100000B
ORL P1,#30H
MOV P1,#11010000B
ORL P1,#31H
MOV P1,#10110000B
ORL P1,#32H
SJMP $
END |