Ken Pergola wrote: > I'm curious why this notation is still used by people for the operands of > branches (long or short). > I can see the temptation to use this style, but it appears to me it is an > accident waiting to happen (as far as future code maintenance/modification > is concerned), when a simple label will work. > > (Like when you add some ASM instructions in the future and forget to > re-adjust the 'GOTO $-adr_word' part.) > > Is there a good reason to use this notation and possibly risk introducing > a human error instead of using a label that automatically is adjusted by > the assembler? Everything is a tradeoff. As you say, the label allows code to be inserted between the GOTO and the target without trouble. However, it also makes a maintenence programmer wonder where all the jumps to the label come from. I think the relative GOTO is useful in decreasing clutter and avoiding ambiguity when the GOTO is to an adjacent instruction, maybe two instructions away at most (but preferably not). Anything further and I would definitely use a label. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu