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

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

Re: [avr-gcc-list] Calling function with hard coded address


From: Dave Hansen
Subject: Re: [avr-gcc-list] Calling function with hard coded address
Date: Wed, 01 Nov 2006 15:16:08 -0500

From: Simon Han <address@hidden>
[...]
To reply my own question.  :-)

The problem is that gcc does sign extension to the value.
Changing to value less than 0x7fe fixed the problem.

Simon

On Oct 31, 2006, at 9:30 PM, Simon Han wrote:

Hi all,

        I am trying to call functions with hard coded address as follow.

typedef void (*func_type)( void );

((func_type) 0x1D400)();

If this is the case, you should also be able to solve the problem by specifying the address as unsigned, e.g.

  ((func_type) 0x1D400U)();

Note the 'U' suffix.  Haven't tried it, though...

Regards,

  -=Dave

_________________________________________________________________
Get today's hot entertainment gossip http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001





reply via email to

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