PICC中混合ASM语言,为何indf的使用出现非法字符提示
#asmBCF _STATUS,5
BTFSC _RCSTA,1
BCF _RCSTA,4
BSF _RCSTA,4
NOP
BTFSS _PIR1,5
GOTO RERETURN
MOVF _RCREG,w
MOVWF _RS232RCORTX
DECF_RS232RCORTX
DECFSZ _RS232RCORTX
GOTO RERETURN
MOVF _count,w
MOVWF _TXREG
BTFSS _PIR1,4
GOTO $-1
MOVF _INDF,w
MOVWF _TXREG
INCF _FSR
TXWAIT BTFSS _PIR1,4
GOTO TXWAIT
DECFSZ _count
GOTO RERETURN
MOVLW 0X08
MOVWF _count
MOVLW 0X56
MOVWF _FSR
RERETURN NOP
#endasm
它提示的错误是:
Error E:\pc cos.c 151 : undefined symbol _INDF
Halting build on first failure as requested.
BUILD FAILED: Thu Sep 30 11:24:49 2004
按照PICC的语法规定,我已经在我使用的变量以及特殊寄存器前面加了_, 尤其是FSR,和INDF,为何FSR编译通过,而INDF却没有通过呢? #include<pic.h>
staticunsigned char INDF @ 0x00;
unsigned char RS232RCORTX,count;
void main()
{
#asm
BCF _STATUS,5
BTFSC _RCSTA,1
BCF _RCSTA,4
BSF _RCSTA,4
NOP
BTFSS _PIR1,5
GOTO RERETURN
MOVF _RCREG,w
MOVWF _RS232RCORTX
DECF_RS232RCORTX
DECFSZ _RS232RCORTX
GOTO RERETURN
MOVF _count,w
MOVWF _TXREG
BTFSS _PIR1,4
GOTO $-1
MOVF _INDF,w
MOVWF _TXREG
INCF _FSR
TXWAIT BTFSS _PIR1,4
GOTO TXWAIT
DECFSZ _count
GOTO RERETURN
MOVLW 0X08
MOVWF _count
MOVLW 0X56
MOVWF _FSR
RERETURN NOP
#endasm
}
Compiler operating Executing: "C:\HT-PIC\BIN\PICC.EXE" -E"ASS.lde" "D:\TEST\aasm.obj" -O"ASS.cof" -O"ASS.hex" -Q -MPLAB -16F73
CRACK BY CJYCJY
Compiler operating
Memory Usage Map:
Program ROM $0000 - $0011$0012 ( 18) words
Program ROM $07E2 - $07FF$001E ( 30) words
$0030 ( 48) words total Program ROM
Bank 0 RAM $0020 - $0021$0002 ( 2) bytes total Bank 0 RAM
Program statistics:
Total ROM used 48 words (1.2%)
Total RAM used 2 bytes (1.0%)
Loaded D:\TEST\ASS.cof
BUILD SUCCEEDED: Sat Oct 09 12:34:56 2004
页:
[1]