bdata across multiple files?

I have data that I would like to efficiently address as both a byte and as 8 bits.
The bdata type sounds like the way to go, but I can not make it work across multiple files.
This program fails to compile and link. Any ideas?

// main.h
extern char bdata Main_Bits;
sfr Main_Bit0 = Main_Bits ^ 0;

//main.c 
#include "main.h"
char bdata Main_Bits;

void FnA( void );  
void main( void )
{
  Main_Bits = 0;
  FnA();  
}

//FnA.c 
#include "main.h"
void FnA( void )
{
  Main_Bit0 = 1;
}

Parents Reply Children
More questions in this forum