avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] ijmp usage


From: Steve Joiner
Subject: Re: [avr-gcc-list] ijmp usage
Date: Fri, 20 Dec 2002 12:54:55 -0800 (PST)

Schweet!  Using pm_lo8 and pm_hi8 to get the word address did the
trick.

Thanks for the help.

-Steve


--- "Theodore A. Roth" <address@hidden> wrote:
> 
> 
> On Thu, 19 Dec 2002, Steve Joiner wrote:
> 
> :)
> :) Ok, dumb question time.  I'm writing a routine in assembly for the
> :) atmega8.  I've got some code that looks like this:
> :)
> :) ldi ZL,lo8(foo)
> :) ldi ZH,hi8(foo)
> :) ijmp
> :)
> :) Unfortunately, it doesn't seem to be doing what I want (which
> would be
> :) to jump to foo).  If I replace that code, with this code:
> 
> Ok, ignore my other post about using the lsr, ror insns.
> 
> I just dug through binutils and found the pm_lo8() and pm_hi8()
> built-ins.
> 
> This should do want you want:
> 
>   ldi ZL,pm_lo8(foo)
>   ldi ZH,pm_hi8(foo)
>   ijmp
> 
> 
> Ted Roth
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]