单片机汇编语言 keil uv4
ORG0000HAJMPSTARTORG0080HSTART:MOVTMOD,#10HSETBTR1MOVC,P1.7JNCDOMOVC,P1.6JNCREMOVC,P1...
ORG 0000H
AJMP START
ORG 0080H
START:MOV TMOD,#10H
SETB TR1
MOV C,P1.7
JNC DO
MOV C,P1.6
JNC RE
MOV C,P1.5
JNC MI
MOV C,P1.4
JNC FA
MOV C,P1.3
JNC SO
AJMP START
DO: MOV R1,#0FFH
DO1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,DO1
DJNZ R1,DO
LJMP START
RE: MOV R1,#0FFH
RE1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,RE1
DJNZ R1,RE
LJMP START
MI: MOV R1,#0FFH
MI1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,MI1
DJNZ R1,MI
LJMP START
FA: MOV R1,#0FFH
FA1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,FA1
DJNZ R1,FA
LJMP START
SO: MOV R1,#0FFH
SO1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,SO1
DJNZ R1,SO
LJMP START
END
Build target '目标 1'
assembling STARTUP.A51...
assembling JGQ.ASM...
linking...
*** WARNING L5: CODE SPACE MEMORY OVERLAP
FROM: 0000H
TO: 0002H
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
ADDRESS: 080AH
Program Size: data=9.0 xdata=0 code=280
"激光琴" - 0 Error(s), 3 Warning(s). 展开
AJMP START
ORG 0080H
START:MOV TMOD,#10H
SETB TR1
MOV C,P1.7
JNC DO
MOV C,P1.6
JNC RE
MOV C,P1.5
JNC MI
MOV C,P1.4
JNC FA
MOV C,P1.3
JNC SO
AJMP START
DO: MOV R1,#0FFH
DO1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,DO1
DJNZ R1,DO
LJMP START
RE: MOV R1,#0FFH
RE1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,RE1
DJNZ R1,RE
LJMP START
MI: MOV R1,#0FFH
MI1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,MI1
DJNZ R1,MI
LJMP START
FA: MOV R1,#0FFH
FA1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,FA1
DJNZ R1,FA
LJMP START
SO: MOV R1,#0FFH
SO1: MOV TH1,#00H
MOV TL1,#00H
MOV R0,#0FFH
JNB TF1,$
CLR P1.7
DJNZ R0,SO1
DJNZ R1,SO
LJMP START
END
Build target '目标 1'
assembling STARTUP.A51...
assembling JGQ.ASM...
linking...
*** WARNING L5: CODE SPACE MEMORY OVERLAP
FROM: 0000H
TO: 0002H
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
ADDRESS: 080AH
Program Size: data=9.0 xdata=0 code=280
"激光琴" - 0 Error(s), 3 Warning(s). 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询