[Top][All Lists]

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

Re: [avr-gcc-list] ijmp usage

From: Theodore A. Roth
Subject: Re: [avr-gcc-list] ijmp usage
Date: Fri, 20 Dec 2002 11:34:22 -0800 (PST)

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)

Ted Roth

avr-gcc-list at http://avr1.org

reply via email to

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