> I prefer to specify individual bits like this, but leave bit fields (such > as the three prescaler bits here) in binary, as in: > > movlw 1< wrote: > On Tue, Jul 8, 2008 at 2:42 PM, David Meiklejohn > wrote: > > Chris wrote: > >> > >> You could in principle specify the 0 bits too: > >> > >> movlw (1 << TMR0ON) | (1 << T0PS2) | (0 << T0PS1) | (1 << T0PS0) > >> > >> and similarly for the other 0 bits, which I haven't got handy. > > > > I prefer to specify individual bits like this, but leave bit fields (such > > as the three prescaler bits here) in binary, as in: > > > > movlw 1< > > > I do like Olin's method, but otoh, it seems reasonable to expect that > > someone working on the code will have the data sheet at hand. > > I agree that we need to consult the dustsheet. But still I think > Olin's method is much better and clearer. I understand people > who are proficient with C like to use "<<" or ">>" but it is > not as clear in the context of assembly programming. > > > Xiaofan > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Rudonix DoubleSaver http://www.rudonix.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist