START: MOV R0,#0
MOV R1,#0
MOV R4,#0
MOV A,R0
MOVC A,@A+DPTR
MOV P0,A
MOV P2,A
CLR A
CLR TF0
COUNT1: MOV DPTR,#TABLE
MOV A,R0
MOVC A,@A+DPTR
LCALL DELAY
MOV P0,A
INC R0
CJNE A,#01H,COUNT1
COUNT2: INC R1
MOV A,R1
MOVC A,@A+DPTR
LCALL DELAY
MOV P2,A
MOV R0,#0
MOV A,R0
MOVC A,@A+DPTR
MOV P0,A
CJNE A,#01H,COUNT1
CLR A
LJMP START
TABLE: DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H,01H
DELAY: MOV TMOD,#02H
MOV TL0,#8
MOV TH0,#8
MOV R2,#200
MOV R3,#50
SETB EA
SETB ET0
SETB P3.2
J1: JNB P3.2,JUDGE
CJNE R4,#1,J2
SETB TR0
SJMP KKKKK
J2: CJNE R4,#2,J3
CLR TR0
SJMP J1
J3: LJMP START
KKKKK: JBC TF0,SETC
SJMP KKKKK
SETC: DJNZ R2,KKKKK
DJNZ R3,KKKKK
RET
JUDGE: INC R4
RETI
end
在keilc里运行后出现
*** error 65: access violation at I:0x81 : no 'write' permission
的错误,搜索了一下类似的错误似乎是说栈溢出?
可以简单说下这是怎么回事么= =
如果可以,能帮忙指出哪里出了问题么……
现在搞51单片机
还是用c语言的多吧
如今编译器的效率已经很高了
汇编不懂
友情帮顶