gnupic: Documentation for $ shortcut for line number


Previous by date: 15 Jan 2003 16:54:36 -0000 Re: sdcc pic14 support, Ralf Forsberg
Next by date: 15 Jan 2003 16:54:36 -0000 Re: Documentation for $ shortcut for line number, Eric Smith
Previous in thread: 15 Jan 2003 16:54:36 -0000 Re: Documentation for $ shortcut for line number, Eric Smith
Next in thread: 15 Jan 2003 16:54:36 -0000 Re: Documentation for $ shortcut for line number, Eric Smith

Subject: Re: Documentation for $ shortcut for line number
From: Colin Kuskie ####@####.####
Date: 15 Jan 2003 16:54:36 -0000
Message-Id: <20030115164538.GC28872@dalsemi.com>

On Tue, Jan 14, 2003 at 06:49:51PM -0800, Eric Smith wrote:
> Colin Kuskie wrote:
> 
> > I've borrowed a few books in order to try to learn PIC programming, and
> > in one of them I noticed this construct:
> >
> > 	GOTO	$ - 1
> >
> > where it explains that $ is expanded to the current line number.  I
> > tried this in gpasm and was pleased to see that it's supported, but
> > appears to be undocumented in the manual.
> 
> $ does not expand to a "line number", which would be all but worthless.
> It expands to the address of the instruction currently being assembled.
> If it's used in a context other than an instruction, such as a
> conditional, it expands to the address the next instruction would occupy,
> since the assembler's idea of current address is incremented after an
> instruction is assembled.

Mind if I quote you? :)

Colin

Previous by date: 15 Jan 2003 16:54:36 -0000 Re: sdcc pic14 support, Ralf Forsberg
Next by date: 15 Jan 2003 16:54:36 -0000 Re: Documentation for $ shortcut for line number, Eric Smith
Previous in thread: 15 Jan 2003 16:54:36 -0000 Re: Documentation for $ shortcut for line number, Eric Smith
Next in thread: 15 Jan 2003 16:54:36 -0000 Re: Documentation for $ shortcut for line number, Eric Smith


Powered by ezmlm-browse 0.20.