Great idea! Should have thought about it though ;-) Thanks a lot! Francisco Sergio Masci wrote: >... > >// array of 256 bits >char bit_arr[32]; > >void set_bit(int indx) >{ > bit_arr[indx >> 3] |= (1 << (indx & 7)); >} > >void clear_bit(int indx) >{ > bit_arr[indx >> 3] &= ~(1 << (indx & 7)); >} > >int test_bit(int indx) >{ > return ((bit_arr[indx >> 3] & (1 << (indx & 7)) != 0); >} > > >Regards >Sergio Masci > >http://www.xcprod.com/titan/XCSB - optimising structured PIC BASIC compiler > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.