Article View: comp.os.os2.programmer
Article #134016bit to 32 bit conversion problem
From: Uma Arunkumar
Date: Wed, 02 Sep 1992 17:06
Date: Wed, 02 Sep 1992 17:06
49 lines
2081 bytes
2081 bytes
****************** Mixed 16 bit application Question ************************
(i) Prog16.c is compiled with Microsoft C 6.0 compiler.
(ii) It uses 16 bit C runtime libraries.
(iii) It uses 16 bit OS2 API.
(iv) Prog32.c is 32 bit code and compiled with CSet/2 compiler.
(v) Prog16.c and Prog32.c are linked with 16 bit version of os2.lib called os2286.lib.
(vi) They are linked with 32 bit linker, LINK386.
The command file prog32.cmd looks like this:
icc /c /w3 /Q /Gd- prog32.c
link386 /NOI prog32.obj,prog16.obj,,,os2286;
The command file for compiling 16 bit code looks like this:
prog16.obj : prog16.c
cl /c /Al /NDDATA16 /NTTEXT16 /NTCODE16 /Gs /ZI /0x prog16.c
***************************************************************
I changed the wherever it is necessary,
pointers to _Seg16 and functions to _cdecl.
(1) What should be done about the global variables defined in 16 bit code
but to be used in 32 bit code using extern preprocessor directive?
*********************************************************
When I run the program, it gives the error message given below:
SYS3171 :
A program caused an exception c0000005 at 1a050670.
Due to insufficient stack space, the exception was not dispatched.
The process was terminated.
DOSCALL1.DLL 0005
.....................................information on registers follows.......................
(2) What is the cause of the above error?
I WOULD HIGHLY APPRECIATE SOME HELP.
Thanks in advance.
My Email address is uma@natinst.com.
uma.
Technical Details
Message-ID:
<1992Sep2.170616.24100@natinst.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!cs.utexas.edu!natinst.com!umaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!cs.utexas.edu!natinst.com!uma From: uma@natinst.com (Uma Arunkumar) Newsgroups: comp.os.os2.programmer Subject: 16bit to 32 bit conversion problem Message-ID: <1992Sep2.170616.24100@natinst.com> Date: 2 Sep 92 17:06:16 GMT Article-I.D.: natinst.1992Sep2.170616.24100 Sender: news@natinst.com Organization: National Instruments, Austin, TX Lines: 49 Nntp-Posting-Host: falcon.natinst.com