WH Tan wrote : > My rules in dealing with the goto $... when porting from PIC16 to > PIC18. > > 1) 'goto' will be replace with 'bra' > 2) The address count is doubled up > > goto $-2 will work well if you have doubled up the address count. > Anyway it you have goto $+something, simply double up the address > count will catch you! Goto is 2-word instruction in PIC18. > Note that there are (at least) three different 2-word instructions in the PIC18, not just GOTO. You have to watch out if you are just simply "counting lines"... I'd write your rule 1) above like this : 1) 'goto $' will be replaced with 'bra/goto