|
等 级:资深长老 |
经 验 值:75068 |
魅 力 值:11525 |
龙 币:346239 |
积 分:139661.4 |
注册日期:2000-09-01 |
|
|
|
不对呀望山,下面这段小程序也具有同样现象!!!这里没有多少变量啊。(修)
PORT EQU 7FFEH
ORG 0000H
LJMP MAIN
ORG 0013H
LJMP KEY1
ORG 0200H
MAIN: MOV DPTR,#7FFFH
MOV A,#2AH
MOVX @DPTR,A
MOV A,#00H
MOVX @DPTR,A
MOV A,#40H
MOVX @DPTR,A
MOV A,#80H
MOVX @DPTR,A
MOV A,#0D1H
MOVX @DPTR,A
SETB EA
SETB EX1
SETB IT1
WAIT: NOP
LJMP WAIT
KEY1: PUSH ACC
PUSH PSW
MOV DPTR,#PORT
MOVX A,@DPTR
MOV R1,A
ANL A,#07H
MOV R2,A
MOV A,R1
ANL A,#38H
RR A
RR A
RR A
MOV R3,A
CJNE R3,#00H,LINE1
MOV A,R2
ADD A,#08H
LI1: ACALL TABLE1
MOVX @DPTR,A
LJMP OUIT
LINE1: CJNE R3,#01H,LINE2
MOV A,R2
LJMP LI1
LINE2: MOV A,R2
ADD A,#10H
LJMP LI1
OUIT: POP PSW
POP ACC
RETI
TABLE1: INC A
MOVC A,@A+PC
RET
DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H
DB 7FH,6FH,77H,7CH,39H,5EH,79H,71H,31H,37H,73H,72H,3EH,76H,6EH
END (此文在2002-04-29 10:40:52编辑过)
|
|
|
|