Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Jump from variable

2006-02-23 by Jim Parziale

After setting:
    exec = (void *)test1;
Just call via exec:
     exec();

On 2/23/06, Marko Pavlin <mp@...> wrote:
>
>  How can I call function where address is in pointer? Something like this:
>
>
> void test1(void){
>    puts("blah");
> }
>
>
> void *exec;
>
> void main(void) {
>     exec = (void *)test1;
>     __asm
>     {
>           BL             exec
>     }
>
> ...
>
> It's out of context. There will be more pointers and *exec can be
> constant:
> const void *exec = (void *)test1;
>
>
> Thanks!
>
> Marko
>
>
>  SPONSORED LINKS
>   Microcontrollers<http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=mfaAujKZXA2Z_vxre9sGnQ>
> Microprocessor<http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=9jjd2D3GOLIESVQssLmLsA>  Intel
> microprocessors<http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=OMnZuqMZX95mgutt4B-tDw>   Pic
> microcontrollers<http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=Malspbd0T4Rq3M4Q0nHrfw>
>  ------------------------------
> YAHOO! GROUPS LINKS
>
>
>    -  Visit your group "lpc2000 <http://groups.yahoo.com/group/lpc2000>"
>    on the web.
>
>    -  To unsubscribe from this group, send an email to:
>     lpc2000-unsubscribe@yahoogroups.com<lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>    -  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>    Service <http://docs.yahoo.com/info/terms/>.
>
>
>  ------------------------------
>



--
Jim Parziale
nuncio.bitis@...
Malden, MA


[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.