Could shift it in in 8-bit or so wide, smaller chunks, then combine them when done shifting in - all this basically does is move where you do the shifting, though. Or could make a struct and stuff each bit into a bit array then when done read out the equivalent packed struct; your compiler of choice may not do this, in which case you might have to use some "nasty" pointer accessing of the data, but less shifting. Mark Chris Eddy wrote: > Folks, I have a very long data string that I want to shift in, to the > tune of 90 or more bits. I want to shift the data in (or if possible > use a pointer to a bit with increment) in C. (You assy folks sit back > down, I know it is fairly easy). I can implement longs and use the left > shift operator, but how can I avoid carrying the one bit with a pack of > code just for that purpose? If I just do a bunch of rotates, I think C > will start with a 0 in carry for the roll operation every time. > > Any grand ideas? > > Chris Eddy > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements -- I re-ship for small US & overseas businesses, world-wide. (For private individuals at cost; ask.) -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]: PIC only [EE]: engineering [OT]: off topic [AD]: advertisements