[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] It is more than: .byte SYMA - SYMB
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] It is more than: .byte SYMA - SYMB |
Date: |
Mon, 15 Sep 2003 09:30:52 +0200 (MET DST) |
As Denis Chertykov <address@hidden> wrote:
>> c: .string "Hello World"
>> .align 2
>> d: ldi XH,pm_hi8(d - c) <- OK
>> ldd r16,Y+(d - c) <- Error: constant value required
>This happened because relocations for Y+N or Z+N not supported.
>Please read GAS info about relocations.
Still, i don't see (after reading the gas manual) when the assembler
decides that it'll be a relocation vs. an absolute expression.
Am i right that changing the code like this would make it an
absolute expression again?
.align 2
c: .string "Hello World"
.align 2
d: ldi XH,pm_hi8(d - c) <- OK
ldd r16,Y+(d - c) <- Error: constant value required
If not, i'm confused, since as far as i can tell, in the above,
d - c is an assembly-time constant expression.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/