|
From: | Dave Hansen |
Subject: | RE: [avr-gcc-list] inline assembler, ijmp, X-Register |
Date: | Fri, 01 Jul 2005 12:26:39 -0400 |
From: Torsten Mohr <address@hidden> [...]
i have a functionpointer that is located in the variable fptr: uint32_t fptr; I'd now like to jump to that location. From the avr-libc-user-manual-1.2.3 i thought i'd need to put it like this: asm("ijmp":: "x" (fptr / 2));
Just a guess, because I don't have my inline assembly crib sheet handy, and I don't have time to try it right now...
Don't you need a %0 in there somewhere, e.g. asm("ijmp %0"::"x" (fptr/2)); Just another guess: What happens if you do something like uint16_t fptr2 = fptr/2; asm("ijmp":: "x" fptr2); HTH, -=Dave
[Prev in Thread] | Current Thread | [Next in Thread] |