Article View: comp.os.os2.programmer
Article #1153Re: Linking 16-bit Code with 32-bit code
From: Barr3y Jaspan
Date: Fri, 28 Aug 1992 01:46
Date: Fri, 28 Aug 1992 01:46
15 lines
1203 bytes
1203 bytes
You need to declare the 16 bit functions as such explicitly, and declare all pointer arguments at 16 bit pointers. For example, if you were calling a 16 bit version of strcpy from 32 bit code, you would need to declare it like this: _Cdecl _Far16 char * _Seg16 strcpy(char * _Seg16, char * _Seg16); Then, when you call the function from 32 bit code, C Set/2 will generate the appropriate magic. You may also have to declare the function as _System to C Set/2 will use the right calling convention (pure stack); I don't know how MSC passes arguments. This is unlikely to work with functions that accept or return structures. -- Barr3y Jaspan, bjaspan@mit.edu
Technical Details
Message-ID:
<1992Aug28.014647.11813@athena.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!bjaspanReferences:
<1992Aug27.215047.28937@natinst.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!bjaspan From: bjaspan@athena.mit.edu (Barr3y Jaspan) Subject: Re: Linking 16-bit Code with 32-bit code Message-ID: <1992Aug28.014647.11813@athena.mit.edu> Sender: news@athena.mit.edu (News system) Nntp-Posting-Host: deathtongue.mit.edu Organization: Massachusetts Institute of Technology References: <1992Aug27.215047.28937@natinst.com> Date: Fri, 28 Aug 1992 01:46:47 GMT Lines: 15