Thank you Don, but if you want to name a register, which code version would you prefer and why? Normally one uses the 'equ'-code. But makes this any sense? Martin Don Hyde schrieb: > The code > counter equ 0x20 > > sets an "assembler constant" to the hex value 20. The conversion of the > symbols "0x20" to a binary value happens when the "equ" line is scanned by > the assembler, which you can tell because if you make a typo, the error > message occurs at that point. Later when you reference "counter", the > assembler performs a value substitution at that point, inserting the binary > value just as it would insert the value of a label. > > the code > #define counter 0x20 > > tells the assembler to save the text "0x20". Later when the assembler sees > "counter", it performs a textual substitution. If you made a typo in the > 0x20, the error message would appear at the point where you referred to > "counter", and not on the line where you made the actual typo. Since it's > text, you can put anything into a #define that you want > (for instance #define Serial_In PORTC,7 ), and it works or doesn't work > depending on the context where you later use it. In this case, > btfsc Serial_In > would work, but > goto Serial_In > would get an error because a comma is illegal in the target of a goto. >