Article View: comp.os.msdos.programmer
Article #3239Calling assembly routines from C
From: John Clinton Hall
Date: Sat, 01 Dec 1990 05:03
Date: Sat, 01 Dec 1990 05:03
21 lines
1469 bytes
1469 bytes
I am writing a program to be separately assembled to be linked with a C
program. The assembly part prints a string using the undocumented INT 29h
function call (I do know the dangers of using an undocumented function call).
The Microsoft Mixed Language Programming Guide states, "By default, C
parameters are passed by value, except for arrays, which are passed by
reference." I will assume that C will pass the "reference" of the array to the
function. What exactly does it mean by "reference?" Is it a word pointing
into the data segment, or a segment address with a word pointing into the
segment?
Also, how would I define the function with extern in the C program? Would I
use:
extern int29( const char * );
--
The highest sounds are hardest to hear. ## ## ## ##### ## jhall@wpi.wpi.edu
Going forward is a way to retreat. ## ## ## ## ## ## Worcester
Great talent shows itself late in life. ## ## ## ##### ## Polytechnic
Even a perfect program still has bugs. ######## ## ## Institute
Technical Details
Message-ID:
<1990Dec1.050322.15678@wpi.WPI.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!samsung!crackers!m2c!wpi.WPI.EDU!jhallShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!samsung!crackers!m2c!wpi.WPI.EDU!jhall From: jhall@wpi.WPI.EDU (John Clinton Hall) Newsgroups: comp.os.msdos.programmer Subject: Calling assembly routines from C Message-ID: <1990Dec1.050322.15678@wpi.WPI.EDU> Date: 1 Dec 90 05:03:22 GMT Sender: jhall@wpi.WPI.EDU (John Clinton Hall) Organization: Worcester Polytechnic Institute Lines: 21