Article View: comp.sys.ibm.pc.programmer
Article #616Re: Using Turbo C with libraries compiled with Microsoft C
From: William C. Marsh
Date: Tue, 05 Jun 1990 19:47
Date: Tue, 05 Jun 1990 19:47
39 lines
2167 bytes
2167 bytes
Just thought I'd correct a few things, but mostly Tom's comments are
correct:
In article <1990Jun4.205834.13661@cbnewsc.att.com> tjr@cbnewsc.att.com (thomas.j.roberts) writes:
>1) TC returns 4-byte results in AX/DX; MC uses AX/BX (float/double
> are returned in 8087 Top-Of-Stack register).
Wrong. Both use DX:AX for longs, far pointers, etc. I don't know about
floats.
>4) TC and MC have different requirements for subroutines to preserve
> register contents. This will cause a serious disaster during
Both have requirements to save BP, SI, and DI (and DS!). All others are
fair game for both compilers.
>5) The TC run-time library screws around with the console hardware
> (even if you don't call any of its TEXT or GRAPHICS routines);
> this can often be minimized by setting directvideo=0.
Shouldn't matter to a third party routine, since Microsoft doesn't mess
about with the hardware, and the library would have to deal with it
anyway.
>In most cases, even if you manage to get the linker to link the program
>and libraries without error, it will still die a horrible death when
>executed (usually taking MS-DOS down, too).
Probably. It's probably the segments (and groups) that are going to kill
you, also with internal functions (like long variable manipulation stuff)
that would be called in the third party library which are not in the TC
library.
Bill
--
Bill Marsh, Naval Ocean Systems Center, San Diego, CA
{arpa,mil}net: bmarsh@cod.nosc.mil
uucp: {ihnp4,akgua,decvax,dcdwest,ucbvax}!sdcsvax!nosc!bmarsh
"If everything seems to be coming your way, you're probably in the wrong lane."
Technical Details
Message-ID:
<1936@cod.NOSC.MIL>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!usc!ucsd!nosc!cod!bmarshReferences:
<10760@medusa.cs.purdue.edu> <1990Jun4.205834.13661@cbnewsc.att.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!usc!ucsd!nosc!cod!bmarsh From: bmarsh@cod.NOSC.MIL (William C. Marsh) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: Using Turbo C with libraries compiled with Microsoft C Message-ID: <1936@cod.NOSC.MIL> Date: 5 Jun 90 19:47:36 GMT References: <10760@medusa.cs.purdue.edu> <1990Jun4.205834.13661@cbnewsc.att.com> Reply-To: bmarsh@cod.nosc.mil.UUCP (William C. Marsh) Organization: Naval Ocean Systems Center, San Diego Lines: 39