Mail Archives: djgpp/2001/01/11/08:19:11
On Thu, 11 Jan 2001, Igor Shapiro wrote:
> The situation is as follows: I wrote a C++ program with Watcom, that
> loads external modules (lets call them drivers). The "driver" is written
> with GCC because it supports binary targets (maybe other compilers do
> support?). So the C++ program reads the driver into a new allocated segment.
> So when it calls a function from the driver it must do a far call. So the
> function must end by retf - isn't it? :-)
You could use ``asm("lret");'', I suppose.
Note that Watcom and GCC probably differ in how they set up segment
registers, so you will need to restore important registers such as SS,
ES, and perhaps GS.
- Raw text -