keil与roteus混合编译.docVIP

  • 10
  • 0
  • 约2.9万字
  • 约 24页
  • 2017-01-03 发布于河南
  • 举报
找了N久终于找到如何在Keil3下用汇编语句了,在下初学,见谅.= =#####图1.如往常一样建立项目,选择芯片型号,建立main() 函数,具体工程文件结构如图,main函数中的asmfile在下图介绍  图2. asmfile子程序的实现,并保存为new.s,添加到项目中,该子程序中调用了main.c中的 int cFun(int a,int b,int c)函数,需用IMPORT cFun来说明。注意不要顶格写(否则编译会提示四条错误信息,new.s(2): error: A1163E: Unknown opcode asmfile , expecting opcode or Macronew.s(4): error: A1163E: Unknown opcode asmfile, , expecting opcode or Macronew.s(6): error: A1163E: Unknown opcode cFun , expecting opcode or Macronew.s(9): error: A1355U: A Label was found which was in no AREA)   图3.如果正常,编译通过   图4.Debug 可见R0,R1,R2改变为0x0000000b,00即十进制的11,22,33

文档评论(0)

1亿VIP精品文档

相关文档