TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: John Lisek
from: Mike Bilow
date: 1996-05-07 23:21:04
subject: Watcom C and 16-bit dll

John Lisek wrote in a message to All:

 JL> I want to port some old MSC OS/2 1.3 dll's to 16-bit watcom C. 
 JL> I have stumbled on a limitation in the watcom 10.0 compiler. I 
 JL> am not able to to find any switch which will generate the right 
 JL> prologue/epilogue in exportet functions (load of the right DS). 
 JL> The -zw switch only works for windows programs. Does anyone 
 JL> know it this has been corrected in the newer version of Watcom 
 JL> C. Is there an alternative workaround ??

Microsoft C 6.0 gives you this:

      /Ad   Assumes SS==DS (default for standard memory models).
      /Au   Assumes SS!=DS. DS is reloaded on function entry.
      /Aw   Assumes SS!=DS. DS is not reloaded on function entry.
            Primary use is for DLLs and Microsoft Windows(TM) call-back
            functions.

Watcom C/C++ 10.6 gives you this:

      -zdf            DS floats i.e. not fixed to DGROUP
      -zdp            DS is pegged to DGROUP
      -zu             SS != DGROUP

This translates as:

      /Ad   -zdp
      /Au   -zu -zdp
      /Aw   -zu -zdf
 
-- Mike


--- 
* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107)
SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 323/107 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.