Article View: comp.sys.ibm.pc
Article #42590Re: Microsoft C code called from MASM. Segment issues.
From: michael k finegan
Date: Sat, 17 Feb 1990 21:49
Date: Sat, 17 Feb 1990 21:49
27 lines
1494 bytes
1494 bytes
boozer@leedat.UUCP (G. Boozer) writes:
>I am adding code to an assembly language code base of about one million lines.
>I want to write some C code that will be used as subroutines to the assemble
>code. My question is how to tell C what the CS and DS segments are.
>Thanks,
>Glenn Boozer
>Lee Data Corp, Networking Div.
>{decwrl|pyramid|ames}!mips!leedat!boozer
While I have gone from C to Assembler, I haven't tried Assembler to C.
You need to look at pages 90-94 of the Microsoft Mixed Language Programming
Guide (comes MS Macro Assembler 5.1) - "Calling High-Level Languages from
Assembly".
They suggest starting in C, to guarantee any C initialization code is
executed, then calling your assembly code, which can then call C modules ...
It also looks like you will have to use the default MS 'language' (Pascal/
Basic/C) segments. I can't reproduce the table they show, here, but you
could always use the /Fa option to see what your C routine expects the
segments to be called ...
Mike Finegan
mfinegan@uceng.UC.EDU
Technical Details
Message-ID:
<3664@uceng.UC.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uceng!mfineganReferences:
<84@leedat.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uceng!mfinegan From: mfinegan@uceng.UC.EDU (michael k finegan) Newsgroups: comp.sys.ibm.pc,alt.msdos.programmer Subject: Re: Microsoft C code called from MASM. Segment issues. Message-ID: <3664@uceng.UC.EDU> Date: 17 Feb 90 21:49:55 GMT References: <84@leedat.UUCP> Followup-To: comp.sys.ibm.pc Organization: Univ. of Cincinnati, College of Engg. Lines: 27