[Icc-avr] Pointer issue
Richard
richard-lists at imagecraft.com
Wed Nov 14 11:15:16 PST 2007
This looks like a bug. I will fix. Sorry about that.
At 09:15 AM 11/14/2007, Johan Wallström wrote:
>Hi people
>
>I'm trying to use the expression *(const
>word*)0x40 to read from a flash location,
>but the result seem to be that the compiler
>reads I/O-locations 0x20, 0x21 instead.
>
>When using a variable as address the result is correct.
>
>; void TestCase()
>; {
>.dbline 139
>; word i = 0x0040;
>ldi R24,64
>ldi R25,0
>movw R10,R24
>.dbline 140
>; SendDebug(*(const word*)i);
>movw R30,R24
>lpm R16,Z+
>lpm R17,Z
>xcall _SendDebug
>.dbline 141
>; SendDebug(*(const word*)0x0040);
>in R16,0x20
>in R17,0x21
>xcall _SendDebug
>.dbline -2
>L16:
>.dbline 0 ; func end
>ld R11,y+
>ld R10,y+
>ret
>
>
>_______________________________________________
>Icc-avr mailing list
>Icc-avr at imagecraft.com
>http://dragonsgate.net/mailman/listinfo/icc-avr
// richard (This email is for mailing lists. To
reach me directly, please use richard at imagecraft.com)
More information about the Icc-avr
mailing list