Yes, I assign them in the ASM file, but I compile it as an object afterwards. But, after what you said, I think that using the "Masking the bits with an AND" would be the only way to go for object files, if not I'll just stick with ASM files for libraries. Thanks for the tips, and for your time, Ricardo > > EN -> Bit n: for the EN line. > > > > The problem is that I can assign the registers in main.o, but > > not the bits!! > > You can't assign anything in an .O file. > You do that in the ASM file, right ? > > For example: > > LPORTS UDATA 0x05 > > LCTRL RES 1 ; Set LCTRL as PORTA > > LBUS RES 1 ; Set LBUS as PORTB > > > > LTRIS UDATA 0x86 > > LBUST RES 1 ; Set LBUST as TRISB > > And that must be in an ASM file, not an .O file... > I think that if you look at it again, and think about having your > "library" routines as ASM files, you'll see that things will work > out a bit easier. You can take full advantage of the assembly > time calculations, symbols and pre-processing. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body