cadrjr
Newbie level 6
expect commapic
I am using the CCS PICC Compiler for PIC.
I want to insert a little ASM into my C program.
When I try to compile the following, I get an "Error 102 : Expect Comma" error after the BSF instruction.
What am I doing wrong ?
void ser_init() {
#asm SER_INIT:
BSF STATUS,5 ; select bank 1
BCF TRISB,1 ; set B1 as an output
BCF STATUS,5 ; select bank 0
BCF PORTB,1 ; set B1 low
RETURN
#endasm
}
I am using the CCS PICC Compiler for PIC.
I want to insert a little ASM into my C program.
When I try to compile the following, I get an "Error 102 : Expect Comma" error after the BSF instruction.
What am I doing wrong ?
void ser_init() {
#asm SER_INIT:
BSF STATUS,5 ; select bank 1
BCF TRISB,1 ; set B1 as an output
BCF STATUS,5 ; select bank 0
BCF PORTB,1 ; set B1 low
RETURN
#endasm
}