Page 2 of 2

Re:Executing flat binaries

Posted: Wed Oct 12, 2005 5:01 am
by TheChuckster
My hypothesis has been confirmed! I achieved an absolute jump by loading a register with an address and jumping to the location pointed to by that register. Thanks.

Re:Executing flat binaries

Posted: Sat Oct 15, 2005 9:40 am
by proxy
just out of curiosity, why use inlie ASM at all? why not just use a function pointer like this:

Code: Select all

typedef void (*func_ptr)(void);
func_ptr f = (func_ptr)0x200000;
f();
this will compile down to:

Code: Select all

call 0x200000
which seems pretty reasonable...

proxy

Re:Executing flat binaries

Posted: Sat Oct 15, 2005 12:34 pm
by TheChuckster
I knew of no other method at the time. Now that I'm moving onto multitasking, even your function pointer idea will be obsolete because then I'll just have to set the EIP of my processes accordingly.