|
sst51(8位)单片机,4段数码管显示,在keil中可以编译,但不能调试,显示disassembly windows
[复制链接]
下面是我的程序,挺简单的,本来不应该有问题,但调试时却总出现disassembly窗口。
在附件里,有我的单片机开发板。
先谢谢大家了!!!
DBUFF EQU 5AH
WBUFF EQU 5EH
ORG 0H
AJMP START
ORG 0BH
AJMP DISP
ORG 30H
START:
MOV SP,50H
MOV P0,#0FFH
MOV P2,#0FFH
MOV TMOD,#00000001B
MOV TH0,#HIGH(-2000)
MOV TL0,#LOW(-2000)
SETB TR0
SETB EA
SETB ET0
LOOP:
MOV DBUFF,#01H
MOV DBUFF+1,#02H
MOV DBUFF+2,#03H
MOV DBUFF+3,#40H
MOV A,R0
MOV WBUFF,#1H
MOV WBUFF+1,#2H
MOV WBUFF+2,#3H
MOV WBUFF+3,#4H
MOV R0,#4
AJMP LOOP
;===========================================
DISP: PUSH ACC
PUSH PSW
MOV TH0,#HIGH(-2000)
MOV TL0,#LOW(-2000)
MOV P2,#0FFH
;================================
MOV P2,#01FH
MOV A,#DBUFF
ADD A,R0
MOV R1,A
MOV A,@R1
DEC A
MOV DPTR,#DTAB
MOVC A,@A+DPTR
MOV P0,A
MOV P2,#0FFH
NOP
NOP
;================================
MOV P2,#03FH
MOV A,#WBUFF
ADD A,R0
MOV R1,A
MOV A,@R1
DEC A
MOV DPTR,#WTAB
MOVC A,@A+DPTR
MOV P0,A
MOV P2,#0FFH
NOP
NOP
;================================
DJNZ R0,DISP
RETI
DTAB: DB 03FH,06H,05BH,04fH,066H
DB 06dH,07dH,07H,07fH,06fH
WTAB: DB 0FEH,0FDH,0FBH,0F7H
END
|
|