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

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

[avr-gcc-list] avr1 and using the 16bit Z-pointer fails with avr-gcc


From: Matthias Wenzel
Subject: [avr-gcc-list] avr1 and using the 16bit Z-pointer fails with avr-gcc
Date: Wed, 06 Jan 2010 22:00:50 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Hi list,

I have a problem practically using the Z-Pointer on an AVR1 core (attiny15)

I don't know how to load a label address to Z, usually I'd want to do it
like

ldi ZL,lo8(label<<1)
ldi ZH,hi8(label<<1)

but avr-gcc doesn't like the shift (nor *2) construction. Also I failed
working around it using some .EQU label2 label*2 statement.

is there a clean way to use Z on avr1? Or maybe a workaround?

Should avr-gcc be blamed and fixed to support the <<1 and *2 formats
that commonly can be found when googling for my problem?

full example code under:
http://pastebin.com/m5522c840



mazzoo




reply via email to

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