[coreboot] Convert Assembly JMP to C

Stefan Reinauer stepan at coresystems.de
Wed Sep 10 22:43:03 CEST 2008

Joseph Smith wrote:
> Hello,
> How do I convert an Assembly JMP instruction to C. What I would like to do
> is execute an executable assembly blob located in memory. From the docs I
> have read, for assembly you just need to issues a JMP to the memory
> location to execute it. How to do the same in C, that is the question...
> P.S. This question is leading up to something great :-)

Does that code return via "ret"? If so, you'd need a call instead of a
jmp, which is basically a function call.

If it does not return, I suggest you use asm volatile (" jmp 0xADDR;\n");


coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866

More information about the coreboot mailing list