Mail Archives: djgpp/1994/05/23/21:44:17
Hi. I've got a problem involving dynamically loading some driver code
from a file into memory, and then executing code in the file. I need to
create a segment, read the file into it, and then call functions in that
code. The file needs to be loaded at offset 0 in the segment, as it
accesses its own data.
I hope I've explained what I mean enough!
As a rough guess, I think the kind of thing that needs to be done is:
malloc a block of memory (I only need something around 500
bytes or so)
read the file into the block
setup a segment with R/W access, with its base address at the
start of the malloc'ed block
execute some kind of call to a location in that segment
I think I can do all of that except setup the segment bit. Is it
possible to setup a segment in this way (in DJGPP), or do I have to
look for another way of doing things?
Thanks for any ideas.
Chris cgg AT mundil DOT cs DOT mu DOT oz DOT au
- Raw text -