I recently thought about precompilable scripting language, which would be translated to machine code during program loading.
Lets say that I can generate this binary function myself. Now I need to somehow execute it. The general scheme would look like that:
char* binary = compile("script.sc");
pushArgsToStack(1,7);
memexec(binary);
int ret = getEax();
Is there any chance to get it working?
Also, would calling jmp to c++ funcion address work like planned? I mean, after pushing args, returnAddr and so on, I want to somehow call that function from my compiled script.
Thanks for any answers