现在想学下C和汇编语言混合编程,使用的硬件平台是C8051F930,就是如下的汇编程序
$include "D:\Keil\C51\ASM\C8051F580.INC"
?PR?UartInit?DEMO11 SEGMENT CODE
PUBLIC UartInit
RSEG ?PR?UartInit?DEMO11
UartInit:
CLR EA
MOV SCON0,#010H
SETB ES0
SETB EA
RET
END
编译后出现如下:
assembling asmFun.A51...
A51 MACRO ASSEMBLER V8.02b - SN: K1PMC-NCHRFC
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2008
"D:\Keil\C51\BIN\A51.EXE" "asmFun.A51" INCDIR(D:\Keil\C51\ASM;D:\Keil\C51\ASM;D:\Keil\C51\INC\SiLABS) SET (SMALL) DEBUG EP
A51 FATAL ERROR -
FILE: "D:\KEIL\C51\ASM\C8051F580.INC"
ERROR: FILE DOES NOT EXIST
A51 TERMINATED.
asmFun.A51 - 0 Error(s), 0 Warning(s).
说头文件没有,可是在我的安装目录里明明是有的,如果不包含的话会出现SCON0,ES0是未定义的符号,纠结啊,有谁还记得汇编的,帮我看看!
|