> Joris van den Heuvel wrote: > > 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 > etc. If I may comment here, I myself leave the Microchip include files alone, for the reasons others have given. However, that doesn't mean one can't have one's own include files attached to the current project, as well as the Microchip one. On a similar note, I am experimenting with breaking up a large program into three of four or more include files, usually a couple of sub-routines, and #including them in the main program. e.g. (not strictly compiler gramatically correct) ;program.asm #include Microchip files org 000 goto load_incs ;(no room to load includes here, hence the jump) org 004 ;============== load_incs ;(load the following includes here ;I understand they actually load here) #include sub_one.inc #include sub_two.inc goto setup ;Just to keep setup down the bottom where ;it's out of the way ;============== start ;Main program here, ;e.g call one or more subroutines in sub_one call one or more subroutines in sub_two ;etc ;============== setup #define various in/put port names if required ;setup ports, variable declarations and timers and so on goto start ;****************************** My grief was scrolling up and down a couple of thousand lines looking for a label. I could use edit-find, but sometimes (well... nearly always!) forget the exact label name. However, the include files idea work not too bad, but you have to keep opening a window of the particular include file, to change the code there. I think it might work better if only definitely finished code is saved in an include file, and hopefully rarely having to go into it. The other more dramatic problem is naming these things, and avoiding mixing them up with a heap of other files. I'm afraid I'm an old DOS man, and I use directories (sorry - folders) A LOT! I cannot come to grips with the idea of everything being in "My Documents" So, by having one folder for one project or program it'll work. Has anyone got any critisisms or comments, I'd be happy to read them. Regards to all Howard -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu