On Thu, Feb 24, 2005 at 02:39:51PM +0200, jsand wrote: > Hello Roland & PIC.ers, > > ----- Original Message ----- > From: "Roland" > To: "Microcontroller discussion list - Public." > Sent: Thursday, February 24, 2005 12:07 AM > Subject: Re: [PIC] 16 to 18F migration > > > > At 01:23 PM 23/02/2005 -0500, you wrote: > > ............... > > >> If the BRA crosses over a "CALL" or a "GOTO" then add an additional 2 as > > >> these are four byte instructions. > .. > snippo > .. > > > instruction, > > >one word, one address format was simple enough to keep track of. But with > > >bytes, alignment, variable sized instructions, and the like, the $+ > > technique > > >becomes even more hazardous than it already was. > > > > > >It's definitely time to leave it alone if you're moving up to 18F. > > > > > >BAJ > > >-- > > > > Thanks, I have. > > > > I found an app note that covers all the aspects in detail; > > > > AN716 > > Migrating Designs from PIC16C74A/74B to PIC18C442 > > > > > > > Regards > > Roland Jollivet > > > As I recall from my early days of programming pics, one very > pertinent reason for using $ as a PC designator was inside macros. > With absolute code -which was the only source method available then- > you couldn't put labels inside macros unless you were sure you only > ever invoked them a maximum of once in your source file. > Multiple invocations resulted in multiple same-labels and no assembly. > So, the $ was the only way of looping within macros. > > When the linker mode came along, labels in macros were allowable > provided you made them: > > Local yadayada, eieio ;yada.. eie... are label names. Works in absolute mode too. BAJ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist