>I like these 3 home made mnemonics; >#define skp1 goto $+1+1 ; skips one instruction >#define skp2 goto $+1+2 ; skips 2 instructions >#define skp3 goto $+1+3 ; skips 3 instructions >(never needed skp4) > >These can really neaten-up code and avoid the use >of messy un-needed goto labels when all you want >to do is skip the next 3 instructions; > > btfss input,2 ; test input > skp3 ; > movlw b'11001100' ; input == hi, so do these 3 > movwf lastb ; > movwf PORTB ; > >I don't know if that makes the .asm purists cringe >but I see it as part of the natural evolution of >the .asm language that you develop new "instructions" >that make it easier to read, code, work with etc. Grief, you guys seem to be making a rod for your own back. I shudder to think of the possibilities for having the code go into hyperspace because you have managed to cross a page boundary. Perhaps you all use small linkable modules, in which case you can probably get away with it, but I can envisage making a small modification to code where the code space is getting full, and finding it suddenly "very broke" as the skip crosses a page boundary. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads