下面是我编的一个程序,大家帮我看看,为什么不能生成HEX文件 ORG 0000H AJMP MAIN ORG 0003H AJMP BLINK ORG 0013H AJMP MOVE ;********************************************** ORG 0030H MAIN: MOV SP,#30H MOV TMOD,#00000101B MOV IE,#10000111B MOV TH0,#0DBH MOV TL0,#0F0H MOV P2,#00H SETB IT0 SETB IT1 SETB PX0 ;********************************************** LOOP: AJMP LOOP ;********************************************** BLINK: SETB TR0 CLR C MOV C,P1.0 JNC BLINK0 MOV A,#55H LOOP0: MOV P2,A ACALL DELAY RL A JNB TF0,LOOP0 CLR TR0 MOV TH0,#0DBH MOV TL0,#0F0H MOV P2,#00H CLR TR0 RETI ;**************** BLINK0: MOV A,#0FH LOOP1: MOV P2,A ACALL DELAY SWAP A JNB TF0,LOOP1 CLR TR0 MOV TH0,#0DBH MOV TL0,#0F0H MOV P2,#00H CLR TR0 RETI ;************************************************ MOVE: ACALL KEEP MOV A,P1 CPL A ANL A,#00000110B MOV DPTR,#MOVE0 JMP @A+DPTR MOVE0: NOP NOP AJMP RIGHT AJMP LIFT RIGHT: MOV A,#80H LOOP2: MOV P2,A ACALL DELAY RR A CJNE A,#01H,LOOP2 MOV P2,#00H RETI ;****************** LIFT: MOV A,#01H LOOP3 MOV P2,A ACALL DELAY RL A CJNE A,#08H,LOOP3 MOV P2,#00H RETI ;************************************************ DELAY: MOV R3,#19H KEEP: MOV R4,#0C8H D1: MOV R5,#0C8H D2: DJNZ R5,D2 DJNZ R4,D1 DJNZ R3,KEEP RET END 创建目标是出现图中的情况 |