For my small hobby project, I need to release machine code from a C ++ program at runtime. I have a base address of 0xDEADBEEF and you want to write something like this:
Assembler a((void*)0xDEADBEEF); a.Emit() << Push(Reg::Eax) << Push(Reg::Ebx) << Jmp(0xFEFEFEFE);
The built-in assembler is not my choice, because the generated machine code depends on the state of the program.
Does anyone know of any existing library for this? If not, would it be nice to develop it from scratch and make it open source? (I mean, will anyone ever use this library, if it exists?)
Anton
source share