After having been bitten over the years (using a range of processors and assemblers) by using a constant name as a variable "address" I now prefix all constant names with "K". This makes obvious the presence of (stupid) errors such as writing mov a, upper_limit when you meant to use mov a, #upper_limit Both do something but the wrong version is rather unuseful and VERY hard to spot once you have done it due to "mental blinkers" which tend to stop you seeing the obvious once you have approved of it once. Writing mov a,Kupper_limit can be immediately seen to be wrong by inspection subsequently despite the brains inbuilt error-protecting mechanisms. The value of this depends on processor and mnemonics - some systems have specific load-immediate mnemonics which tend to prevent this error. One can extend this to using V prefix for variables, B for bit patterns etc but use of K for constants shows the best return for me at least. Russell McMahon > >I personally try to use all lower case for keywords, Underscores in > >variables, All uppercase for defines or constants. > > > >Type of variable as first part of variable name, Since labels are variable > >of type "address" I try to use "at" or "a" as the first letter of labels, > >but they also denote the start of functions or procedures so sometimes I use > >"f" or "p" or even "s" or "sub." etc -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.