Mail Archives: djgpp/1995/12/06/20:19:55
> Thanks. So now, where can I find documentation on how to write such DXE's ??
Well, what little there is is in the info pages for _dxe_load, in the
tests directory under DXE (an example), and in the source for _dxe_load,
and in the sys/dxe.h include file. There are certain things (like I/O)
you currently can't do very easily from DXE's, but almost anything else
should be able to be linked in.
> So here is a very technical question about [v2load] :
>
> I have a 1st program (let us call it S, like Server). I want S to load a
> second program B, and later a third program C.
> It is possible in B or C to call functions in A ?
Yes, but this would be a far call (not so easy to do from GCC directly)
and you would need to realize that the DS/ES/SS still point to the
image B or C, so you have to either write some wrapper code for the A
routines or write code which only uses automatic variables. Also be aware
when using v2load that you must hook PM I21, AH=4c to prevent an exit
of the main image (it's not trival to use).
> If yes, how can I manage
> those calls at the linking stage of B or C. Must I provide minimal functions
> with same operands as is A, but which only perform the jump to A services ?
> How can I obtain addresses of functions in A, must I keep a table of
> functions' offsets in the code ?
It would be much easier to hook a PM software interrupt, which is relatively
easy to call from GCC, and is easy to define your own API. You can then
either pass argments in registers or on the stack.
- Raw text -