打印

MPLAB C 与汇编 编译问题

[复制链接]
918|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
张大卫|  楼主 | 2016-3-23 16:33 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  用的是MPLAB V8.91  器件为 PIC18F25K22 ,准备做远程IAP,发现HITECH 提供的源码 有嵌入汇编,
  目前  asm("ljmp BOOT_START");     是可以编译成功

#asm
//    ; //Reset vector redirection
//    ; //some equates for accessing the program counter
    PCL    equ    02h        
    PCLATH    equ    0Ah
    psect    redirect,abs,class=CODE,delta=2    ;//absolute psect so it goes
                        ;//to address zero
    ;//The boot loader code has been written so that it doesn't need any
    ;//variable initialization runtime startup code.
    ;//Because of this, we can jump directly into the main() function.
    global    _main        
    movlw    _main >> 8    ;//A "long" jump to main - this will cope with
    movwf    PCLATH        ;//main being positioned anywhere
    movlw    _main & 0xFF
    movwf    PCL
#endasm   
上面这段就是提示   syntax error  ,不知大家有没有碰到过这种怪事,我看了,MPLAB ,它支持这两种汇编格式的

沙发
张大卫|  楼主 | 2016-3-23 16:34 | 只看该作者
希望大家能讨论,或者建立一个QQ群聊

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

11

主题

69

帖子

0

粉丝