[Top][All Lists]

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

[avr-gcc-list] ijmp usage

From: Steve Joiner
Subject: [avr-gcc-list] ijmp usage
Date: Thu, 19 Dec 2002 20:35:28 -0800 (PST)

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)

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:

ldi ZL,lo8(foo)
ldi ZH,hi8(foo)
rjmp foo

It works fine.  (I know the two ldi's don't do anything, but I left
them there to verify that I wasn't trashing some values in Z that I
needed later).

I must be interpreting something wrong -- I would think both versions
should do the same thing.  Can someone give me a clue as to what I'm
doing wrong?


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

reply via email to

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