Hello,

I wrote this code:

#include <pic16f877.h>
#define SET(reg,bit) (reg) |= (1<<(bit))
#define CLR(reg,bit) (reg) &= ~(1<<(bit))

#define LED1 PORTA,0
#define LED2 PORTA,2

void main() {
SET(LED1);
}

And i got this error:

sdcc -mpic14 -p16f877a -V --debug -I/home/hlopes/Projetos/rtt.inc/mcfil/display_c/sdcc/ -c display.c
display.c:9: 9: error: macro "SET" requires 2 arguments, but only 1 given
display.c:10: 2: warning: no newline at end of file
display.c:9: error 20: Undefined identifier 'SET'
+ "/usr/local/bin/sdcpp" -nostdinc -Wall -std=c99 -I"/home/hlopes/Projetos/rtt.inc/mcfil/display_c/sdcc/" -obj-ext=.o -DSDCC_MODEL_SMALL -DSDCC=274 -DSDCC_pic14 -D__pic14 -DSDCC_PROCESSOR="16f877a" -I"/usr/local/bin/../share/sdcc/include/pic14" -I"/usr/local/share/sdcc/include/pic14" -I"/usr/local/bin/../share/sdcc/include" -I"/usr/local/share/sdcc/include" -I"/usr/local/bin/../share/sdcc/include/pic" -I"/usr/local/share/sdcc/include/pic"  " display.c"
*** Exited with status: 1 ***


I'm using SDCC 2.7.4. Can anybody help me?

Thanks, Helvecio