[comp.lang.c] PC graphics Drivers

bakke@plains.UUCP (Jeff Bakke) (12/09/89)

I have a problem that I hope someone could help me with.  I am currently
developing a Graphics library set for the PC using C and Assembler, but
in doing so, I have created support in Assembler for most of the
standard graphics modes and few non-standard.  The problem that I have
is that when a program is compiled to use this library of routines, 
all of the support routines for all the graphics modes (not just the
ones that are required or used) have to be compiled into the program.
Currently I am avoiding this problem by including conditional compiles,
but I would like to be able to select which one is used in Run time.

The question:  Does anyone know how to set up a system of "drivers" or
overlay type files in turbo c?  Something like borland uses?

As far as I can tell, I could simply compile each routine, remove all
non-pertinent information to the execution, and save it.  And then,
allocate memory, load that modified .OBJ file, and execute it.  But
if the routine uses EXTERNAL references, then I'm stuck because of the
dynamic memory problems.  Is there anyway to avoid this or, at the
least, could someone point me towards a reference on the format of
.OBJ files so that I could find out how external references are 
fixed.  

Thanks for the help.

Jeff Bakke
bakke@plains.NoDak.edu