Alan B. Pearce wrote: >> I agree that we need to consult the dustsheet. > > Yeah, well judging by the number of queries that land here, it seems a lot > of datasheets are gathering dust ... ;)))))) > >> 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. > > Another advantage of Olins method is that you can see what other bits are in > the register, as ALL the bits are laid out. This makes it more suitable for > registers where some bits will get manipulated in one part of the program, > and others get manipulated elsewhere (possibly in another module) and so you > can see where side effects may be generated. > Olins mathod is OK for one-time initial setup, but for code that is executed in the main code, BCF/BSF is often better/easier/clearer, say for clearing/setting some xxIF or xxIE flags. BCF/BSF (when used for non-PORTx FSR's) usualy has no side effects. And I have no idea whatsoever what the "<<" and ">>" means... :-) Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist