www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/06/20:19:55

Xref: news-dnh.mv.net comp.os.msdos.djgpp:3637
Path: news-dnh.mv.net!mv!news.sprintlink.net!cs.utexas.edu!academ!news.sesqui.net!rice!news!sandmann
From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: V2 questions
Date: Tue, 05 Dec 1995 12:21:16 CST
Organization: Rice University, Houston, Texas
Lines: 30
References: <49uj8t$hk0 AT news DOT cea DOT fr> <30c30ce5 DOT sandmann AT clio DOT rice DOT edu> <4a0tl9$403 AT news DOT cea DOT fr>
Reply-To: sandmann AT clio DOT rice DOT edu
Nntp-Posting-Host: clio.rice.edu
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019