All, I didn't say it was better. But it is explicit. And as far as 'BANKSEL' is concerned, I assumed it was a macro. I personally don't bother with macros. To me, they tend to complicate things. If you want to use them and like them, I have no problem with that. I just like to write my code so it is easy to follow. To me, the best way to that end is to not use macros, and write everything in a straight forward manner. Regards, Jim P.S. I didn't think you were being rude. You were just stating your opinion. This likewise is my opinion, so I hope you won't think I'm being rude. > pic microcontroller discussion list wrote: >> I'm not sure what BANKSEL PORTA is supposed to do. > > I don't mean to be rude, but then why don't you look it up? > FWIW, it makes sure the correct bank to access PORTA is >selected. The assembler does it for you, so there's less > chance of human error. > >> Then to read the port, just do a movf 0x05, 0 >> >> This will move the contents of PORTA into the 'w' register. > > that's exactly what the OP's code did! except that I find the > original code was much clearer and better documented than > your example. > > why is your "movf 0x05, 0" better than the "movf PORTA, w" > in the original post? > > I *really* don't mean to be rude, but I understand if it comes > across that way. I think (as will many others) that your >suggestion is a very bad idea. The symbolic names are there for > a reason. The code is much clearer with the symbolic names. > > Phil Eisermann > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads