Mail Archives: djgpp/1999/02/26/14:13:34
> Is it possible to allocate an area of memory in djgpp using malloc,
> fill it full of bytes of machine code, and then, using an asm
> statement, push all the registers, call the area of memory as a
> subroutine, pop all the registers when that subroutine returns, and
> continue running the C program without any damage being done?
This is exactly what the stub does :-) so it should work for you.
Of course, getting the machine code *right* might not be trivial.
> I assume that there would be some kind of limitation on the quantity of
> machine code that could be run in this way?
You're limited to a few hundred megabytes, probably. Depends on how
much memory you can malloc.
- Raw text -