[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] ijmp usage
From: |
Marek Michalkiewicz |
Subject: |
Re: [avr-gcc-list] ijmp usage |
Date: |
Fri, 20 Dec 2002 21:15:56 +0100 (CET) |
> Beware that my method will be broken if you want to IJMP into the upper
> 64K of a mega128.
>
> There should be a way for the compiler/assembler to deal with this, but I
> haven't discovered it yet. ;-)
There is - use pm_lo8(foo) and pm_hi8(foo) which return the low and
high byte of the word address of FOO (right shifted by 1).
ldi r30,pm_lo8(foo)
ldi r31,pm_hi8(foo)
ijmp
Hope this helps,
Marek
avr-gcc-list at http://avr1.org