用匯編語言的時(shí)候怎么生成.hex文件
比如下面一個(gè)文件:
ORG 0000H
LJMP 0100H
ORG 0100H
MOV R1,#09H
MOV R0,#30H
MOV 2FH,@R0
LOOP:INC R0
MOV A,@R0
SUBB A,2FH
JNC NEXT1
MOV 2FH,@R0
NEXT1:DJNZ R1,LOOP
SJMP $
END
新建new project-確定所用MCU,
右擊target1-選option for target‘target1’-output選項(xiàng)欄-HEX前面畫勾-確定。
往source group1里加上你的asm文件,之后編譯。OK
| 歡迎光臨 (http://www.raoushi.com/bbs/) | Powered by Discuz! X3.1 |