首页 > 代码库 > 用汇编 独立键盘控制点阵中不同显示

用汇编 独立键盘控制点阵中不同显示

ORG 0000H
MOV R7,#08H
MOV 83H,#01H
MOV R4,#00H
AA1:CLR P3.6
CLR P3.4
SETB P3.6
DJNZ R7,AA1
AA2:JB P3.0,AA3
MOV R4,#00H
LCALL BBB
AA3:JB P3.1,AA4
MOV R4,#08H
LCALL BBB
AA4:JB P3.2,AA5
MOV R4,#10H
LCALL BBB
AA5:MOV 82H,R4
CLR A
MOVC A,@A+DPTR
MOV P0,A
INC DPTR
AA6:CLR P3.6
SETB P3.4
SETB P3.6
CLR P3.5
SETB P3.5
LCALL CCC
MOV R7,#08H
AA7:CLR A
MOVC A,@A+DPTR
MOV P0,A
INC DPTR
CLR P3.6
CLR P3.4
SETB P3.6
CLR P3.5
SETB P3.5
LCALL CCC
DJNZ R7,AA7
LJMP AA2
BBB:MOV R5,#0FFH
BBB1:MOV R6,#0FFH
BBB2:DJNZ R6,BBB2
DJNZ R5,BBB1
RET
CCC:MOV R3,#04FH
CCC1:MOV R2,#0FH
CCC2:DJNZ R2,CCC2
DJNZ R3,CCC1
RET
ORG 0100H
DB 0FFH,04FH,0FFH,0F7H,0E3H,0C1H,0C9H,0FFH
DB 0FFH,0FFH,0FFH,0F7H,0E3H,0C1H,0C9H,0FFH
DB 0FFH,0FFH,0F6H,0F7H,0E3H,0C1H,0C9H,0FFH
END

用汇编 独立键盘控制点阵中不同显示