To avoid confusion with predefined symbols like Z, I define my own symbols to have a leading underscore. Thus btfss _z is the same as btfss status,z Fr. Thomas McGahee ----- Original Message -----=20 From: Joris van den Heuvel=20 To: PICLIST@MITVMA.MIT.EDU=20 Sent: Friday, April 19, 2002 10:31 AM Subject: [PIC]: Include files Hey all, Sometimes I see code posted here and notice how everyone always = addresses bits by both their register name and their bit names. I'd hate = to have to remember (at all times) in which register a specific bit is, = so ever since I started out with PICs I always reworked the INC file of = the processor type I was working with. For every bit name I made a = #define statement, so the bit name includes the register name it is in. Examples: - STATUS,Z becomes Z - STATUS,RP0 becomes RP0 - INTCON,GIE becomes GIE - PIR1,CCP1IF becomes CCP1IF For all of you to enjoy, here are the include files I have used until = now for the following types of PICs: - 16F84 - 16F628 - 16F876 - 16F877 Furthermore, there's a macro template I always use. Most of the times = I end up putting extra macros in there, but these are a good start. = Included are: - movff file,file ; move file to file - movlf literal,file ; move literal to file - incfw file ; increment file and load into W - decfw file ; decrement file and load into W - inccprs file,literal ; increment file, compare file and = literal, clear file if equal - compare file,literal,target ; compare file and literal, call target = if equal Regards, Joris. _______________________________________________________________ "Bass is the basis of all that is music" -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.