Mail Archives: djgpp/1995/02/16/14:45:05
> I have a few old real mode C libraries , and some real mode asm and
> protected mode asm objs/src ... etc.
>
> Does anyone have any tips on how I could go about linking any combination of
> these to djgpp compiled sources? I have not tried any of this yet, because
> I thought I'd get some opinions first.
You create a "program" which contains the subroutines you want to call
with the 16 bit compiler/linker. This program should either be a TSR
or a simple format (like .COM). If it is a TSR you can decide how to
pass it's subroutine entries; if it is a .COM file you should have
an entry vector at the start of the image; these must be RETF type
wrappers.
In the .COM file case you call the DPMI services to allocate a block
of DOS memory, copy the contents of the .COM file into offset 0x100.
You then use the DPMI services to do calls to these routines. If you
run under a real DPMI you can also pass parameters (GO32 does not
support this).
Another approach is to write the main program in the 16 bit compiler,
then call a DJGPP program with spawn()/system() with parameters pointing to the
data you want processed.
Have fun.
- Raw text -