用的是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 ,它支持这两种汇编格式的
|