Que raro... yo lo puedo compilar sin ningun problema al codigo que te pase, el problema es en TU codigo, ya que lo veo declarado como FLAGS en mayusculas.
Recorda que para acceder a los 8 bits necesitas usar flags.val, por ejemplo aca:
swich(FLAG){
deberia ser:
swich(FLAGS.val){
Nuevamente, si queres que sea FLAGS solo ahi, luego podes acceder bit a bit como la segunda solucion que te mostre.
void interrupt boton(){
__delay_ms(300);
entonces en la función DECIDE debo ejecutar instrucciones dependiendo de valor de FLAG la solución mas elegante que se me ocurre es el uso de switch, imagina que use 15"if" y "else if" seria horrible ademas de la confusión ya que en ciertos casos se ejecuta la misma instrucción con dos valores distintos en FLAG osea asi:
CLEAN SUCCESSFUL (total time: 62ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'F:/CCS/MPLABx/XC8.X'
make -f nbproject/Makefile-default.mk dist/default/production/XC8.X.production.hex
make[2]: Entering directory 'F:/CCS/MPLABx/XC8.X'
"C:\Program Files (x86)\Microchip\xc8\v1.43\bin\xc8.exe" --pass1 --chip=18F1320 -Q -G --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 -I"../testLibrary.X" --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/main.p1 main.c
main.c:32: warning: (373) implicit signed to unsigned conversion
main.c:35: warning: (373) implicit signed to unsigned conversion
"C:\Program Files (x86)\Microchip\xc8\v1.43\bin\xc8.exe" --chip=18F1320 -G -mdist/default/production/XC8.X.production.map --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 -I"../testLibrary.X" --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --memorysummary dist/default/production/memoryfile.xml -odist/default/production/XC8.X.production.elf build/default/production/main.p1
Microchip MPLAB XC8 C Compiler (Free Mode) V1.43
Build date: Jul 24 2017
Part Support Version: 1.43
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration
:: advisory: (1233) Employing 18F1320 errata work-arounds:
:: advisory: (1234) * GOTO instruction at reset vector must be preceded by NOP
:: advisory: (1234) * DAW instruction may improperly clear CARRY bit
:: warning: (1273) Omniscient Code Generation not available in Free mode
:: warning: (1311) missing configuration setting for config word 0x300001; using default
:: warning: (1311) missing configuration setting for config word 0x300002; using default
:: warning: (1311) missing configuration setting for config word 0x300003; using default
:: warning: (1311) missing configuration setting for config word 0x300005; using default
:: warning: (1311) missing configuration setting for config word 0x300006; using default
:: warning: (1311) missing configuration setting for config word 0x300008; using default
:: warning: (1311) missing configuration setting for config word 0x300009; using default
:: warning: (1311) missing configuration setting for config word 0x30000A; using default
:: warning: (1311) missing configuration setting for config word 0x30000B; using default
:: warning: (1311) missing configuration setting for config word 0x30000C; using default
:: warning: (1311) missing configuration setting for config word 0x30000D; using default
Memory Summary:
Program space used CAh ( 202) of 2000h bytes ( 2.5%)
Data space used 16h ( 22) of 100h bytes ( 8.6%)
Configuration bits used 7h ( 7) of 7h words (100.0%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
ID Location space used 8h ( 8) of 8h bytes (100.0%)
Data stack space used 0h ( 0) of 80h bytes ( 0.0%)
You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.
make[2]: Leaving directory 'F:/CCS/MPLABx/XC8.X'
make[1]: Leaving directory 'F:/CCS/MPLABx/XC8.X'
BUILD SUCCESSFUL (total time: 1s)
Loading code from F:/CCS/MPLABx/XC8.X/dist/default/production/XC8.X.production.hex...
Loading completedEl xc.h te deberia funcionar bien... ya que ese archivo luego te agrega el PIC que corresponde y te habilita el uso de las estructuras INTCONbits así como también todos los registros.
Lo que no reconozco es el __bit, el manual de XC8 no lo define. Y seguramente sea ese bit_config.h que tenes.