🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #277

prog calls routine from a .COM file?

#277
From: Dave Hiebeler
Date: Tue, 10 Apr 1990 04:31
28 lines
1773 bytes
[ I sent out a copy of this that had been rot-13'ed accidentally.  I
must've bumped the wrong key when sending it from Emacs..  Hopefully,
my attempt to cancel the other article was successful. ]

  I have worked with Unix for a couple of years.  One of the useful
things I have used is the ability to have a program read in a ".o"
object-code file, and call a function from that file.  So, a user can
write a C function and compile it, and then my program can call the
user's function, without the user having to recompile or re-link my
program.

  Anyways, I'm wondering how I could go about doing this on a PC.
I've heard that you can somehow read in a .COM file and call a routine
from that file.  Does anyone have any suggestions, or preferably, a
simple example of how to do this?  I'm very new to PC/DOS hacking..

  I use Turbo C/Asm/debugger if it matters.  I wouldn't mind having to
write these external routines in assembler, but it would be great if
it were possible to write a C function that could be dynamically
loaded in like this.

  This is *extremely* important for me; any help would be *greatly*
appreciated!
-- 
Dave Hiebeler / Computer Science Dept. / Amos Eaton Bldg. /
Rensselaer Polytechnic Institute / Troy, NY 12180-3590 USA
Internet (preferred): hiebeler@turing.cs.rpi.edu   Bitnet: userF3JL@rpitsmts
"Off we go, into the wilds you ponder..."
Technical Details
Message-ID: <A'P#|-&@rpi.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!hiebeler

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!hiebeler
From: hiebeler@cs.rpi.edu (Dave Hiebeler)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: prog calls routine from a .COM file?
Message-ID: <A'P#|-&@rpi.edu>
Date: 10 Apr 90 04:31:21 GMT
Distribution: comp
Organization: RPI CS Dept, and LANL Center for Nonlinear Studies
Lines: 28