home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 15
/
CD_ASCQ_15_070894.iso
/
vrac
/
watcom.zip
/
WATCOM.CAP
< prev
next >
Wrap
Text File
|
1994-03-04
|
220KB
|
6,462 lines
From: Bob Trabucco Rec'd
To: Kevin Kitsemetry Msg #2324, Feb-01-94 10:25AM
Subject: Spawning and memory
Thanks for the response...
Unfortionatly the powers that be insist that I need no special memory managers
that don't come with dos. I will try to play with EMM386 so more. We did
order the TNT dos extender and I have been given 2 days to see if it helps,
I hope so... Boy it's difficult explaining some problems to non-computer
people (like marketing departments)
*** This is a reply to #2315.
From: Johann Walter
To: Kevin Kitsemetry Msg #2326, Feb-01-94 02:41PM
Subject: VFW 1.1
Any chance that the B level patch will be out soon? We are nearing shipping
for our product and I need to know if the level B patch will fix the problems
I'm having with VFW1.1.
*** This is a reply to #2251.
From: Patrick Lamb
To: Kevin Kitsemetry Msg #2327, Feb-01-94 06:07PM
Subject: unexpected interrupt
I have run into a strange problem with Watcom C32 9.5a. The problem stops
with the message
Unexpected interrupt 0D (code 46E80000) at 158:45D41F
TSF32: prev_tsf32 4F74
and a bunch of register dumps.
I tried running the program under the debugger (WVIDEO), and it stops at
(apparently) the same place with the message
*****TASK EXCEPTION***** PAGE FAULT.
The line it bombs on is
free( array[i] )
where array has previously been allocated, and array[i] allocated for i<6;
it bombs when i=1 (the second time through a for loop).
I'm running with the DOS4GW extender under DOS 6.2 on a 386/20 with 10 Mb
(got kicked off the 486!).
What gives?
And can't you include more informatio, but I can stand the slow response better
than the bombing.
Pat
From: John Lansdale
To: John Axline Msg #2328, Feb-01-94 11:25PM
Subject: C386/NT beta
*** This is a reply to #844.
From: John Lansdale
To: Technical Support Msg #2329, Feb-01-94 11:34PM
Subject: WIN32s + NT DLLs
I'm having a small problem running a NT program under win32s. I've created
a 32-bit DLL using th NT_DLL linker mode and the DOS-based wcc386 compiler.
When I try to use this library in a simple NT-compiled program under win32s
the loader complains that it cannot find a number of DLL support libraries
such as win32spl.dll, etc. Are these included with an updated version of
win32s SDK or must I set some compiler/linker flags for win32s program
generation?
John Lansdale
The MESSAGE Section
There are 1676 messages in this area. The highest is #2562
The last message you read was 2329.
[2329 / 2562] Msg.area 12 ... WATCOM C/C++32 9.5 Problems and Fixes
Type message number, or press <enter> for NEXT msg.
MESSAGE:
A)rea Change N)ext Message P)revious Message E)nter Message
R)eply to a messag C)hange a message =)read_non-stop -)read_original
+)read_reply L)ist (brief) M)ain Menu J)ump to file area
G)oodbye (log off) U)pload a message F)orward (copy) B)rowse messages
*)ReadCurrent T)ag areas ?)help
Select: =
Message area 12 ... WATCOM C/C++32 9.5 Problems and Fixes
From: Michael Hung Rec'd
To: Kevin Kitsemetry Msg #2330, Feb-02-94 04:20PM
Subject: dos4gw crashes
I am running QEMM 7.03 and QDPMI 1.03, pminfo reports mode switching
using VCPI instead of DPMI. When I used QDPMI EXTCHKOFF option,
rminfo reports mode switching using DPMI but pminfo and dos4gw crash
the machine. I thought this should have been fixed in level a patch.
BTW, I am using the level a patched version. The dos4gw version is 1.92
Thanks
Michael
*** See also #2331.
From: John Lagerquist Rec'd
To: Michael Hung Msg #2331, Feb-02-94 07:02PM
Subject: dos4gw crashes
*** This is a reply to #2330.
From: Steve Chiang
To: All Msg #2332, Feb-02-94 07:34PM
Subject: Dos 4GW
I d/l'ed the level A patches, and when it attempted to patch Dos 4gw,
it returned a checksum error.
Now, I think I have a problem due to Dos 4gw... and I want to get an
updated version. How can I get v1.95 of 4gw. I'm not sure if I want
to purchase the pro version without looking into the other extenders
out there.
thanks
Steve
*** See also #2342.
From: Chris Boogmans Rec'd
To: Kevin Kitsemetry Msg #2333, Feb-04-94 11:27AM
Subject: Just a few C 9.5 questions
KK> Internal Report #16679
Kevin,
i have a few questions regarding the WatCom C9.5 library. I hope you can
provide me with the answers. First some background on these questions : In
certain situations, my (and other people's) application has the need to switch
it's stack. That is, all functions which are called on another stack,need to
re-establish the 'flat model' environment before they can safely call any
library function (or any C written function that was not 'specially'
compiled). Since it is not safe to take any assumptions on the value of ESP
when the application was interrupted, and since that value cannot be retrieved,
a simple way to do this is : allocate one (or a few) stack areas at applica-
tion startup, lock that memory, keep it's address (top & bottom) in a global
variable, and use it as a stack frame when needed. So far, so good, but a pro-
blem may rise if any of the called functions was compiled using the stack-heck
option (since the malloced area may be at an address below the main stack).
Therefore :
Q1- are there any LIB functions that call the stack-checking code ? Q2- if the
application would like to use that stack-checking option in ALL
situations (even when it has switched it's stack), would it be safe to
take the following actions :
1- replace [__STACKLOW] with the appropriate value each time a stack
switch
is done (in both directions)
2- provide another implementation of __exit_with_message, so that any
exit would be delayed untill the application is running 'in
foreground'
I would appreciate if you guys could provide me with that information. PS1: On
december 8, i reported a performance problem in _scrolltextwindow();
on december 9, you said you had reproduced it and would have to investi-
gate further (Msg #2007, Incident report #12416); any status update
here ?
PS2: If the b level patches become available, will your BBS message which
announces such be on the FIRST page of info after logon ? (calling overseas
at only 2400 bps; it takes some time to go through all the info each
time).
Many thanks in advance, Chris.
*** See also #2343.
From: Debra Mudar Rec'd
To: Kevin Kitsemetry Msg #2334, Feb-03-94 09:59AM
Subject: Font Usage Questions
#include <graph.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
#define NFONTS 6
char *options[NFONTS] =
{
"Courier", "Helv", "Tms Rmn", "Modern", "Script", "Roman" };
int main(void)
{
/* request auto detection */
int gdriver , gmode, x1, y1, x2, y2, nfont;
char graphdirectory[30], list[30], fondir[30];
struct _fontinfo fi;
int result;
// THIS STRING MUST BE SET FOR THE DIRECTORY WHERE THE FONT (*.FON) // FILES
ARE FOUND
strcpy(graphdirectory, "c:\\windows\\system\\*.fon");
if( _registerfonts( graphdirectory ) <= 0 )
{
_outtext( "Enter full path where .FON files are located: " );
gets( fondir );
strcat( fondir, "\\*.FON" );
if( _registerfonts( fondir ) <= 0 )
{
_outtext( "Error: can't register fonts" );
exit( 1 );
}
}
gdriver = _MAXRESMODE;
/* initialize graphics mode */
gmode = _setvideomode(gdriver);
if (!gmode) /* an error occurred */
{
printf("Graphics error: Unable to initialize graphics adapter.");
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}
x1 = 100; y1 = 50; x2 = 540; y2 = 430;
/* draw a line */
_rectangle(_GBORDER, x1, y1 , x2, y2);
nfont = 0;
strcat( strcat( strcpy( list, "t'" ), options[nfont] ), "'");
strcat( list, "h12w10b" );
if( _setfont( list ) >= 0 )
{
result = _getfontinfo(&fi);
_moveto(150, 200);
_outgtext("WATCOM C GRAPHICS AND FONT TEST");
_moveto(190,220);
_outgtext("PRESS ANY KEY TO EXIT");
}
/* clean up */
getch();
_unregisterfonts();
_setvideomode( _DEFAULTMODE );
return 0;
}
From: Debra Mudar Rec'd
To: Kevin Kitsemetry Msg #2335, Feb-04-94 01:53PM
Subject: Lost Text - Here's the Message
KK> Internal Report #16680
To WATCOM Tech Support:
I am having a small problem using the WATCOM C/C++(32) font-related
commands,particularly _setfont. The problem lies with the use of the best fit
option (b) with the raster fonts. Following I have attached a program which
calls this routine using the Windows system fonts. I can successfully display
the strings using any of the vector fonts with the best fit option. I cannot
successfully display any of the raster fonts with the best fit option, or any
of the other options. I have tried many combinations such as r and f. The
real problem lies with using Courier. No matter what options I try,selecting
the Courier font displays Script instead or sometimes I get no text at all.
(The typeface returned in fi.typeface = Script. This same program will work
properly under MSC 7.0 using the Windows fonts. I would really like to be
able to successfully select any of the fonts using the best fit option,
From: Hal Lonas Rec'd
To: Kevin Kitsemetry Msg #2336, Feb-03-94 10:11AM
Subject: B-level patches
Kevin,
I think you guys are being very responsible to hold the B-level
stuff until QA says its ok, especially in light of the obvious
pressure you're getting.
Having said that, I wonder if you're making the patches available
on a beta basis to folks who could test. We use C/C++ 32 to build
a Windows DLL and require w386dll.ext to work right and have helped
find problems with it in the past (as with the A-level patches.)
Tell me to buzz off if you want, we'd like to get a heads-up on the
patches if we could.
Thanks,
Hal Lonas
*** See also #2344.
From: David Alderman Rec'd
To: Kevin Kitsemetry Msg #2337, Feb-03-94 03:34PM
Subject: File Handles Open Across Spawn
In regards to file handles across a spawn: DOS does not close file handles
across a spawn with most 16-bit compilers. For example if I write a parent
and child app under Microsoft C 6, file descriptors in the parent are
available in the child. And let's not forget file descriptors 0, 1, & 2.
They always stay open and if I redirect stderr (handle 2) it stays redirected
in the spawned program. Closing and reopening the handle is not a very good
option for me, as the printer to which I am attached will despool on network
printers (unless the printer is specifically set up not to despool on close
which causes problems with other apps). I'm sorry about mentioning the "M*"
word; I know that their libraries may be exhibiting aberrant behavior (BG)
but I would like to reproduce that "aberration"! Thanks for your reply.
BTW, Can you tell me a good place to order VX-REXX?
Dave.
*** This is a reply to #2313. *** See also #2345.
From: Kevin Kitsemetry
To: Johann Walter Msg #2338, Feb-04-94 10:52AM
Subject: VFW 1.1
JW> Any chance that the B level patch will be out soon?
JW> We are nearing shipping for our product and I need to
JW> know if the level B patch will fix the problems I'm
JW> having with VFW1.1.
If I knew I would tell you. If I try to take a guess, there is a 99% change
that I would be wrong. Soon is all I can say,and that is a relative word!
Sorry!
Kevin
*** This is a reply to #2326.
From: Kevin Kitsemetry Rec'd
To: Patrick Lamb Msg #2339, Feb-04-94 10:55AM
Subject: unexpected interrupt
PL> I have run into a strange problem with Watcom C32
PL> 9.5a. The problem stops
PL> with the message
PL> Unexpected interrupt 0D (code 46E80000) at 158:45D41F
PL> TSF32: prev_tsf32 4F74
PL> and a bunch of register dumps.
PL>
PL> I tried running the program under the debugger (WVIDEO), and it stops at
PL> (apparently) the same place with the message
PL> *****TASK EXCEPTION***** PAGE FAULT.
PL> The line it bombs on is
PL> free( array[i] )
PL> where array has previously been allocated, and
PL> array[i] allocated for i<6;
PL> it bombs when i=1 (the second time through a for loop).
PL>
PL> I'm running with the DOS4GW extender under DOS 6.2 on a 386/20 with 10 Mb
PL> (got kicked off the 486!).
PL>
One useful feature of DOS/4GW is setting the environment variable dos4g=nullp.
Run the program and let it crash and see if it then tells you that it has
found a null poiner. You may also want to fire up the debugger and look at
the address of the array that is about to be free'd just before you execute
that line. Chances are it is going to be a bogus value.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2327. *** See also #2360.
From: Kevin Kitsemetry Rec'd
To: John Lansdale Msg #2340, Feb-04-94 11:06AM
Subject: WIN32s + NT DLLs
JL> I'm having a small problem running a NT program under
JL> win32s. I've created
JL> a 32-bit DLL using th NT_DLL linker mode and the DOS-
JL> based wcc386 compiler.
JL> When I try to use this library in a simple NT-compiled
JL> program under win32s
JL> the loader complains that it cannot find a number of
JL> DLL support libraries
JL> such as win32spl.dll, etc. Are these included with an updated version of
JL> win32s SDK or must I set some compiler/linker flags for win32s program
JL> generation?
The idea behind Win32s is that a Windows NT program that will run under NT
will run under Win32s, provided that it does not make any NT API calls. As far
as what comes with the Win32s SDK, you will have to check with Microsoft on
that one.
There are no special compiler/linker flags designed for creating Win32s
applications. You should just create an NT style executable.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2329.
From: Kevin Kitsemetry Rec'd
To: Steve Chiang Msg #2342, Feb-04-94 11:15AM
Subject: Dos 4GW
SC> I d/l'ed the level A patches, and when it attempted to patch Dos 4gw,
SC> it returned a checksum error.
This is most likely due to an error in communication over the phone line.
SC> Now, I think I have a problem due to Dos 4gw... and I want to get an
SC> updated version. How can I get v1.95 of 4gw. I'm not sure if I want
SC> to purchase the pro version without looking into the other extenders
SC> out there.
If you provide your registration number to us, we can give you the location of
the latest extender.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2332. *** See also #2367.
From: Kevin Kitsemetry Rec'd
To: Chris Boogmans Msg #2343, Feb-04-94 11:23AM
Subject: Just a few C 9.5 questions
CB> on december 9, you said you had reproduced it and
CB> would have to investi-
CB> gate further (Msg #2007, Incident report
CB> #12416); any status update here ?
CB> PS2: If the b level patches become available, will your BBS message which
CB> announces such be on the FIRST page of info after
CB> logon ? (calling overseas
This was brought to the attention of the developers. They said at that time
that they would look into the possibility of speeding it up, but nothing was
promised. I will look into you questions and respond to them at a later date
when I have had a chance to discuss them with the development team.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2333.
From: Kevin Kitsemetry Rec'd
To: Hal Lonas Msg #2344, Feb-04-94 11:35AM
Subject: B-level patches
HL> Kevin,
HL> I think you guys are being very responsible to hold the B-level
HL> stuff until QA says its ok, especially in light of the obvious
HL> pressure you're getting.
HL>
HL> Having said that, I wonder if you're making the patches available
HL> on a beta basis to folks who could test. We use C/C++ 32 to build
HL> a Windows DLL and require w386dll.ext to work right and have helped
HL> find problems with it in the past (as with the A-level patches.)
HL>
HL> Tell me to buzz off if you want, we'd like to get a heads-up on the
HL> patches if we could.
Thanks for offer, and the vote of confidence! Beta testing the patches might
be a good idea. It's not something that we currently do.
Functionality testing has actually ended. What we are working on now is
making sure that the 'b' level masters will equal the patched 'a' level stuff.
If one file in the bunch is different by one byte, the 'c' level patch will
not work on that file!
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2336.
From: Kevin Kitsemetry
To: David Alderman Msg #2345, Feb-04-94 02:32PM
Subject: File Handles Open Across Spawn
DA> In regards to file handles across a spawn: DOS does
DA> not close file handles across a spawn with most 16-bit
DA> compilers. For example if I write a parent and child
DA> app under Microsoft C 6, file descriptors in the
DA> parent are available in the child. And let's not
DA> forget file descriptors 0, 1, & 2.
DA> They always stay open and if I redirect stderr (handle
DA> 2) it stays redirected
The operating system, upon spawning a program, does know about the file
handles. The problem is that the runtime library of the child application
does NOT know about it (was it opened for binary or text output, etc.). What
you might try is using the _dos_xxx functions, since that uses the INT 21h
functions
directly.
DA> BTW, Can you tell me a good place to order VX-REXX?
You can contact our sales department at 1-800-265-4555. They would be able to
provide you with the most up to date information.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2337.
From: Joseph Molnar
To: Tech Support (Kev) Msg #2346, Feb-07-94 04:00PM
Subject: Problem
Internal report #16902
Having a slight problem with token pasteing(?). I am doing some unicode stuff
under NT, and as you might know MS creates a MACRO that they put in front of
all strings so they can choose whether or not to make is ASCII or UNICODE
across compiles. It isn't working well, the string is returning a char*
instead of long char*. This is an edited example:
#define UNICODE
#include <windows.h>
// btw, NT defines TEXT to be
#define TXT( quote ) L##quote
LPCTSTR szProject = TXT("CASEY");
LPCTSTR szSpecNum = TXT("1.2");
LPCTSTR szBuildNum = TXT("1056");
Any ideas?
Also I was curious about the funny, is it possible for MS C8 code to be
debugged by WVIDEO, and for WinBug (NT's debugger) to debug W9.5 NT code? I
guess I am asking how is the cross tool support. I recall something about the
use of COFF on your end, but I was too sure.
*** See also #2407.
From: Dan Cummins Rec'd
To: Chris Boogmans Msg #2347, Feb-04-94 05:10PM
Subject: Just a few C 9.5 questions
KK> Internal Report #16679
CB> Kevin,
CB> i have a few questions regarding the WatCom C9.5 library. I hope you can
CB> provide me with the answers. First some background on
CB> these questions : In certain situations, my (and other
CB> people's) application has the need to switch it's
CB> stack. That is, all functions which are called on
CB> another stack,need to re-establish the 'flat model'
CB> environment before they can safely call any library
CB> function (or any C written function that was not
CB> 'specially' compiled). Since it is not safe to take
CB> any assumptions on the value of ESP when the
CB> application was interrupted, and since that value
CB> cannot be retrieved,
CB> a simple way to do this is : allocate one (or a few) stack areas at
CB> applica-tion startup, lock that memory, keep it's
CB> address (top & bottom) in a global variable, and use
CB> it as a stack frame when needed. So far, so good, but
CB> a pro-blem may rise if any of the called functions was
CB> compiled using the stack-heck option (since the
CB> malloced area may be at an address below the main
CB> stack). Therefore :
Kevin is going to be away for a while so I have been asked to respond to some
of your questions.
CB> Q1- are there any LIB functions that call the stack-
CB> checking code ?
Yes, according to our development team.
CB> Q2- if the application would like to
CB> use that stack-checking option in ALL
CB> situations (even when it has switched it's stack),
CB> would it be safe to
CB> take the following actions :
CB> 1- replace [__STACKLOW] with the appropriate
CB> value each time a stack switch
CB> is done (in both directions)
Here is an example that demonstrates how to do this.
*****
This example is now in file area 10 (WC)
*****
extern void
CallFuncWithNewStack( void (*func)(void), void *new_stack_ptr);#pragma aux
CallFuncWithNewStack = \
"sub edx,16" /* allocate space from new stack */\
"mov [edx],esp" /* save current SS:ESP on new stack */\
"mov 4[edx],ss" \
"mov 8[edx],edx" /* set up new values for SS:ESP */\
"mov 12[edx],ds" \
"lss esp,8[edx]" /* switch to new stack */\
"call eax" /* call user's function */\
"lss esp,[esp]" /* switch back to original stack */\
parm [eax] [edx];
#define STACK_SIZE 4096
char TempStack[STACK_SIZE];
void myfunc(void)
{
printf( "Hello\n" );
}
main()
{
CallFuncWithNewStack( myfunc, &TempStack[STACK_SIZE] );}
CB> 2- provide another implementation of
CB> __exit_with_message, so that any
CB> exit would be delayed untill the
CB> application is running 'in foreground'
CB> I would appreciate if you guys could provide me with that information.
CB> PS1: On december 8, i reported a performance problem
CB> in _scrolltextwindow();
CB> on december 9, you said you had reproduced it and
CB> would have to investi-
CB> gate further (Msg #2007, Incident report
CB> #12416); any status update here ?
Apparently, this is in the hands of our graphics developers. I don't know
whether it was fixed for B-level.
CB> PS2: If the b level patches become available, will your BBS message which
CB> announces such be on the FIRST page of info after
CB> logon ? (calling overseas
CB> at only 2400 bps; it takes some time to go
CB> through all the info each time).
I will pass your suggestion along to Kevin.
CB> Many thanks in advance, Chris.
Dan Cummins
WATCOM Languages Support
*** This is a reply to #2333.
From: Matt Howard
To: All Msg #2348, Feb-05-94 01:22AM
Subject: Watcom C/C++ - getting started
To anyone out there willing to help,
I just purchased Watcom C/C++ 32 and I feel like I'm in way over my
head. I'm a very experienced Borland Dos coder but maybe I've been spoiled by
their IDE's. Anyway, I might as well cut to the chase on the many problems I'm
having:
1. Converting Real-mode Assembly- I've got many vital .asm routines
that I want to convert to protected mode under WC/C++. I don't really
understand how I should handle the pointers generated by WC. If I just treat
them as DWORD's and dereference them will that give me the correct location?
And can all the assembling be done with TASM or do I need a 32-bit assembler
too? Could you possibly give me just a routine to put a pixel from a memory
location to the video memory? Or possibly a simple mouse Int 33h call?
2 .Also, what does the asm keyword do in WC. The Bjarne Stroustrup
says it is dependent on implimentation, but I had been using it often in BC++
for inline assembly. Do I have to convert all this to external?
3. Is there a better help program than that WHELP which gives you only
reference on C functions and nothing on C++ or the pre-defined Structs of C?
4. I know I should be compiling for the flat mem model, but does that
mean I can convert all my old far pointers to near ones? And what is the use
of the big mem model if there is no runtime library to go with it (at least
that's what the manual seem to say)?
5. Where can I get some more in-depth documentation on DOS/4GW and the
workings of protected mode? And is DOS/4GW Professional worth it?
6. Is it true that functions can't be declared without a type
specifier and default to "int"?
7. Just a side question- Many professional games lately have been
displaying the DOS/4GW banner. Since DOS/4GW (and Pro version) are specific to
Watcom, does that mean that these games were compiled with the Watcom compiler?
Thanks alot to anyone who replies.
Sincerely,
Matt Howard
*** See also #2353.
From: Kellee Crisafulli
To: Watcom Tech Support Msg #2349, Feb-06-94 02:42AM
Subject: Thanks for the B patches!
I waited until you had the A rev patches out to purchase 9.5 so it would be
solid. I received it this week and recompiled my code only to find out that I
had 2 internal compiler errors #28. I was just about to scream when I thought
I would check your BBS. The rev B patches fixed this error and my other big
complaint (VESA support).
Great job, your work is really appreciated!
Kellee Crisafulli, HyperLynx
From: Brian Burton
To: All Msg #2350, Feb-07-94 04:20PM
Subject: filename in NT
Internal report #16903
The NT hosted tools do not handle long file names properly. wcl386 truncates
longfilename.obj to longfilenam and then
searches for longfilenam.cxx/cpp/cc/c. This is a major annoyance since I
prefer to name source files after the class that they implement and I don't
want short class names. It seems like a trivial fix. Does Watcom have any
plans to address this problem?
++Brian
*** See also #2399.
From: Brian Burton
To: All Msg #2351, Feb-06-94 05:50PM
Subject: ntheaders.zip
The header file excpt.h was not included and rpc.h requires it.
++Brian
*** See also #2398.
From: Peter Schauer Rec'd
To: Kevin Kitsemetry Msg #2352, Feb-14-94 12:10PM
Subject: acc. 16bit dll's too
Internal Report #17054
I have some trouble with accesing 16-bit code in a MSC-generated Dll too. (
MSG 1587 from Mr. Edward Palandri)
I red the problem but no solution (if exist). Can you send it to me or please
ship to me a additional microcode to link with my application ( there seems to
be similar problems with FORTRAN ??!!?? MSG Nr. ????). With the best regards
from 'good old' germany
Peter
*** See also #2486.
From: David Kennedy Rec'd
To: Matt Howard Msg #2353, Feb-07-94 01:17PM
Subject: Watcom C/C++ - getting started
MH> 1. Converting Real-mode Assembly- I've got many vital .asm
MH> routines that I want to convert to protected mode
MH> under WC/C++. I don't really understand how I should
MH> handle the pointers generated by WC. If I just treat
MH> them as DWORD's and dereference them will that give me
MH> the correct location?
MH> And can all the assembling be done with TASM or do I
MH> need a 32-bit assembler too? Could you possibly give
MH> me just a routine to put a pixel from a memory
MH> location to the video memory? Or possibly a simple
MH> mouse Int 33h call?
On page 41 and 42 of the Commonly Asked Questions and Answers, you will find a
short example of an interrupt handler. If you examine the protected mode
section, you should be able to find appropriate examples if interrupt calls
and memory handling.
MH> 2 .Also, what does the asm keyword do in WC.
MH> The Bjarne Stroustrup says it is dependent on
MH> implimentation, but I had been using it often in BC++
MH> for inline assembly. Do I have to convert all this to
MH> external?
The .asm keyword is unrecognized by the WATCOM C compiler. You should refer
to the section starting on page 166 of the User's Guide for examples of
creating auxiliary pragmas to generate inline assembler code.
MH> 3. Is there a better help program than that
MH> WHELP which gives you only reference on C functions
MH> and nothing on C++ or the pre-defined Structs of C?
We do provide the Winhelp utility and the .hlp files for the windows SDK in
the BINW directory.
MH> 4. I know I should be compiling for the flat
MH> mem model, but does that mean I can convert all my old
MH> far pointers to near ones? And what is the use of the
MH> big mem model if there is no runtime library to go
MH> with it (at least that's what the manual seem to say)?
Under the flat memory model, which should always be used with the 32-bit
compiler, it is not necessary to declare functions as far or near.
MH> 5. Where can I get some more in-depth documentation on DOS/4GW
MH> and the workings of protected mode? And is DOS/4GW
MH> Professional worth it?
You can find more information on protected mode programming in a book called
"Extending DOS" by Duncan. DOS/4GW professional provides faster,more powerful
virtual memory support that is useful in some applications.
MH> 6. Is it true that functions can't be declared
MH> without a type specifier and default to "int"?
I believe this is the standard C specification. If a function has not been
prototyped before it is referenced, it is assumed to be of type "int"
MH> 7. Just a side question- Many professional
MH> games lately have been displaying the DOS/4GW banner.
MH> Since DOS/4GW (and Pro version) are specific to
MH> Watcom, does that mean that these games were compiled
MH> with the Watcom compiler?
We cannot speculate on who does or does not use our compiler.
MH> Thanks alot to anyone who replies.
MH> Sincerely,
MH> Matt Howard
*** This is a reply to #2348. *** See also #2365.
From: Joseph Molnar
To: Tech Support (Kevin) Msg #2354, Feb-08-94 12:22AM
Subject: The DEBUGGER
Okay, I am not really in a good mood, but I am heading to bed and need to get
this off my chest. The debugger is bad, really bad I mean. You see,
compilers were supposed to head to incremental compiling, but then someone
(Bjarne) made C++, where inlining was a possibility, but required it be put it
the header, then he added templates, requiring even more to be put in the
header, in fact, doind what I am right now, everything of mine is pretty much
in the header. While this is really annoying and all, I can't debug a single
bit of it. I have approximately 5000 lines I would like to debug and I can't
(not all 5000 is buggy, just I have a total of 5000 lines in all my headers).
Please tell me I am missing something and that in fact I can debug my headers,
otherwise the debugger is useless and I have to start doing the PRINTF method,
and if it is true, tell me I can get a beta or something of that new debugger.
Otherwise I can't really use Watcom C++ for this project, and I would like to
but.... Perhaps as a final resort, are you guys COFF compliant, and if so, do
you know of any COFF debuggers. I know MSC8.0 debugs headers fine, but I
don't know if it is COFF debugger.
Please help ... too many printf's ...
Joseph Molnar
*** See also #2356.
From: Chris Boogmans Rec'd
To: Dan Cummins Msg #2355, Feb-08-94 10:24AM
Subject: Same question again
Internal report #16945
Hi Dan,
thanks for your reply to my question ... only, my question was not HOW i have
to call a function with another stack, but rather whether or not the update of
[__STACKLOW] would generate a correct check on the new stack. In your example,
if the function printf() and/or the source file containing the example
code would have been compiled without the /s option, than the example code will
fail (an invalid 'stack overflow' will be generated if the new stack is below
the default stack, and the stack may very well overflow without any message in
the other case). I would like to have a mechanism that is waterproof, even if
a lib function calls another lib function, both compiled with the stack check
option on. So, as stated in my original message, i would be very glad if you
could provide me with **THAT** information.
Thanks in advance, Chris.
*** See also #2361.
From: Kevin Blenkinsopp Rec'd
To: Anthony Scian Msg #2357, Feb-08-94 10:16AM
Subject: Destructors in B-level
Anthony,
I downloaded the b-level last night, and rebuilt the system with it this
morning, and noticed something very different, namely my destructors are not
getting called. This is bad. The snippet below reproduces the problem:
'anothera' gets destroyed properly, but 'a' doesn't. This wasn't the case with
the pre-release b-level I had (29 Nov) if that helps you track this down. I
just shelled out for a second to check a hunch - the destructor for 'a' DOES
get called if you take out the exit() at the end of main(), which means I can
live with this, as that is the only exit() in the whole program. Still, I
guess you should probably be aware of this.
Anyway, thanks for your time, and if you reply to this with something like
"the january 94 draft of ansi c++ says that you don't have to call destructors
when a non-zero argument is passed to exit()", I will come up to Canada and
marmalise you!
Cheers,
Kevin.
(code follows...)
#include <iostream.h>
#include <stdlib.h>
struct A {
A(void) { cout << "ctor\n"; }
~A() { cout << "dtor\n"; }
};
void foo(void)
{
throw("Bye");
}
void main()
{
A a;
try {
A anothera;
foo();
} catch (char *z) {
cout << "Somebody threw '" << z << '\'' << endl;
}
exit(1);
}
*** See also #2359.
From: Kevin Blenkinsopp Rec'd
To: Kevin Kitsemetry Msg #2358, Feb-08-94 10:23AM
Subject: Jumping on the bandwagon
Kevin,
I hate to be another of the many voices hassling you about this, but what are
the odds we'll see video dead and buried by the end of second quarter 94. I've
really tried to be friends with it, but it just doesn't want to play ball.
Kevin
*** See also #2377.
From: Anthony Scian Rec'd
To: Kevin Blenkinsopp Msg #2359, Feb-08-94 11:18AM
Subject: Destructors in B-level
KB> Anthony,
KB> I downloaded the b-level last night, and rebuilt the system with it this
KB> morning, and noticed something very different, namely
KB> my destructors are not getting called. This is bad.
KB> The snippet below reproduces the problem: 'anothera'
KB> gets destroyed properly, but 'a' doesn't. This wasn't
KB> the case with the pre-release b-level I had (29 Nov)
KB> if that helps you track this down. I just shelled out
KB> for a second to check a hunch - the destructor for 'a'
KB> DOES get called if you take out the exit() at the end
KB> of main(), which means I can live with this, as that
KB> is the only exit() in the whole program. Still, I
KB> guess you should probably be aware of this.
KB> Anyway, thanks for your time, and if you reply to this
KB> with something like "the january 94 draft of ansi c++
KB> says that you don't have to call destructors when a
KB> non-zero argument is passed to exit()", I will come up
KB> to Canada and marmalise you!
Marmalizing doesn't sound pleasant but the ISO/ANSI C++
draft (Sept'93) does support the B-level C++ compiler's
behaviour.
I checked the GA version, A-level, and B-level C++ compilers
and all of them did not destruct the object 'a'. This is
correct behaviour. It has nothing to do with what you pass
to exit(); it simply has to do with the fact that exit()
is an ANSI C function and is not connected at all with the
C++ exception handling mechanism (an exit() four levels
down will not destruct temporaries either). The current
ISO/ANSI C++ draft states this in 17.4.10.4.3:
"... all static objects are destroyed in the reverse
order of their construction. (Non-static local objects
are not destroyed as a result of calling exit.)"
The pre-release B-level compiler must have temporarily had a bug in it where
it destructed too many objects.
*** This is a reply to #2357. *** See also #2366.
From: Patrick Lamb Rec'd
To: Kevin Kitsemetry Msg #2360, Feb-08-94 12:27PM
Subject: unexpected interrupt
Here's one more voice doening video. I have to compile everything at the same
time to get wvideo to run, see the source file, and not crash. Obiously not
good when you have a make file to handle multiple files!
Apparently part of my original message disappeared into the ether. The
problem with re-compiling everything is that, after wmake issues a command
line, it takes between a minute and two minutes and a half before the compiler
actually starts to run! This combination led me to re-install, to see if it
was the A patches, re-make, update with the patches, re-make, etc. Hard to
get any productive work done with that combination. Plus, with 2 minutes
disappearing into compiling each file, it takes another twenty minutes to see
if any change has worked.
After ranting a while, let me clarify what I was trying to say. The files are
not terribly large; and average is some 500 lines, with perhaps 750 included.
When the compiler is invoked (from wmake or from the command line), the
computer sits there for 2:30 or so before the compiler comes back with its
cheery "Watcom C32 9.5a" response. After that, the compilation time is normal
(maybe 20-30 seconds).
This machine is a 386-20 with 12 Mb of memory; I tried it this morning with a
client's compiler on his 486-66 with 20 Meg, and it only took about thirty
seconds to respond.
I'd like to help you track this problem down; what other information do you
need?
Pat
*** This is a reply to #2339. *** See also #2378.
From: David Kennedy Rec'd
To: Chris Boogmans Msg #2361, Feb-08-94 01:19PM
Subject: Same question again
DK> Internal report #16945
CB> whether or not the update of
CB> [__STACKLOW] would generate a correct check on the new
CB> stack.
Stack checking will work correctly if you modify the variable that points to
the bottom of the stack. The appropriate variable varies with operating
system, and can be determined using WVIDEO to trace into an alloca() function
which calls stackavail() which references the stack bottom variable.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2355.
From: Ian Currie
To: David Kennedey Msg #2363, Feb-14-94 12:07PM
Subject: Weird bug
Internal report #17496
I have been experiencing what I'm convinced is a bug in either Watcom or
Rational for a while now. I just applied the latest patch (level B) and there
has been no change.
I am creating a rather large application and cannot upload it all to
you,however let me explain the situation.
The problem seems to be whenever the code "grows". What appears to be the
offending lines of code NEVER execute - but just by them being there seem to
cause a problem later.
The program crashes when I try to use fclose() to close a file that was open
(I've verified that the file pointer does not get trashed).
The error I get is:
DOS/4GW error (2001):exception 0Eh (page fault) at 150:004A3A71 TSF32:
prev_tsf32 512C
SS 158 DS 158 ES 158 FS 0 GS 20 EAX 46016B74 EBX
0 ECX C7 EDX 4B344A
ESI 4AC079 EDI 6A6DED EBP 6A6CDC ESP 6A6CC8
CS:IP 150:004A3A71 ID 0E COD 0 FLG 10206
CS= 150, USE32, page granular, limit FFFFFFFF, base 0, acc CF9B SS=
158, USE32, page granular, limit FFFFFFFF, base 0, acc CF93 DS=
158,USE32, page granular, limit FFFFFFFF, base 0, acc CF93 ES=
158,USE32, page granular, limit FFFFFFFF, base 0, acc CF93 FS=
0,USE16, byte granular, limit 0, base 13, acc 0 GS= 20,
USE16,byte granular, limit FFFF, base 60E40, acc 93 CR0: PG: 1 ET: 1
TS:0 EM:0 MP:0 PE:1 CR2: 46016B78 CR3:64067 Crash address (unrelocated) =
1:00038A71
whenever the line:
fclose(fpSecLib);
gets executed (fpSecLib being type FILE *).
I once alleviated the problem by not linking in some assembler code that I was
using and had thought that the assembler code was the problem.
But the problem arose again.
Well, when I tried skipping other code before the point where the file in
question gets closed, the program did not crash. Thus, I thought once again
that I may have some offending code.
I can cause the problem a number of ways. For example if I changed the switch
statement in the sample code below to switch a local variable "test" instead
of accessing a field of a structure the crash does not occur.
int test;
for (cnt=1; cnt < 4; cnt++)
{
// if plant is healing and it is linked (& owned of course)...
if (Status.proPlant[cnt].status == 2)
{
if (Status.proPlant[cnt].repairDays)
{
Status.proPlant[cnt].repairDays--;
if (Status.proPlant[cnt].repairDays == 0) // fixed!
{
// make it healed, calc new capacity and forget about others!
Status.proPlant[cnt].status = PLANTWORKING;
// pop up jack quote before buggering off...
// test = Status.tot_plant_capacity
// switch(test)
switch ( Status.tot_plant_capacity )
{
case 4: quotenum = 37; break;
default : NumMessage("ERROR: new capacity is
",Status.tot_plant_capacity); break;
}
JackQuote(quotenum,QUESTQUOTE);
break;
}
}
}
}
Alternatively, I can remove other lines of code that appear just after the
above loop and fix the problem that way! For example, removing:
test += Quest_DayTest(cnt);
or:
test += Quest_DoneTest(cnt);
will stop the crash from happening, but not the third line in the loop which
is:
test += Quest_NotDoneTest(cnt);
So, I am at a loss as to where the problem could be. Here is the above
mentioned code:
// test for basic quests
for ( cnt=0; cnt < MAXQUESTS; cnt++ )
{
test = 0;
// if day is greater than quest start-up day, test will inc!
test += Quest_DayTest(cnt);
// if the "dependant" quest did in fact occur, test will stay zero
// otherwise a 1 will be returned indicating failure
test += Quest_DoneTest(cnt);
// if the two "dependant" quests did occur, test will inc
test += Quest_NotDoneTest(cnt);
// ensure the five sectors are unowned...
if (Quest_EnemyOwnsOneOfFive(cnt) == FALSE)
test +=1;
// if any of five sectors are linked, fail test
test += Quest_AnyOneOfFiveLinked(cnt);
if (quotenum != 999 && QuestInit[cnt].noOtherQuote)
test++;
if (Status.sectors_owned < QuestInit[cnt].tot_sectors_owned)
test++;
// ONE LAST TEST: MAKE SURE THE VERY SAME QUEST IS NOT ALREADY IN PROGRESS
if (Status.questProgress[cnt] == INPROGRESS)
test++;
if (!test && cnt == WATERQUEST2)
{
test = random(100);
if (test < 20)
test = 0;
else
test = 1;
}
}
I am running this on a 486/66 using DOS 5.0 and QEMM v6.0 with 16 megs of RAM.
Since I am developing under tight deadlines, I would appreciate any feedback
you can offer.
Ian Currie
*** See also #2521.
From: Dan Teven Rec'd
To: David Kennedy Msg #2365, Feb-08-94 06:07PM
Subject: Watcom C/C++ - getting started
Yes, the games were compiled with WATCOM.
Dan Teven
Rational Systems (at liberty to state obvious)
*** This is a reply to #2353.
From: Kevin Blenkinsopp Rec'd
To: Anthony Scian Msg #2366, Feb-08-94 06:06PM
Subject: Destructors in B-level
Grrr. I hate it when what you say makes sense. Prepare to be marmalised anyway!
Thanks.
Kevin
*** This is a reply to #2359.
From: Ramon Rivas
To: Tech Support Msg #2369, Feb-15-94 10:40AM
Subject: Wvideo prob with 9.5b
Internal report #17588
/*****************************************************************************
* *
* The following shows a problem with Wvideo (Watcom C/C++ 9.5b) under * *
Ergo's OS386 V 2.1.06A. Wvideo locks (cold boot needed) when loading
* * the program. The command line to compile was:
* *
*
* wcl386 -w3 -d2 -zp1 -j -mf -zp1 /od
* *
*
* The environment variable settings are:
* *
*
* WCC386=/3r /j /mf /fp3 /w3 /zp1 /od /dOS386
* * INC386=c:\wc3\h;c:\wc3\h\sys;c:\c4\h;c:\os386\aiacode
* * LIBPHAR=c:\wc3\lib386;c:\wc3\lib386\dos
* * LIB=c:\wc3\lib386;c:\wc3\lib386\dos
* * WCG386=c:\wc3\bin\386wcgl.exe
* * WCGMEMORY=?
* * WATCOM=c:\wc3
* * WVIDEO=/trap#ecs/dynamic#40000/nofpu/swap
* * WCL386=/lergo
* *
*
* I've ran into many problems with 9.5 that have been corrected with patches *
* A and B, this is the only one that remains. Please let me know what is
* * going ASAP.
* *
*
* Thank you.
* *
*
* Ramon. [(305)-592-2727 Ext 550]
* *
*
* Note: I've included the OS386 kernel, loader and trap file for your * *
reference.
* *
*
*****************************************************************************/
#include "stdlib.h"
#include "stdio.h"
#include "conio.h"
#include "graph.h"
void
outtextrc( int row, int col, char *str )
{
_settextposition( row, col );
_outtext( str );
}
void
dos( void )
{
_setvideomode( _DEFAULTMODE );
puts( "PRESS ANY KEY TO EXECUTE COMMAND PROCESSOR!" ); getch();
system( "COMMAND" );
puts( "PRESS ANY KEY TO CONTINUE!" ); getch();
_setvideomode( _VRES16COLOR );
}
void
main( int ac, char *av[] )
{
if ( _setvideomode( _VRES16COLOR ) )
{
_setcolor( 1 );
_rectangle( _GFILLINTERIOR, 100, 100, 540, 380 );
outtextrc( 1, 1, "Press a key to make white rectangle ..." );
getch();
if ( ac > 1 )
dos();
_setcolor( 15 );
_setfillmask( NULL );
_rectangle( _GFILLINTERIOR, 100, 100, 540, 380 );
outtextrc( 2, 1, "Should be white ..." );
outtextrc( 3, 1, "Press any key to exit." );
getch();
_setvideomode( _DEFAULTMODE );
}
else
puts( "Sorry, you need 640x480x16 to run this program." );
}
From: Ramon Rivas
To: Tech Support Msg #2370, Feb-09-94 08:28AM
Subject: msg 2369
There is a zip file in the files area that contains some extra files. The name
of the ZIP is WV95BPRO.ZIP
Thanks.
From: Jim Gerow Rec'd
To: Kevin Kitsemetry Msg #2372, Feb-09-94 09:53AM
Subject: WLINK has problems with 16-bit modules when in 32-bit mode
Kevin,
We also have the problem when linking for DOS-32. Could you also check
if development knows a work-around. We're all set setting up a proper 16-bit
environment, (stack & data areas), but need to have the relocation fixups to
be properly formed as 16:16 addresses, not as a 0:32 linear address.
Thanks
*** This is a reply to #2304. *** See also #2408.
From: Ross Linder
To: Technical Support Msg #2373, Feb-09-94 11:01AM
Subject: Wcc386 & DesqviewX
I am havving trouble getting my dvx applications to work.
After lots of comms with Qdeck, We noticed that thier compiler (9.5)
is dated 2-11-93 9:50 am and is 625 566 bytes long. (wcc386.exe)
My compiler ser # C329501883 is 627702 bytes long, and dated 05-05-93
Justin Wilmeyer suggested that I get patch level "C" to fix my problem.
Now for the tricky part, I have tried to download c32_a.zip, but just can't
get it down. What is the possibility of getting the patches mailed to me in
South Africa.
Please respond to my work FAX at (27) (12) 665-1495, or call me at (27) (12)
665-1480 or at (27) (11) 793-4818
I would appriciate any help you can give me. Oh yea, the problem I am having
is with the OSF Motif UID library when it calls "stat", I get a exp 13
Thanks muchly
Ross Linder.
*** See also #2409.
From: Ramon Rivas
To: tech support Msg #2374, Feb-09-94 01:28PM
Subject: Multi site license
Can somebody give me some info on multisite licensce for WC 9.5. We might be
adding a few more developers and, techincally, they each need a copy of WC
9.5. But, maybe, you offer something by which one just pays an amount an
receives the necessary documentation without wasting extra sets of disks. Is
there anything like this? Thanks.
*** See also #2379.
From: Joseph Molnar
To: Tech Support Msg #2375, Feb-15-94 10:36AM
Subject: Token Pasting problem
I posted a message just before I got the 9.5b patch about a problem I was
having with token pasting. Well the problem is, it is still not fixed. I am
not sure which message number it was, but it was I think on this past Sunday.
I would appreciate any help on this one since we aer trying to put a beta out
in a week. The code is being ported from MSC8.0, and since I am using a lot
of templates (to handle unicode for the most part), port the Watcom C++ files
to MSC8.0 will just not be possible with a lot of work on behalf by expanding
out the templates in all the usage (same classes taking three parametric
types), we are on a tight schedule as it is <GRIN>. So please have a look at
the message and let me know.
Thanks.
***See also #2407
From: Michael Mishoe Rec'd
To: Kevin Kitsemetry Msg #2376, Feb-10-94 09:21AM
Subject: EDITOR - INTEGRATED ENVIRONMENT
I HAVE BEEN USING MSC 7.0 WITH PWB (PROGRAMMER'S WORKBENCH). I WOULD
LIKE TO KNOW IF I CAN CUSTOMIZE IT TO USE WATCOM C/C++ 32 9.5.
IF YOU HAVE NO INFO ON THIS, I WOULD LIKE YOUR RECCOMENDATION ON
AN EXTENSIBLE EDITOR. CAN YOU HELP? I LIKE VERY MUCH WATCOM PACKAGE.
*** See also #2380.
From: David Kennedy Rec'd
To: Patrick Lamb Msg #2378, Feb-10-94 01:37PM
Subject: unexpected interrupt
PL> files are not terribly large; and average is some 500
PL> lines, with perhaps 750 included. When the compiler
PL> is invoked (from wmake or from the command line), the
PL> computer sits there for 2:30 or so before the compiler
PL> comes back with its cheery "Watcom C32 9.5a" response.
PL> After that, the compilation time is normal (maybe 20-
PL> 30 seconds).
PL> This machine is a 386-20 with 12 Mb of memory; I tried
PL> it this morning with a client's compiler on his 486-66
PL> with 20 Meg, and it only took about thirty seconds to
PL> respond.
This problem has been reported before, although usually on a Pentium. It is
being investigated.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2360. *** See also #2404.
From: David Kennedy Rec'd
To: Ramon Rivas Msg #2379, Feb-10-94 02:00PM
Subject: Multi site license
RR> Can somebody give me some info on multisite licensce
RR> for WC 9.5. We might be adding a few more developers
RR> and, techincally, they each need a copy of WC 9.5.
RR> But, maybe, you offer something by which one just pays
RR> an amount an receives the necessary documentation
RR> without wasting extra sets of disks. Is there anything
RR> like this? Thanks.
We do not provide such an arrangement.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2374.
From: David Kennedy Rec'd
To: Michael Mishoe Msg #2380, Feb-10-94 02:04PM
Subject: EDITOR - INTEGRATED ENVIRONMENT
MM> I HAVE BEEN USING MSC 7.0 WITH PWB (PROGRAMMER'S WORKBENCH). I WOULD
MM> LIKE TO KNOW IF I CAN CUSTOMIZE IT TO USE WATCOM C/C++ 32 9.5.
MM> IF YOU HAVE NO INFO ON THIS, I WOULD LIKE YOUR RECCOMENDATION ON
MM> AN EXTENSIBLE EDITOR. CAN YOU HELP? I LIKE VERY MUCH WATCOM PACKAGE.
If the Programmer's Workbench is generic, then you should be able to integrate
the WATCOM compiler by modifying the appropriate command strings and options.
However, if it is designed specifically for MSC 7.0, you will have more
difficulty in this respect. There are many good commercial and public domain
editors on the market, none of which I can specifically recommend off hand.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2376.
From: Jim Ehrismann Rec'd
To: Kevin Kitsemetry Msg #2382, Feb-11-94 10:57AM
Subject: More Graphics support
Hi Kevin,
Does WATCOM have any plans to add support for higher resolution modes
and/or 24bit colour modes in your C32 for DOS graphics library?
Jim Ehrismann
*** See also #2400.
From: Justin Luton
To: Pat Brown Msg #2384, Feb-11-94 02:17PM
Subject: watcom c/c++ for windows nt
*** This is a reply to #822.
From: Kevin Blenkinsopp Rec'd
To: Anthony Scian Msg #2385, Feb-11-94 02:28PM
Subject: Weird stuff again
Anthony,
I upgraded to the full b-level a while ago, and have found another issue that
wasn't there with the a-level or the pre-release b-level that I had. This code:
main() {
.
.
.
try {
DoSomething();
} catch (char *z) {
Window win(...);
win << z;
getch();
}
}
causes a page fault when it tries to destroy the window (it never actually
gets to the destructor - looks like a stack unwinding problem?)
If I replace the catch block with:
Window *pwin = new Window(...)
*pwin << z;
then all is fine. A Window is pretty big, by the way, but not huge, and I have
a 32K stack. I realise I'm not giving you a lot to work with here - I'll try
and reproduce it in an uploadable file, but I can't promise anything.
By the way, if I put the creation of the window OUTSIDE the try/catch block,
that's okay too.
Hope the weather's better there than it is here.
Kevin
*** See also #2389.
From: Ramon Rivas
To: Tect Support Msg #2386, Feb-11-94 03:07PM
Subject: msg 2369
Any idea on the problem reported with message 2369?
Thanks.
From: Jon Maiara
To: All Msg #2387, Feb-11-94 03:49PM
Subject: wvideo w/keyboard handler
i have a program which takes over the keyboard interrupt (int 9). for a while,
wvideo would completely lose the keyboard after the handler was installed, but
that was fixed. but after i installed the b level patches, the debugger
sometimes works, but it sometimes loses input, wedges or reboots.
*** See also #2402.
From: Anthony Scian Rec'd
To: Kevin Blenkinsopp Msg #2389, Feb-11-94 08:20PM
Subject: Weird stuff again
KB> Anthony,
KB> I upgraded to the full b-level a while ago, and have
KB> found another issue that wasn't there with the a-level
KB> or the pre-release b-level that I had. This code:
KB> main() {
KB> .
KB> .
KB> .
KB> try {
KB> DoSomething();
KB> } catch (char *z) {
KB> Window win(...);
KB> win << z;
KB> getch();
KB> }
KB> }
KB> causes a page fault when it tries to destroy the
KB> window (it never actually gets to the destructor -
KB> looks like a stack unwinding problem?)
In section 2.3.1.1.4.5.6.7.8 of the ISO/ANSI C++ standard
it says that this is undefined behaviour so this is (just kidding... :^) I'll
try to duplicate the problem on this end of things, thanks.
*** This is a reply to #2385.
From: Matt Howard
To: All Msg #2390, Feb-11-94 10:04PM
Subject: Mem Alloc Error and Asm Questions
First of all, I would like to say that I am at least initially impressed with
the Watcom Compiler. However, I would still have a few questions.
1. When converting a screen saver program to Watcom, every thing works
until at the end, I get the error:
"Memory Allocation Error"
"Cannot load COMMAND, system halted"
I should note that my tests indicate the actual program finishes before this
error occurs. I'm not sure whats wrong since:
a. this didn't occur with a certain "other" 16-bit compiler and
b. I've check through the program to make sure no memory is left dangling
2. Just an asm question. What should I do when asm instructions
require a segment:offset pair in an instruction. For example, how would I do
"rep movsw" with watcom pointers. I tried just loading the offset when calling
a BIOS interrupt(that required a seg:off pointer), and oddly, it worked for
one program but in another, it caused the computer to reboot itself. Any ideas?
*** See also #2415.
From: Amine Moulay Ramdane Rec'd
To: Kevin Kitsemetry Msg #2391, Feb-12-94 03:56AM
Subject: Ntheader.zip - excpt.h
Hi Mr.Kevin is there any chance to get the header file except.h
that doesn't exist in the ntheader.zip .
Thanks .
*** See also #2416.
From: Jon Fleming Rec'd
To: Kevin Kitsemetry Msg #2392, Feb-12-94 07:10AM
Subject: Optimization selection
I'm an inexperienced C programmer with lots of experience in other
languages. I've written an AutoCAD ADS program using Watcom 9.5.
In this program, the sqrt function is called three times. Each instance
is in the same form:
var = sqrt(a*a + b*b + c*c);
which certainly should not be negative.
If I compile it with the following command line:
wcc386 /fpi87 /3s /oe=40 /oi /ol /or /ot %1.c
then one user of the program reports lots of "domain error in sqrt" messages,
but the program appears to operate properly. If I compile with only the first
two switches, the "domain error" messages go away.
The user is in the UK with a 2400 baud modem. He can afford only the
occasional download.
Which of those switches should I use and which should I not use?
jrf
*** See also #2417.
From: Mike Johnson
To: All Msg #2393, Feb-11-94 05:20PM
Subject: wpp386 patch level?
Well I got the c32dos_b.zip file and ran applyb and patched the compiler.
when I ran techinfo, all the files listed except wpp386.exe were patched
to level b and wpp386.exe stayed at level a. Is this correct ?
.
___
X DeLuxe2/386 1.25 #10176 X Machines of Loving Grace
*** See also #2418.
From: Thomas B. Pollard Rec'd
To: Kevin Kitsemetry Msg #2396, Feb-14-94 09:18AM
Subject: C/C++ 9.5A Wvideo interrup with <SyRq>
TO Watcom 519-747-4971
FROM Tom Pollard 617-275-0100 Ex127
C/C++ 9.5B Wvideo interrupt using <Print Screen> problem
|
Just to let you know that the problem is still in your 9.5B patch
still has the same problem. Before I added the B patches I over
wrote the working RSIHELP.EXP (27064 2-16-93) with the A patch
RSIHELP.EXP (27064 8-27-93) and applied the B patches. I then had
the same problems as before. I then used the 9.5 LA RSIHELP.EXP
(27064 2-16-93) and once again fixed the problem.
*** This is a reply to #1977. *** See also #2419.
From: David Kennedy
To: Brian Burton Msg #2399, Feb-14-94 12:02PM
Subject: filename in NT
BB> Internal report #16903
BB> The NT hosted tools do not handle long file names
BB> properly. wcl386 truncates longfilename.obj to
BB> longfilenam and then
BB> searches for longfilenam.cxx/cpp/cc/c. This is a
BB> major annoyance since I prefer to name source files
BB> after the class that they implement and I don't want
BB> short class names. It seems like a trivial fix. Does
BB> Watcom have any plans to address this problem?
BB> ++Brian
The tools now all support long filenames under Windows NT. Note that you must
be using the NT-hosted tools located in the BINNT directory. This support was
added with version 9.0b.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2350.
From: David Kennedy Rec'd
To: Jim Ehrismann Msg #2400, Feb-14-94 12:22PM
Subject: More Graphics support
JE> Hi Kevin,
JE> Does WATCOM have any plans to add support for
JE> higher resolution modes
JE> and/or 24bit colour modes in your C32 for DOS graphics library?
JE> Jim Ehrismann
WATCOM does not support, nor does it plan to support 24-bit colour modes.
There are several good third-party libraries that provide this support.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2382.
From: David Kennedy Rec'd
To: Kevin Blenkinsopp Msg #2401, Feb-14-94 12:28PM
Subject: Weird stuff again
KB> I realise I'm
KB> not giving you a lot to work with here - I'll try and
KB> reproduce it in an uploadable file, but I can't
KB> promise anything.
If you could try to produce a small working example we will try to diagnose
the problem.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2385.
From: David Kennedy Rec'd
To: Jon Maiara Msg #2402, Feb-14-94 12:32PM
Subject: wvideo w/keyboard handler
JM> i have a program which takes over the keyboard
JM> interrupt (int 9). for a while, wvideo would
JM> completely lose the keyboard after the handler was
JM> installed, but that was fixed. but after i installed
JM> the b level patches, the debugger sometimes works, but
JM> it sometimes loses input, wedges or reboots.
Would it be possible to upload a small example of the code, and specify which
debugger and tools you are using (I assume DOS). This will help us to more
easily diagnose the problem.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2387.
From: JAM Productions
To: All Msg #2403, Feb-14-94 01:40PM
Subject: ALLFILES listing
Could someone tell me if there's a listing of all files on this BBS
(ie: ALLFILES.xxx) that I could download and browse through?
Jam Productions
*** See also #2420.
From: Patrick Lamb Rec'd
To: David Kennedy Msg #2404, Feb-14-94 06:36PM
Subject: unexpected interrupt
The slow response problem on the 386 was apparently fixed by the "B" level
patches. I'll get back to you later on the '486 response.
Thanks for your help!
Pat
*** This is a reply to #2378.
From: John Lansdale Rec'd
To: Kevin Kitsemetry Msg #2405, Feb-15-94 01:04AM
Subject: Exporting variables from a NT DLL
I've finally got Watcom to compile and link Windows NT DLLs that work
ok under Win32s. However, I have one small problem with exported
variables from the DLL:
1) First, is it possible to export global variables found in a Windows
NT DLL?
2) I assumed it was ok, so I explicitly exported them using the EXPORT
linker keyword.
3) My code crashes now whenever it accesses one of these exported variables.
My questions:
1) Why is my code crashing.
2) What is the simplest method to export several hundred global
variables from a DLL? I don't want to explicitly export
the variables using the linker. I've tried using
"C-Var-Type __export Variable_Name" in my code
but it won't export the name for some reason.
John Lansdale
*** See also #2421.
From: Glenn Crownover
To: All Msg #2406, Feb-15-94 03:55AM
Subject: Bank Switching in 640x480x256
I was wondering what the proper way to switch video banks (64k pages)
in 640x480 x 256color mode was. I am using _setvideomode(VRES256COLOR)
to initialize the mode. I have had some luck with some cards with
int 10, but was wondering if there was a way to have the Watcom
graphics library do it.
Thanks.
*** See also #2412.
From: David Kennedy Rec'd
To: Joseph Molnar Msg #2407, Feb-15-94 10:24AM
Subject: Problem
JM> Having a slight problem with token pasteing(?). I am
JM> doing some unicode stuff under NT, and as you might
JM> know MS creates a MACRO that they put in front of all
JM> strings so they can choose whether or not to make is
JM> ASCII or UNICODE across compiles. It isn't working
JM> well, the string is returning a char* instead of long
JM> char*.
Note that the type of L"string" is specified as an array of wchar_t as defined
in <stddef.h> By default this is char, but changes to long char if _cplusplus
is defined (ie. if you invoke wpp386). Long char is two bytes long, as it
should be. Note that <stddef.h> IS included by including <windows.h>
JM> Also I was curious about the funny, is it possible for
JM> MS C8 code to be debugged by WVIDEO, and for WinBug
JM> (NT's debugger) to debug W9.5 NT code?
There is no way to convert MSC debugging information to WATCOM debug
infomation. However, the WOMP utility allows conversion of WATCOM debug
information to MS CodeView, Metaware, or Borland debugging information.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2346. *** See also #2451.
From: David Kennedy Rec'd
To: Jim Gerow Msg #2408, Feb-15-94 10:47AM
Subject: WLINK has problems with 16-bit modules when in 32-bit mode
JG> Kevin,
JG> We also have the problem when linking for DOS-32.
JG> Could you also check if development knows a work-
JG> around. We're all set setting up a proper 16-bit
JG> environment, (stack & data areas), but need to have
JG> the relocation fixups to be properly formed as 16:16
JG> addresses, not as a 0:32 linear address.
JG> Thanks
B-level: A bug in handling 16-bit relocations in 32-bit code that prevented
programs from loading has been corrected.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2372. *** See also #2414.
From: David Kennedy
To: Ross Linder Msg #2409, Feb-15-94 10:54AM
Subject: Wcc386 & DesqviewX
Line trouble, worked fine.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2373.
From: Michael Mishoe Rec'd
To: Glenn Crownover Msg #2412, Feb-15-94 02:50PM
Subject: Bank Switching in 640x480x256
see file newvesa.c
*** This is a reply to #2406. *** See also #2413.
From: Glenn Crownover Rec'd
To: Michael Mishoe Msg #2413, Feb-16-94 05:16AM
Subject: Bank Switching in 640x480x256
Thanks for the reference. I can not find, however, this newvesa.c
Where is it?
Thanks again in advance.
-Glenn
*** This is a reply to #2412. *** See also #2423.
From: Jim Gerow Rec'd
To: David Kennedy Msg #2414, Feb-16-94 08:26AM
Subject: WLINK has problems with 16-bit modules when in 32-bit mode
Yes, the Rational DOS-extender has been fixed so that it doesn't abort when
loading, however, the relocation fix-ups that are done on the addresses within
the 16-bit code are wrong. We can get 32-bit code to call the 16-bit code,
as well as use an operand size override to return properly, however, the fix-
ups within the 16-bit modules are computed using the flat (0:32) model when
they should be using the LARGE (16:16) model. The effect is that the first 16-
bit far call [to another 16-bit function within the 3rd party library] results
in a crash.
(i.e. The previously uploaded test case still fails.)
If you need any more clarifications, or if there's a work-around, please
contact me here or at 617/229-2924.
Thanks
*** This is a reply to #2408. *** See also #2425.
From: Kevin Kitsemetry Rec'd
To: Matt Howard Msg #2415, Feb-16-94 09:35AM
Subject: Mem Alloc Error and Asm Questions
MH> 1. When converting a screen saver program to
MH> Watcom, every thing works until at the end, I get the
MH> error:
MH> "Memory Allocation Error"
MH> "Cannot load COMMAND, system halted"
MH> I should note that my tests indicate the actual
MH> program finishes before this error occurs. I'm not
MH> sure whats wrong since:
MH> a. this didn't occur with a certain "other" 16-bit compiler and
MH> b. I've check through the program to make sure no memory is left dangling
Try tracing through the program in the debugger. This will allow you to see
for certain just where the program is crashing. If your program has finished,
perhaps there is an error with the exit routines.
MH> 2. Just an asm question. What should I do when
MH> asm instructions require a segment:offset pair in an
MH> instruction. For example, how would I do "rep movsw"
MH> with watcom pointers. I tried just loading the offset
MH> when calling a BIOS interrupt(that required a seg:off
MH> pointer), and oddly, it worked for one program but in
MH> another, it caused the computer to reboot itself. Any
MH> ideas?
You can specify the extended register for the 386. This means that ax will
become eax, bx will become ebx, etc. There are times when you will only want
to specify the lower order word registers (ex, bx, etc.) such as when you wan
to execute code in real mode.
Note that the segment registers are the same size in real mode as in protected
mode. So when issuing instructions that involve these registers, the low-
order word register is all that is needed. For example, getting the current
stack segment would be the same in real mode as in protected mode: 'mov
dx,ss'.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2390.
From: Kevin Kitsemetry Rec'd
To: Amine Moulay Ramdane Msg #2416, Feb-16-94 09:56AM
Subject: Ntheader.zip - excpt.h
AMR> Hi Mr.Kevin is there any chance to get the header file except.h
AMR> that doesn't exist in the ntheader.zip .
This file is now in the ntheader.zip archive. It was left out by accident in
the previous archive.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2391.
From: Kevin Kitsemetry Rec'd
To: Jon Fleming Msg #2417, Feb-16-94 09:59AM
Subject: Optimization selection
JF> I'm an inexperienced C programmer with lots of
JF> experience in other languages. I've written an
JF> AutoCAD ADS program using Watcom 9.5.
JF> In this program, the sqrt function is called
JF> three times. Each instance is in the same form:
JF>
JF> var = sqrt(a*a + b*b + c*c);
JF>
JF> which certainly should not be negative.
JF>
JF> If I compile it with the following command line:
JF>
JF> wcc386 /fpi87 /3s /oe=40 /oi /ol /or /ot %1.c
JF>
JF> Which of those switches should I use and which should I not use?
There have been some updates to the code generator in the latest revision,
patch level 'b'. Please make sure that you have this applied, as it may solve
the problem altogether. If this does not work, you can use the default
switches to be safe. We would be interested in trying to reproduce the
example here (after you have applied the 'b' level patches) in hopes that we
could rectify the problem.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2392. *** See also #2432.
From: Kevin Kitsemetry Rec'd
To: Mike Johnson Msg #2418, Feb-16-94 10:02AM
Subject: wpp386 patch level?
MJ> Well I got the c32dos_b.zip file and ran applyb and patched the compiler.
MJ> when I ran techinfo, all the files listed except wpp386.exe were patched
MJ> to level b and wpp386.exe stayed at level a. Is this correct ?
C32DOS_B.ZIP is the archive for the WATCOM C32 for DOS compiler. If you have
the WATCOM C/C++32 compiler, then you have to apply the patch in the C32_B.ZIP
archive.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2393.
From: Kevin Kitsemetry Rec'd
To: Thomas B. Pollard Msg #2419, Feb-16-94 10:13AM
Subject: C/C++ 9.5A Wvideo interrup with <SyRq>
TBP> TO Watcom 519-747-4971
TBP> FROM Tom Pollard 617-275-0100 Ex127
TBP> C/C++ 9.5B Wvideo interrupt using <Print Screen> problem
TBP> |
TBP> Just to let you know that the problem is still in your 9.5B patch
TBP> still has the same problem. Before I added the B patches I over
TBP> wrote the working RSIHELP.EXP (27064 2-16-93) with the A patch
TBP> RSIHELP.EXP (27064 8-27-93) and applied the B patches. I then had
TBP> the same problems as before. I then used the 9.5 LA RSIHELP.EXP
TBP> (27064 2-16-93) and once again fixed the problem.
Yes, I knew that the problem has been fixed for the new debugger in the next
version, but it was not fixed for the 'b' level patches to 9.5. Fixing version
9.5 is not a trivial job apparently.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2396.
From: Kevin Kitsemetry
To: JAM Productions Msg #2420, Feb-16-94 11:32AM
Subject: ALLFILES listing
JP> Could someone tell me if there's a listing of all files on this BBS
JP> (ie: ALLFILES.xxx) that I could download and browse through?
I have just created a rather cude listing. You can find it in the General
File area.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2403.
From: Kevin Kitsemetry Rec'd
To: John Lansdale Msg #2421, Feb-16-94 11:34AM
Subject: Exporting variables from a NT DLL
JL> I've finally got Watcom to compile and link Windows NT DLLs that work
JL> ok under Win32s. However, I have one small problem with exported
JL> variables from the DLL:
JL> 1) First, is it possible to export global variables found in a Windows
JL> NT DLL?
Currently, we only support exporting functions from Windows NT DLL's. See the
Linker Supplement for details.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2405.
From: Kevin Kitsemetry Rec'd
To: Glenn Crownover Msg #2423, Feb-16-94 12:14PM
Subject: Bank Switching in 640x480x256
GC> Thanks for the reference. I can not find, however, this newvesa.c
GC> Where is it?
You can find it in File area 10.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2413.
From: Jim Gerow Rec'd
To: David Kennedy Msg #2425, Feb-16-94 02:25PM
Subject: WLINK has problems with 16-bit modules when in 32-bit mode
I uploaded a simple test case: test16.zip that highlights the relocation fixup
problem. I hope either your tech support or Rational's can solve it. (I also
posted a message to Rational in area 15).
Thanks
*** This is a reply to #2414.
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2427, Feb-16-94 04:17PM
Subject: 16-bit fixup problems
Hi. This is just a note to mention that I'm also experiencing 16-bit fixup
problems. Although I'm not sure if they're exactly the same thing that Jim
Gerow is running into, it certainly sounds like it. I've written some code
that gets copied down into real mode memory, and then I patch an interrupt
handler to point to it. It's supposed to do a signature check - if it
succeeds,special code gets executed, if it fails, it does a JMP to chain to
the previously installed handler. The address of the indirect chain jump gets
screwed up, which I've verified under SoftICE/W and WVIDEO (although I had to
do a hex dump & hand disassembly in WVIDEO - ahem). I was going to whittle the
program down to the minimum size necessary to reproduce the problem, but it
sounds like Mr. Gerow has already done so.
Jason
*** See also #2438.
From: Kevin Blenkinsopp Rec'd
To: Anthony Scian Msg #2428, Feb-16-94 07:38PM
Subject: I'm baaack!
/*
Anthony,
I've got a beauty for you here: I was rather surprised when all my windows
came up looking they had the focus, but I was REALLY surprised when I figured
out why...
*/
typedef int Bool;
typedef unsigned char Byte;
class Window {
public:
void Frame(void);
Bool HasFocus(void);
Byte mbBorder;
};
void Window::Frame(void)
{
Byte bTitleColour = (Byte)((mbBorder & 0xF0) | (HasFocus ? 0x0F : 0x0E));
^
^
What's wrong with this picture ? ^ }
/*
I know I'm pretty tired and stupid right now, but I have a strong suspicion
that this shouldn't have compiled!
BTW: Tried to reproduce that unrolling problem in a snippet but couldn't do
it. Dropped the stack to 20K with the working version and it still worked, so
it's not a stack size problem. At least THIS one's easy to duplicate.
BTW II: Do I officially qualify as a pest yet?! :-)
Thanks,
Kevin
*/
*** See also #2437.
From: Jon Fleming Rec'd
To: Kevin Kitsemetry Msg #2432, Feb-21-94 09:53AM
Subject: Optimization selection
I've downloaded & applied the A and B patches. I'll do some
investigation.
BTW, there's one bothersome but unimportant nit. WLINK announces that is
is creating an "AutoCAD Devlopment System Executable". Note the spelling of
the second word. (I havent't tried WLINK since applying the patches).
jrf
*** This is a reply to #2417. *** See also #2440.
From: Julian Ayling
To: Technical Support Msg #2433, Feb-21-94 03:50PM
Subject: DPMI Memory mapping
KK> Spoke to on phone
Hi,
I've got another problem for you. I'm trying to map some memory
on a card so that I can access the data using DPMI function
0x800. I've looked at the example file accmem.c that shows how
to do this, but am unable to get my version to work.
The actual int386 functions appear to be working correctly, the
carry flag is clear after each one but the data that I am
getting hold of is either all 0x00, 0xFF or apparantly random
values. I know what the data should be by using debug to
effectively perform the same memory remapping for me and then
viewing the data - basically it tells me that the correct card
is available.
I know I'm not supposed to put bits of code in the message
section but it's very small, so here it is.
main()
{
CARDPTR iface;
int status, i;
unsigned short selector;
unsigned short linhi;
unsigned short linlo;
union REGS regs;
unsigned char __far *xxx;
BaseAddr = 0xe0000000;
WrongRead = 0;
Neg = 0;
DprAddr = 0xe000ff00;
IoBase = 0x300;
IntLev = 5;
printf("Reseting card\n");
status = outp(IoBase + REG3, 0);/* Reset Card
printf("status = %d\n",status);
printf("Mapping card into pc memory.\n");
status = outp(IoBase + MAPIN,0); printf("status = %d\n",status);
/* DPMI function 0800h -- Physical Address Mapping */
/* Map 128 bytes of Physical Address Space starting at 0xe000ff00 */
regs.w.ax=0x0800;
regs.w.bx=0xe000;
regs.w.cx=0xff00;
regs.w.si=0x0000;
regs.w.di=0x0080;
int386(0x31,®s,®s);
if ( regs.x.cflag == 0u )
{
linhi = regs.w.bx;
linlo = regs.w.cx;
}
else
{
selector = 0;
}
/* DPMI function 0000h -- Allocate LDT descriptor */
/* The default limit on the new descriptor will be zero */
regs.w.ax=0x0000;
regs.w.cx=1;
int386(0x31,®s,®s);
if ( regs.x.cflag == 0u )
{
selector = regs.w.ax;
}
else
{
selector = 0;
}
/* DPMI function 0007h -- Change base address of new selector */
regs.w.ax=0x0007;
regs.w.bx=selector;
regs.w.cx=linhi;
regs.w.dx=linlo;
int386(0x31,®s,®s);
if ( regs.x.cflag == 0u )
{
puts("Success allocating new descriptor");
___
X SLMR 2.1a X
}
else
{
puts("Failed allocating");
}
/* DPMI function 0008h -- set selector limit to 64k */
regs.w.ax=0x0008;
regs.w.bx=selector;
regs.w.cx=0x0000;
regs.w.dx=0xffff;
int386(0x31,®s,®s);
if ( regs.x.cflag == 0u )
{
puts("Success changing limit of new descriptor");
}
else
{
puts("Failed changing limit");
}
sleep(3);
/* dump the first 32 bytes of the mapped memory */
/*********************************************************************/
/* This does not give the correct result - we get all 0x00 or all */
/* 0xff or random vlues */
/*********************************************************************/
xxx = MK_FP(selector,0);
for ( i=0; i<32; i++)
{
if (i % 8 == 0)
{
printf("\n");
}
printf("%x:",*(xxx+i));
}
}
AS you can see it's pretty much the same as ACCMEM.C.
When I finally generate the pointer using MK_FP I have to modify xxx
with the far modifier otherwise the compiller complains about MK_FP
causing a pointer truncation. I'm not quite sure why this needs to be
far when the code is 32 bit flat - but it was in the example code.
Do you have any sugestions why this is not working.
___
X SLMR 2.1a X
___
X SLMR 2.1a X
*** See also #2435.
From: Kevin Blenkinsopp Rec'd
To: Julian Ayling Msg #2435, Feb-17-94 05:39PM
Subject: DPMI Memory mapping
Julian,
I have a similar problem with a card that maps in at 0xC0000000. I don't have
any suggestions for you, but if you find a solution I'd be very glad to hear
about it. I thought maybe it was a problem with the selector access rights,
but I couldn't get anywhere with that either. That doesn't mean that it isn't,
mind you, but I had a workaround for the board in question that let me map 64K
of it low at a time, and I was up against a deadline so I just gave up on the
DPMI stuff. BTW, I tried it with 386MAX and QEMM as the DPMI manager and got
the same results, so I'm pretty sure it's not a DOS4G problem.
You might want to try posting this in the DOS4G area anyway, as Dan Teven may
have some bright ideas.
Anyway, best of luck. Please let me know if you figure it out.
Thanks,
Kevin
*** This is a reply to #2433.
From: Chris Boogmans Rec'd
To: David Kennedy Msg #2436, Feb-18-94 05:53AM
Subject: _harderr() problem
Hi,
i am using C32 version 9.5b in a DOS+DOS/4GW environment. Following a problem
i had when installing a critical error handler using _harderr(), i had a look
at the assembly code which is called on int 24h. DOS passes a pointer to the
device header in BP:SI. The WatCom library has to convert this pointer to a
pointer in the flat model; this is the part of the WatCom lib code which should
do that (try it if BP:SI is for example = 0FFF:0010) :
sub ebx, ebx
mov bx, bp
shl ebx, 4
add bx, si ; here, the carry (if any) gets lost, RESULT = WRONG
POINTER
Could this be corrected for the c level patches ?
Thanks, Chris.
From: Anthony Scian Rec'd
To: Kevin Blenkinsopp Msg #2437, Feb-18-94 09:32AM
Subject: I'm baaack!
KB> /*
KB> Anthony,
KB> I've got a beauty for you here: I was rather surprised
KB> when all my windows came up looking they had the
KB> focus, but I was REALLY surprised when I figured out
KB> why...
KB> */
I'll look at this one. I think we can at least print out a warning. The
unadorned id 'HasFocus' is being treated as a member pointer and being
compared against 0. This is strictly speaking an extension to C++ but it is
in the compiler because the MFC library requires it.
KB> typedef int Bool;
KB> typedef unsigned char Byte;
KB> class Window {
KB> public:
KB> void Frame(void);
KB> Bool HasFocus(void);
KB> Byte mbBorder;
KB> };
KB> void Window::Frame(void)
KB> {
KB> Byte bTitleColour = (Byte)((mbBorder & 0xF0) |
KB> (HasFocus ? 0x0F : 0x0E));
KB> ^
KB> ^
KB> What's wrong with this picture ? ^ }
*** This is a reply to #2428. *** See also #2441.
From: Kevin Kitsemetry Rec'd
To: Jason Blochowiak Msg #2438, Feb-18-94 11:14AM
Subject: 16-bit fixup problems
JB> disassembly in WVIDEO - ahem). I was going to whittle
JB> the program down to the minimum size necessary to
JB> reproduce the problem, but it sounds like Mr. Gerow
JB> has already done so.
Yes, he has. Keep your eyes on this area and area 15.
David Kennedy is looking into Mr. Gerow's problem.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2427. *** See also #2447.
From: Kevin Kitsemetry Rec'd
To: Jon Fleming Msg #2440, Feb-18-94 11:31AM
Subject: Optimization selection
JF> I've downloaded & applied the A and B patches.
JF> I'll do some investigation.
JF> BTW, there's one bothersome but unimportant nit.
JF> WLINK announces that is is creating an "AutoCAD
JF> Devlopment System Executable". Note the spelling of
JF> the second word. (I havent't tried WLINK since
JF> applying the patches).
This has been fixed, it just didn't make it in time for the 'b' level patches.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2432.
From: Kevin Blenkinsopp Rec'd
To: Anthony Scian Msg #2441, Feb-18-94 11:55AM
Subject: I'm baaack!
Okay, I could live with it being a warning. Funny how after switching
compilers to get away from Microsoft I STILL end up getting screwed by them!
Thank you Mr Bill!
Cheers
Kevin
*** This is a reply to #2437.
From: Julian Ayling
To: Mike Paola Msg #2442, Feb-18-94 12:00AM
Subject: WVIDEO and EMM386 1/
I've just updated to 9.5b and can no longer get WVIDEO to work from DOS.
When I invoke WVIDEO the initial sign on banner appears there is a small
delay of about 2 seconds and then EMM386 jumps in with a exception #01
error message in an application at address 3083:0048, It always reports the
same address regardless of the application that I attempt to debug.
Using exactly the same set up with 9.5a I was at least able to start WVIDEO
even if it subsequently went on holiday when I was in the middle of
debugging.
I am able to start WVIDEO if I use a DOS box from within Windows, but this
is not what I need to do right now.
I am running to a secondary mono monitor. I have the WVIDEO environment set
to /trap#rsi. I have the apporpriate path statements. I have tried with an
without the NOVCPI option for EMM386 with no effect.
Here is the output from techinfo, Using the RIPSPEED sections from
config.sys and autoexec.bat
WATCOM's Techinfo Utility, Version 1.3
Current Time: Fri Feb 18 17:32:40 1994
WATCOM Phone: (519) 884-0702
415 Phillip St. Fax: (519) 747-4971
Waterloo, Ontario
CANADA N2L 3X2
___---------------WATCOM C Environment Variables ----------------
WATCOM=<C:\WC\.>
INCLUDE=<C:\WC\H;C:\WC\H\WIN>
PATH=<C:\DOS;C:\NU;C:\WC\BIN;C:\WC\BINB;C:\WC\BINW;C:\WINDOWS;C:\C700\BIN;
C:\UTILS;C:\WW;D:\ALD;D:\PR2UK;C:\HJWIN;D:\MGXLIBS>
WVIDEO=</trap#rsi>
WCGMEMORY=<3072>
File 'C:\WC\.\bin\wcc386.exe' has been patched to level '.b'
File 'C:\WC\.\bin\wvideo.exe' has been patched to level '.b'
File 'C:\WC\.\binw\wvideo.exe' has been patched to level '.b'
File 'C:\WC\.\bin\wlink.exe' has been patched to level '.b'
File 'C:\WC\.\binb\wlib.exe' has been patched to level '.b'
___---------------WATCOM SQL Environment Variables ----------------
... ERROR...WSQL environment variable not set.
Amount of extended memory is: 0K
Amount of base memory is: 640K
Amount of free base memory is: 580512 bytes
DOS Version 6.20
___---------C:\CONFIG.SYS-------------
[menu]
menuitem=MSVC, Microsoft Visual C Development
menuitem=RipSpeed, Watcom C9.5a Development for RipSpeed
menuitem=WatcomC95, Watcom C9.5 Development for RipSpeed
menuitem=DOSRipSpeed, RipSpeed Runtime environment
menuitem=Test, Try Things Out Here
menuitem=Newtest, Try Other Things Out Here
menudefault=RipSpeed, 20
[MSVC]
DEVICE=C:\adaptec\ASPI4DOS.SYS /D /x03
DEVICE=C:\DOS\HIMEM.SYS /VERBOSE
DEVICE=C:\DOS\EMM386.EXE NOEMS NOVCPI HIGHSCAN WIN=D900-DBFF WIN=ED00-EFFF
BUFFERS=30,0
files=50
dos=UMB
LASTDRIVE=E
FCBS=16,0
dos=HIGH
STACKS=0,0
break=on
rem device=c:\dos\smartdrv.exe /double_buffering
shell=c:\dos\command.com c:\dos /e:768 /p
country=044,,\dos\country.sys
DEVICE=C:\ADAPTEC\ASPIDISK.SYS /D
rem DEVICE=C:\CORELDRV\CUNI_ASP.SYS /ID:1 /N:1 /D:MSCD001
[RipSpeed]
DEVICE=C:\ADAPTEC\ASPI4DOS.SYS /D /x03
DEVICE=C:\DOS\HIMEM.SYS /VERBOSE
DEVICE=C:\DOS\EMM386.EXE NOEMS NOVCPI HIGHSCAN WIN=D900-DBFF WIN=ED00-EFFF
rem DEVICE=C:\DOS\RAMDRIVE.SYS 4096 /E
BUFFERS=30,0
files=50
DOS=UMB
LASTDRIVE=E
FCBS=16,0
DOS=HIGH
STACKS=0,0
break=on
rem device=c:\dos\smartdrv.exe /double_buffering
shell=c:\dos\command.com c:\dos /e:768 /p
country=044,,\dos\country.sys
DEVICE=C:\ADAPTEC\ASPIDISK.SYS /D
[WatcomC95]
DEVICE=C:\DOS\HIMEM.SYS /VERBOSE
DEVICE=C:\DOS\EMM386.EXE NOEMS NOVCPI
BUFFERS=10,0
FILES=30
DOS=UMB
LASTDRIVE=E
FCBS=4,0
DOS=HIGH
STACKS=0,0
break=on
rem device=c:\dos\smartdrv.exe /double_buffering
shell=c:\dos\command.com c:\dos /e:768 /p
country=044,,\dos\country.sys
rem 10.0Mb/sec Adaptec scsi controller
DEVICE=C:\ADAPTEC\ASPI4DOS.SYS /D /x03
rem Adaptec controller for addition SCSI disks
DEVICEHIGH /L:2,7616 =C:\ADAPTEC\ASPIDISK.SYS /D
[DOSRipSpeed]
DEVICE=C:\ADAPTEC\ASPI4DOS.SYS /D /x03
DEVICE=C:\DOS\HIMEM.SYS /VERBOSE
rem DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF NOVCPI
rem DEVICE=C:\DOS\RAMDRIVE.SYS 16384 /E
BUFFERS=10,0
FILES=50
rem DOS=UMB
LASTDRIVE=E
FCBS=4,0
break=on
shell=c:\dos\command.com c:\dos /e:768 /p
country=044,,\dos\country.sys
DEVICE=C:\ADAPTEC\ASPIDISK.SYS /D
[Test]
DEVICE=C:\DOS\HIMEM.SYS /VERBOSE
rem DEVICE=C:\DOS\EMM386.EXE AUTO RAM
rem NOEMS NOVCPI WIN=D900-DBFF WIN=ED00-EFFF
BUFFERS=10,0
FILES=30
DOS=UMB
LASTDRIVE=E
FCBS=16,8
DOS=HIGH
STACKS=9,256
break=on
DEVICE=C:\DOS\EMM386.EXE AUTO RAM
rem device=c:\dos\smartdrv.exe /double_buffering
>>> Continued to next message
___
X SLMR 2.1a X
From: Julian Ayling
To: Mike Paola Msg #2443, Feb-18-94 12:00AM
Subject: WVIDEO and EMM386 2/
>>> Continued from previous message
shell=c:\dos\command.com c:\dos /e:768 /p
country=044,,\dos\country.sys
rem 10.0Mb/sec Adaptec scsi controller
DEVICE=C:\ADAPTEC\ASPI4DOS.SYS /D /x03
rem Adaptec controller for addition SCSI disks
DEVICEHIGH /L:2,7616 =C:\ADAPTEC\ASPIDISK.SYS /D
[Newtest]
DEVICE=C:\ADAPTEC\ASPI4DOS.SYS /D /x03
DEVICE=C:\DOS\HIMEM.SYS /VERBOSE
rem DEVICE=C:\DOS\RAMDRIVE.SYS 20480 /E
shell=c:\dos\command.com c:\dos /e:768 /p
DEVICE=C:\ADAPTEC\ASPIDISK.SYS /D
[common]
rem Don't delete this last block - it's for new bits to be added
___---------C:\AUTOEXEC.BAT-------------
@ECHO OFF
goto %config%
:MSVC
rem C:\CORELDRV\MSCDEX /V /M:10 /D:MSCD001
LH /L:0;2,45488 /S C:\DOS\SMARTDRV.EXE 2048 2048 /v
LH /L:2,16656 C:\DOS\KEYB UK,,C:\DOS\KEYBOARD.SYS
LH /L:2,13984 C:\DOS\SHARE.EXE
LH /L:2,6384 C:\DOS\DOSKEY
LH /L:1,56928 C:\DOS\MOUSE
SET PSEXEC3=C:\PSEXEC3
SET TMP=C:\TMP
MODE CON RATE=32 DELAY=1
SET PATH=C:\DOS;C:\MSVC\BIN;C:\NU;C:\WINDOWS;C:\UTILS;C:\WW;D:\ALD;D:\PR2UK;
C:\NFS;C:\HJWIN
set LIB=C:\MSVC\LIB
set INCLUDE=C:\MSVC\INCLUDE
set INIT=C:\MSVC
set TOOLROOTDIR=C:\MSVC
Set HELPFILES=C:\MSVC\HELP\*.HLP
SET TEMP=E:\TEMP
rem SET SSI_ACT=2,2,2
rem SET SSI_ACT=40,40,40
dir #.
touch #.
PROMPT $p$g
cd \pom
goto end
:RipSpeed
LH /L:0;2,45488 /S C:\DOS\SMARTDRV.EXE 2048 2048 /v
LH /L:2,16656 C:\DOS\KEYB UK,,C:\DOS\KEYBOARD.SYS
LH /L:2,13984 C:\DOS\SHARE.EXE
LH /L:2,6384 C:\DOS\DOSKEY
LH /L:1,56928 C:\DOS\MOUSE
MODE CON RATE=32 DELAY=1
SET PATH=C:\DOS;C:\NU;C:\WC\BIN;C:\WC\BINB;C:\WC\BINW;C:\WINDOWS;C:\C700\BIN
;C:\UTILS;C:\WW;D:\ALD;D:\PR2UK;C:\HJWIN;D:\MGXLIBS
SET INIT=C:\RIPSPEED\C700\INIT
SET INCLUDE=C:\WC\H;C:\WC\H\WIN
SET TEMP=C:\windows\temp
Set HELPFILES=C:\MSVC\HELP\*.HLP
SET HOME=C:\RIPSPEED
SET WATCOM=C:\WC\.
SET WCGMEMORY=3072
SET WVIDEO=/trap#rsi
SET DOS4G=nullp
SET RIPSPEED_HOME=e:\RIPSPEED
SET RIPSPEED_TEMP=e:\RIPSPEED\TEMP
SET RIPSPEED_OUTPUT=e:\RIPSPEED\OUTPUT
DIR #.
TOUCH #.
PROMPT $p$g
cd \ripspeed
goto end
:WatcomC95
LH /L:0;2,42416 /S C:\DOS\SMARTDRV.EXE 2048 2048 /v
LH /L:2,15904 C:\DOS\KEYB UK,,C:\DOS\KEYBOARD.SYS
LH /L:2,13984 C:\DOS\SHARE.EXE
LH /L:2,6400 C:\DOS\DOSKEY
LH /L:1,56928 C:\DOS\MOUSE
MODE CON RATE=32 DELAY=1
SET PATH=C:\POM311;C:\POM320;C:\DOS;C:\NU;C:\WC95\BIN;C:\WC95\BINB;C:\WC95\B
INW;C:\WINDOWS;C:\C700\BIN;C:\UTILS;C:\WW;D:\ALD;D:\PR2UK;C:\HJWIN
SET INIT=C:\RIPSPEED\C700\INIT
SET INCLUDE=C:\WC95\H;C:\WC95\H\WIN
SET TEMP=C:\WINDOWS\TEMP
SET HOME=C:\RIPSPEED
SET WATCOM=C:\WC95\.
SET WCGMEMORY=3072
rem SET WVIDEO=/trap#rsi
DIR #.
TOUCH #.
PROMPT $p$g
cd \ripspeed
goto end
:DOSRipSpeed
C:\DOS\SMARTDRV.EXE 2048 2048
C:\DOS\KEYB UK,,C:\DOS\KEYBOARD.SYS
C:\DOS\DOSKEY
C:\DOS\MOUSE
MODE CON RATE=32 DELAY=1
SET PATH=C:\DOS;C:\NU;C:\WC\BIN;C:\WC\BINB;C:\WC\BINW;C:\C700\BIN;C:\UTILS;C
:\FREEDOM\BIN
SET WATCOM=C:\WC\.
SET DOS4G=NULLP
SET RIPSPEED_HOME=E:\RIP
SET RIPSPEED_TEMP=E:\RIP\TEMP
SET RIPSPEED_OUTPUT=E:\RIP\OUTPUT
DIR #.
TOUCH #.
PROMPT $p$g
cd \ripspeed
goto end
:Test
LH /L:0;2,42416 /S C:\DOS\SMARTDRV.EXE 2048 2048 /v
LH /L:2,15904 C:\DOS\KEYB UK,,C:\DOS\KEYBOARD.SYS
LH /L:2,13984 C:\DOS\SHARE.EXE
LH /L:2,6400 C:\DOS\DOSKEY
LH /L:1,56928 C:\DOS\MOUSE
MODE CON RATE=32 DELAY=1
SET PATH=C:\POM311;C:\POM320;C:\DOS;C:\NU;C:\WC\BIN;C:\WC\BINB;C:\WC\BINW;C:
\WINDOWS;C:\C700\BIN;C:\UTILS;C:\WW;D:\ALD;D:\PR2UK;C:\HJWIN;C:\POMTEST
SET INIT=C:\RIPSPEED\C700\INIT
SET INCLUDE=C:\WC\H;C:\WC\H\WIN
SET TEMP=C:\WINDOWS\TEMP
SET HOME=C:\RIPSPEED
SET WATCOM=C:\WC\.
SET WCGMEMORY=3072
rem SET WVIDEO=/trap#rsi
rem SET DOS4GVM=@C:\RIPSPEED\NEW4G.VMC
DIR #.
TOUCH #.
PROMPT $p$g
cd \ripspeed
goto end
>>> Continued to next message
___
X SLMR 2.1a X
*** See also #2448.
From: Julian Ayling
To: Mike Paola Msg #2444, Feb-18-94 12:00AM
Subject: WVIDEO and EMM386 3/
>>> Continued from previous message
:Newtest
SET PATH=C:\DOS;C:\WC\BIN;C:\WC\BINB;C:\WC\BINW
Set DOS4G=VERBOSE
SET DOS4G=VERBOSE
SET RIPSPEED_HOME=C:\RIPSPEED
SET RIPSPEED_TEMP=C:\RIPSPEED\TEMP
SET RIPSPEED_OUTPUT=C:\RIPSPEED\OUTPUT
cd \ripspeed
goto end
:end
___---------------------------------------------------
A Intel 486 processor is installed in this system.
486 math coprocessor is present
and Equipment Flags say math coprocessor IS present.
The next test may cause the system to hang if 486
interrupts are not handled properly.
486 interrupts are properly enabled.
___---------------------------------------------------
APPEND NOT INSTALLED
Do you have any idea what is happening? Have there been any changes to the
way in which WVIDEO needs to be invoked that I've missed? When will the IDE
be avaialable and is there any chance of getting on the beta test list for
it, pretty please with sugar on?
This is stopping me from checking any further as to wether the new memory
management routines are performing any better than the old ones so I can't
give you an update on this yet.
Thanks.
___
X SLMR 2.1a X
*** See also #2457.
From: Bob Vonmoss
To: Kevin Kitsemetry Msg #2445, Feb-22-94 10:26AM
Subject: b-level cdecl change
KK> Contacted via phone.
I just installed the b-level patches for watcom C/C++ 9.5.
We had been successfully running with 9.5a. When we call
WLINK, we are getting undefined references for external
assembly routines. The code originally used cdecl to
force "C" semantics. The function name was also mangled.
I changed that kind of declaration to this style:
"C" { asm_func() }
This did not mangle the name, but put _ after the function
name and it can't find the asm function. I did notice
the note in the README that cdecl no longer forces "C"
semantics. This was part of the C-scape windowing
library.
Right now I'm unable to link to the external
.ASM routines. Can someone get in touch with me as soon
as possible. Bob V. with Marathon Software (312) 525-3692
Chicago, IL, USA.
From: Julian Ayling
To: Mike Paola Msg #2446, Feb-18-94 12:00AM
Subject: WVIDEO and EMM386 again
I forgot to give you the source, make and link files used for the WVIDEO
EMM386 exception problem. I'll zip them as VBS.ZIP in file area 12.
Thanks.
___
X SLMR 2.1a X
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2447, Feb-18-94 03:58PM
Subject: 16-bit fixup problems
Ok, I'll keep an eye out. Btw, for the time being I'm using a rather heinous
kludge - I link the .OBJ file that my .ASM source assembles to into an EXE by
itself (using TLINK), then use EXE2BIN to convert it, then use MAKEHEX (a
little utility I wrote that converts a file to a bunch of DBs), then assemble
a file that includes the output of MAKEHEX, and link that into my EXE. Because
of all of this, I end up with 3 copies of the code - one original, one kludge
duplicate (TLINK, btw, does generate the correct results), and then the copy
that ends up down in real mode memory. Fortunately, the code is only about 5k.
As I mentioned, I used SoftICE/W to help figure out what's going on - I ended
up doing a "Fake EXE" with TLINK, then using NuMega's MSYM program to convert
TLINK's output to a seperate .SYM file, loading that, and using SYMLOC after I
figured out where the real mode code ends up. There's apparently a utility
that will convert a 16-bit Watcom .MAP file to something similar to
Microsoft's .MAP file, so that MSYM will be able to process it, but it fails
miserably with a 32-bit app (big suprise). In any case, it'd be really nice to
be able to use source-level debugging with the 32-bit code from within S/W,
especially seeing as WVideo does such a miserable job of dealing with
interrupts and such. I've yet to contact NuMega about this (I only got S/W a
few days ago), but I'd appreciate any information you might have about this,
and it'd certainly be nice if the folks at Watcom and NuMega could work
together to get support for this going.
Thanks,
Jason
*** This is a reply to #2438. *** See also #2462.
From: Dan Teven Rec'd
To: Julian Ayling Msg #2448, Feb-18-94 04:28PM
Subject: WVIDEO and EMM386 2/
Try removing DOS4G=NULLP -- and see the recent message traffic in
area 15.
Dan
*** This is a reply to #2443.
From: Joseph Molnar Rec'd
To: David Kennedy Msg #2451, Feb-19-94 02:37PM
Subject: Problem
DK> Note that the type of L"string" is specified as an
DK> array of wchar_t as defined in <stddef.h> By default
DK> this is char, but changes to long char if _cplusplus is
DK> defined (ie. if you invoke wpp386). Long char is two
DK> bytes long, as it should be. Note that <stddef.h> IS
DK> included by including <windows.h>
This isn't even what my message is about. It is qaiute obvious that wchar_t
and long char are both 2 bytes etc.etc. I said there was a token pasting
problem with your preprocessor, that is why I said to look at my other message
that wasn't responded to at all!
#define TEXT( x ) L##x
With the above if I go TEXT( "Hello" ), I should get get a long char string.
But I am not. We are trying to do Unicode stuff, but we want to be able to
change the definition of TEXT so not to be UNICODE all the time. This was
the suggestion in the NT SDK, but is NOT working with Watcom's compiler, so
it must be a token pasting problem with the preprocessor. To see my original
message, please look-back in the message to one to Tech support with Kevin in
brackets I believe, it will tell you more. We need this fixed, please tell me
if you can duplicate it, if there is a fix etc etc.
*** This is a reply to #2407
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2452, Feb-19-94 10:54PM
Subject: DPMI call 300 under Windows
Well, now that I've got the heinous kludge in place and working, I've got a
correct copy of my 16-bit code in memory. Now I'm trying to get the
communication working under Windows, but I'm having a problem: I'm using DPMI
call 0300 with ECX set to something non-zero. This works correctly with
DOS4G/W 1.95 acting as the DPMI host, but when I run it under Windows, the
parms on the stack when I hit the interrupt are incorrect. I traced into VMM,
and watched what it did - after going past a few billion instructions, I saw
what looked like the parm copy (right number back in ECX, and a REP MOVSW),
but ESI wasn't pointing to my original pre-INT 31 parms. To refresh your
memory, this is an extended DOS app, now running in a DOS box. Are there any
known wierdnesses related to Windows' DPMI implementation and call 0300? If it
makes a difference, I'm not currently locking down my app's memory, but I'm
also not running Windows in VM mode.
Jason
*** See also #2464.
From: John Rex Rec'd
To: Kevin Kitsemetry Msg #2453, Feb-20-94 01:44PM
Subject: debugging
Am having a terrible time debugging using Watcom C/C++(32) and the
new PharLap TNT dos extendder. You guys seems to have your own propriety
debug data which only your linker can handle, yet i need to to use the
pharlap tnt linker to get tnt to work correctly. wvideo will not debug
thinks built with pharlap's linker, so it seems. I have used wvideo
in the past and would like to use now, but can't get over this hurdle.
I'd really rather not try to figure out pharlap's sb386 debugger--in
preliminary trials it is blowing up on me. How do you guys suggest one
debug in this environment?
*** See also #2465.
From: John Lansdale Rec'd
To: Kevin Kitsemetry Msg #2454, Feb-20-94 11:51PM
Subject: Compiling a resource into a DLL
I'm having problems compiling a .rc file directly into an existing DLL
file. The test scenario is to save the resource file out into a DLL using
Borland's Resource Workshop (to create the basic DLL file), then using
'wrc' on the .rc file as such:
wrc resource.rc resource.dll
However, my application crashes when I access the DLL. This series of
operations worked fine with Microsoft's 'rc' program which I can no
longer use it since I'm running out of far memory space. Any suggestions?
Also, regarding the export of global variables from 32-bit NT DLLs, will
this be a future capability of WATCOM-compiled DLLs or must I rewrite my
code to not export variables?
*** See also #2466.
From: Ramon Rivas
To: Tech Support Msg #2455, Feb-21-94 07:27AM
Subject: STRANGE ERROR
#if 0
08/18/93
#endif
/*****************************************************************************
* *
* The date above displays the following error message: *
* *
* WATCOM C32 Optimizing Compiler Version 9.5b *
* Copyright by WATCOM International Corp. 1984, 1993. All rights reserved. *
* WATCOM is a trademark of WATCOM International Corp. *
* test.c(2): Error! E1163: Invalid octal constant *
* test.c: 37 lines, 0 warnings, 1 errors *
* *
* *
* Of course, usualy we have that as part of comments in source files. *
* It worked fine up to 9.5b (maybe up to 9.5a, I'm not sure). I understand *
* what it's trying to tell me I just don't think it should be telling that *
* inside an #if0-endif. Is this going to be once of ANSI specs? My env. is: *
* *
* WCC386=/3r /j /mf /fp3 /w3 /zp1 /od /dOS386 *
* INC386=c:\wc3\h;c:\wc3\h\sys;c:\c4\h;c:\os386\aiacode *
* LIBPHAR=c:\wc3\lib386;c:\wc3\lib386\dos *
* LIB=c:\wc3\lib386;c:\wc3\lib386\dos *
* WCG386=c:\wc3\bin\386wcgl.exe *
* WATCOM=c:\wc3 *
* WVIDEO=/trap#ecs/dynamic#40000/nofpu/swap *
* WCL386=/lergo *
* *
* And the command line used was: *
* *
* wcc386 test.c *
* *
* *
*****************************************************************************/
*** See also #2467.
From: Ramon Rivas Rec'd
To: David Kennedy Msg #2456, Feb-21-94 07:28AM
Subject: Ergo
Hi David,
Any news on that Ergo problem?
Ramon.
*** See also #2524.
From: Thomas B. Pollard Rec'd
To: Julian Ayling Msg #2457, Feb-21-94 10:30AM
Subject: WVIDEO and EMM386 3/
Hi look in area 15. Make sure you don't set DOS4G=NULLP. This has
already been varified not to work properly.
*** This is a reply to #2444.
From: Bob Vonmoss Rec'd
To: Kevin Kitsemetry Msg #2458, Feb-22-94 12:16PM
Subject: assembly call snipit code
// example.cpp
//
// An attempt to call the assembly function: outside_asm();// without mangling
the name or having it end with an
// underscore. This produces a message about overloading
// an extern "C" function.
//
#pragma aux outside_asm "*";
extern "C" { void outside_asm(int); }
int main()
{
outside_asm(1);
return(0);
}
//Bob VonMoss (708) 361-0001 Marathon Software
*** See also #2459.
From: Anthony Scian Rec'd
To: Bob Vonmoss Msg #2459, Feb-21-94 09:03PM
Subject: assembly call snipit code
BV> // example.cpp
BV> //
BV> // An attempt to call the assembly function: outside_asm();
BV> // without mangling the name or having it end with an
BV> // underscore. This produces a message about overloading
BV> // an extern "C" function.
BV> //
BV> #pragma aux outside_asm "*";
BV>
BV> extern "C" { void outside_asm(int); }
BV>
BV> int main()
BV> {
BV> outside_asm(1);
BV> return(0);
BV> }
In C++, you must always prototype a function before you use it. The #pragma
essentially defines a function prototype that accepts any arguments if you
don't already have the function declared. Its prototype is
extern "C" void outside_asm( ... );
for WATCOM C compatibility reasons.
Change your code to:
extern "C" void outside_asm( int );
#pragma aux outside_asm "*";
and things will be fine.
*** This is a reply to #2458.
From: Kevin Kitsemetry Rec'd
To: Jason Blochowiak Msg #2462, Feb-22-94 10:31AM
Subject: 16-bit fixup problems
JB> Microsoft's .MAP file, so that MSYM will be able to
JB> process it, but it fails miserably with a 32-bit app
JB> (big suprise). In any case, it'd be really nice to be
JB> able to use source-level debugging with the 32-bit
JB> code from within S/W, especially seeing as WVideo does
JB> such a miserable job of dealing with interrupts and
JB> such. I've yet to contact NuMega about this (I only
JB> got S/W a few days ago), but I'd appreciate any
JB> information you might have about this, and it'd
JB> certainly be nice if the folks at Watcom and NuMega
JB> could work together to get support for this going.
We have looked into this. Our manager of Third Party
Vendor support has talked to the folks at Numega, but
there have been no announcements as of yet.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2447. *** See also #2474.
From: Kevin Kitsemetry Rec'd
To: Jason Blochowiak Msg #2464, Feb-22-94 10:41AM
Subject: DPMI call 300 under Windows
JB> Well, now that I've got the heinous kludge in place and working, I've
JB> got a correct copy of my 16-bit code in memory. Now
JB> I'm trying to get the communication working under
JB> Windows, but I'm having a problem: I'm using DPMI call
JB> 0300 with ECX set to something non-zero. This works
JB> correctly with DOS4G/W 1.95 acting as the DPMI host,
JB> but when I run it under Windows, the parms on the
JB> stack when I hit the interrupt are incorrect. I traced
JB> into VMM, and watched what it did - after going past a
JB> few billion instructions, I saw what looked like the
JB> parm copy (right number back in ECX, and a REP MOVSW),
JB> but ESI wasn't pointing to my original pre-INT 31
JB> parms. To refresh your memory, this is an extended DOS
JB> app, now running in a DOS box. Are there any known
JB> wierdnesses related to Windows' DPMI implementation
JB> and call 0300? If it makes a difference, I'm not
JB> currently locking down my app's memory, but I'm also
JB> not running Windows in VM mode.
The only difference between running the program under Windows and in DOS, is
that the DPMI services are now being provided by Windows, rather than the DOS
extender itself. I have
checked our database and did not find any known problems with DPMI 300 under
Windows.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2452. *** See also #2475.
From: Kevin Kitsemetry Rec'd
To: John Rex Msg #2465, Feb-22-94 10:47AM
Subject: debugging
JR> Am having a terrible time debugging using Watcom C/C++(32) and the
JR> new PharLap TNT dos extendder. You guys seems to have your own propriety
JR> debug data which only your linker can handle, yet i need to to use the
JR> pharlap tnt linker to get tnt to work correctly. wvideo will not debug
JR> thinks built with pharlap's linker, so it seems. I have used wvideo
JR> in the past and would like to use now, but can't get over this hurdle.
Currently we do not support debugging Pharlap TNT DOS extender executables.
You can use the WATCOM linker to create TNT exe's, you just can't use WVIDEO
to debug them as of yet. We are looking into supporting this in the future.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2453. *** See also #2477.
From: Kevin Kitsemetry Rec'd
To: John Lansdale Msg #2466, Feb-22-94 11:15AM
Subject: Compiling a resource into a DLL
JL> I'm having problems compiling a .rc file directly into an existing DLL
JL> file. The test scenario is to save the resource file out into a DLL using
JL> Borland's Resource Workshop (to create the basic DLL file), then using
JL> 'wrc' on the .rc file as such:
JL> wrc resource.rc resource.dll
JL> However, my application crashes when I access the DLL. This series of
JL> operations worked fine with Microsoft's 'rc' program which I can no
JL> longer use it since I'm running out of far memory space. Any suggestions?
How are you 'accessing' the DLL? Does it work if you create an exe? Have you
tried to create a WIN32 resource file (instead of the default WIN16)?
JL> Also, regarding the export of global variables from 32-bit NT DLLs, will
JL> this be a future capability of WATCOM-compiled DLLs or must I rewrite my
JL> code to not export variables?
There are no definite plans or dates to add this capability. I will add you
name to a list of users asking for this capability.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2454.
From: Kevin Kitsemetry Rec'd
To: Ramon Rivas Msg #2467, Feb-22-94 11:38AM
Subject: STRANGE ERROR
RR> #if 0
RR> 08/18/93
RR> #endif
RR> * The date above displays the following error message:
RR> * *
RR> *
RR> * WATCOM C32 Optimizing Compiler Version 9.5b
RR> * * Copyright by WATCOM International Corp. 1984,
RR> 1993. All rights reserved. * * WATCOM is a trademark
RR> of WATCOM International Corp. *
RR> * test.c(2): Error! E1163: Invalid octal constant
RR> * * test.c: 37 lines, 0
Sorry, this is a bug in the 'b' level compiler. You can download the
corrected compiler(s) from secret area 'scompnew',
password 'octal'.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2455. *** See also #2470.
From: Ramon Rivas Rec'd
To: Kevin Kitsemetry Msg #2470, Feb-22-94 01:05PM
Subject: STRANGE ERROR
Thanks,
Can you tell me what's happening with the Ergo problem reported in message
2369? Ramon.
*** This is a reply to #2467. *** See also #2472.
From: Patrick Lamb Rec'd
To: Kevin Kitsemetry Msg #2471, Feb-22-94 01:01PM
Subject: printf/getch/graphics?
I'm not able to get a printf to work before a call to the
graphics library. I've reduced it to the small test program shown
below. _I_ think I should be able to read "Press a key to continue:"
before the graphics call; what actually happens is that I have to press
a key, it goes and draws its line, I press another key, the screen
returns to text mode and prints out the message. IOW, the program does
wait to get the character before continuing, but my prompt is useless.
I'm using the 9.5b version with the dos4gw extender.
While this isn't an urgent problem, I would like to be able to
fix it.
Pat
#include <stdio.h>
#include <graph.h>
#include <conio.h>
#define BYTE unsigned char
main (void)
{
char ch;
printf("Press a key to continue:");
ch = getch();
/* Plot the histogram. */
_setvideomode( _VRES16COLOR );
_moveto(25,450);
_lineto(25+2*256,450);
ch = getch();
_setvideomode( _DEFAULTMODE );
}
*** See also #2473.
From: Kevin Kitsemetry Rec'd
To: Ramon Rivas Msg #2472, Feb-22-94 03:08PM
Subject: STRANGE ERROR
RR> Thanks,
RR> Can you tell me what's happening with the Ergo
RR> problem reported in message 2369? Ramon.
You can send a message to David Kennedy regarding this one. I will tell him
you have been asking about it.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2470.
From: Kevin Kitsemetry Rec'd
To: Patrick Lamb Msg #2473, Feb-22-94 03:09PM
Subject: printf/getch/graphics?
PL> I'm not able to get a printf to work before a call to the
PL> graphics library. I've reduced it to the small test program shown
PL> below. _I_ think I should be able to read "Press a key to continue:"
PL> before the graphics call; what actually happens is that I have to press
PL> a key, it goes and draws its line, I press another key, the screen
PL> returns to text mode and prints out the message. IOW, the program does
PL> wait to get the character before continuing, but my prompt is useless.
Printf() is buffered. You can set the buffer to NULL using setvbuf(),or put
in the line feed for your prompt:
printf("Press and key:\n");
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2471. *** See also #2476.
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2474, Feb-22-94 03:51PM
Subject: Watcom & SoftICE
I presume that such an announcement would show up here?
In any case, you've obviously got at least one vote for getting support
going. It might also be useful for Watcom as a way of deflecting criticism of
WVideo until the new debugger is done.
Jason
*** This is a reply to #2462. *** See also #2481.
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2475, Feb-22-94 03:54PM
Subject: DPMI call 300 under Windows
Yeah, I'm aware that under Windows, Windows' DOS extender is providing the
DPMI services - that's what seems to be making the difference.
In any case, thanks for checking the database, and I'll see if I can narrow
down what's going on.
Jason
*** This is a reply to #2464.
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2476, Feb-22-94 03:58PM
Subject: printf/getch/graphics?
I've always used fflush(stdout) whenever I wanted to make sure that something
I printed showed up.
Jason
*** This is a reply to #2473. *** See also #2482.
From: John Rex Rec'd
To: Kevin Kitsemetry Msg #2477, Feb-22-94 10:34PM
Subject: debugging
thanks for the explanation . too bad about the lack of support.
*** This is a reply to #2465.
From: Michael Mishoe Rec'd
To: Kevin Kitsemetry Msg #2478, Feb-22-94 10:44PM
Subject: DOS4GW APP / RUNNING IN OS2 DOS BOX
KEVIN,
I HAVE tried running a DOS4GW program in full screen dos box in OS2 and
I have got mixed results. One simple program runs (test1); however
a second does not, it halts on a general protection fault. I thought
it might be the memory settings so I changed them to 10240k of XMS
for the dos box. Also I can get WVIDEO to run in the dos box ;however,
when I try to run WVIDEO with my program it crashes with the following
error.
SYS2237: DosKrnl: A NPX instruction was attempted, but no NPX is
present
I thought maybe the default math lib include might be to blame so I recompiled
the program with the /fpc option in my MAKEFILE.
NEXT I tried to use the OS2 remote link approach.
I enter the following in the dos box: vdmserv /trap=rsi rmt_dbg
I enter the following in a OS2 box: wvideo -trap=vdm; rmt_dbg newapp
I get the very same error as above.
However if I do not enter the program name (newapp) the link is established
and wvideo runs fine . I get the error as son as I try to load the Program
.
I am running OS2 2.0. the program I am trying to degug in OS2 runs in
MS-DOS ok and wvideo has no problem with it in MS-DOS either.
I would appreciate any info available this problem. have a good one.
*** See also #2483.
From: Bob Stout Rec'd
To: Kevin Kitsemetry Msg #2479, Feb-23-94 12:23AM
Subject: C32_B.ZIP
The other evening, I DL'ed this file, then took a copy to the office. The
diskette got corrupted somehow along the way and I'd already (stupidly!)
deleted the original. To avoid the half hour of LD charges once again, could
you tell me once more where this available via anonymous ftp?
*** See also #2484.
From: Anthony Scian Rec'd
To: Patrick Lamb Msg #2480, Feb-23-94 09:24AM
Subject: printf/getch/graphics?
PL> I'm not able to get a printf to work before a call to the
PL> graphics library. I've reduced it to the small test program shown
PL> below. _I_ think I should be able to read "Press a key to continue:"
PL> before the graphics call; what actually happens is that I have to press
PL> a key, it goes and draws its line, I press another key, the screen
PL> returns to text mode and prints out the message. IOW, the program does
PL> wait to get the character before continuing, but my prompt is useless.
PL> I'm using the 9.5b version with the dos4gw extender.
PL> While this isn't an urgent problem, I would like to be able to
PL> fix it.
You are combining two families of functions that are not supposed to
interact with each other. If you use getch(), you should use cprintf().
If you use getchar(), you can use printf(). The fix for the case where
you want to use printf() and getch() is to fflush( stdout ) before the
getch(). You are responsible for synchronizing both input and output
when using two different families of functions (i.e., <stdio.h> and
<conio.h>).
stdout is line buffered so you would have been fine if your string
ended in a '\n'.
Anthony
PL> Pat
PL> #include <stdio.h>
PL> #include <graph.h>
PL> #include <conio.h>
PL> #define BYTE unsigned char
PL> main (void)
PL> {
PL> char ch;
PL> printf("Press a key to continue:");
******> fflush( stdout );
PL> ch = getch();
PL> /* Plot the histogram. */
PL> _setvideomode( _VRES16COLOR );
PL> _moveto(25,450);
PL> _lineto(25+2*256,450);
PL> ch = getch();
PL> _setvideomode( _DEFAULTMODE );
PL> }
*** This is a reply to #2471.
From: Kevin Kitsemetry Rec'd
To: Jason Blochowiak Msg #2481, Feb-23-94 09:47AM
Subject: Watcom & SoftICE
JB> I presume that such an announcement would show up here?
JB> In any case, you've obviously got at least one vote
JB> for getting support going. It might also be useful for
JB> Watcom as a way of deflecting criticism of WVideo
JB> until the new debugger is done.
I am not sure which product/announcement would come first!
*** This is a reply to #2474. *** See also #2491.
From: Kevin Kitsemetry Rec'd
To: Jason Blochowiak Msg #2482, Feb-23-94 09:48AM
Subject: printf/getch/graphics?
JB> I've always used fflush(stdout) whenever I wanted to
JB> make sure that something I printed showed up.
That's fine. There are always a number of different ways
of doing things. In C, there are a number of different
ways + 1.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2476.
From: Kevin Kitsemetry
To: Michael Mishoe Msg #2483, Feb-23-94 10:00AM
Subject: DOS4GW APP / RUNNING IN OS2 DOS BOX
MM> KEVIN,
MM> I HAVE tried running a DOS4GW program in full screen dos box in OS2 and
MM> I have got mixed results. One simple program runs (test1); however
MM> a second does not, it halts on a general protection fault. I thought
MM> it might be the memory settings so I changed them to 10240k of XMS
MM> for the dos box. Also I can get WVIDEO to run in the dos box ;however,
MM> when I try to run WVIDEO with my program it crashes with the following
MM> error.
MM> SYS2237: DosKrnl: A NPX instruction was attempted, but no NPX is
MM> present
MM> I thought maybe the default math lib include might be
MM> to blame so I recompiled the program with the /fpc
MM> option in my MAKEFILE.
Try setting the DPMI_MEMORY_LIMIT to at least 8 MB. If this does not work,
tell us more about the programs that this occurs with, which version of the
compiler you are using, etc.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2478.
From: Kevin Kitsemetry
To: Bob Stout Msg #2484, Feb-24-94 11:11AM
Subject: C32_B.ZIP
BS> The other evening, I DL'ed this file, then took a copy
BS> to the office. The diskette got corrupted somehow
BS> along the way and I'd already (stupidly!) deleted the
BS> original. To avoid the half hour of LD charges once
BS> again, could you tell me once more where this
BS> available via anonymous ftp?
Sure, the ftp site is ftp-os2.cdrom.com. It may be in the incoming
directory,or it may be in pub\os2\2_x\patches.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2479. *** See also #2492.
From: David Kennedy
To: Peter Schauer Msg #2486, Feb-23-94 10:29AM
Subject: acc. 16bit dll's too
PS> Internal Report #17054
PS> I have some trouble with accesing 16-bit code in a MSC-
PS> generated Dll too. ( MSG 1587 from Mr. Edward Palandri)
PS> I red the problem but no solution (if exist). Can you
PS> send it to me or please ship to me a additional
PS> microcode to link with my application ( there seems to
PS> be similar problems with FORTRAN ??!!?? MSG Nr.
PS> ????). With the best regards from 'good old' germany
PS> Peter
Kevin Kitsemitry is currently working on this problem, and will post a
solution if one can be found.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2352.
From: Kevin Blenkinsopp Rec'd
To: Anthony Scian Msg #2488, Feb-23-94 07:55PM
Subject: Destructors redux...
Anthony,
(nb - this mail kind of grew. please bear with me...)
(sort of related to msg 2357). The reason I noticed the original problem is
that destructors for the Window class take the window off the screen (makes
sense!) Anyway, I'd realised a while back that there was still a problem with
that (eg the window that is created to put the thrown string in doesn't
disappear, etc) but wasn't really worried about because (1) you're exiting
anyway - screw it, and (2) it's nice to be able to see what was going on (if
the destructors got called, the screen would go blank pretty quickly!).
Anyway,I got this MemCheck toy the other day (which seems pretty cool, for the
benefit of anyone just browsing the mail - it's dirt cheap too!) and it
produced for me a tregabyte log file of "no free for malloc in win.cpp(##)"
and similar errors on exit. I understand the issue with exit() being an
ordinary fn etc (now! thank you.) BUT... I took it out, so main just
terminates normally (ie runs out of closing curly braces) and the destructors
for the threads don't ... time passes as Kevin shells out for sec,
inspiration having struck... F**K!! @%##$! (I'm back, in case you hadn't
guessed) Maybe if I'd bothered writing destructors for the threads that
deleted the windows they create, I wouldn't have gone through this!
AAAAAAAAAAAAAAAAARRRRGGHHH!!!
Dammit - I'm not aborting this email now! I remember something from the
previous exchange on this topic about the pre-release b-level destroying
things when it shouldn't really have to. The bug's been there all along
(months, actually!) and .... (Sob! Sniff!)
This is good. (No, really!) The new toy is working great, I can fix this
easily, and it explains something else that's been bothering me for a while.
Of course, it also means that you're right AGAIN, which is really starting to
p*ss me off. I think I'm getting senile.
One last thing (hope you're still reading this) - remember the zero-sized
array stuff that you added for b-level? Could you let the guys at StratosWare
know that it's in there (causes untrue error message). I'll try and notify
them as well.
Well, even though you didn't have to check anything this time, my putting this
down sparked the thought that fixed the bug (that ate the house that Jack
built), so...
Thanks Again.
Kevin
*** See also #2493.
From: Jeff Petersen Rec'd
To: Kevin Kitsemetry Msg #2489, Feb-24-94 10:50AM
Subject: HIWORD signed problem
Hello,
I seem to be having a problem with the B-Level patches (I think the
unpatched version did this as well). The problem is in Windows when I do a
HIWORD of lParam and assign it to a 16 bit signed int. For example
LONG lParam;
int x = HIWORD(lParam);
If the high word of lParam is negative, it seems to do the conversion wrong. I
have tried all sort of typecasting with no luck. I can't seem to properly get
a negative number out of the HIWORD of a LONG. I am compiling with
optimization.
Jeff Petersen
*** See also #2494.
From: Jeff Petersen
To: Kim kitsemetry Msg #2490, Feb-24-94 12:07AM
Subject: switch problem
Hello,
After installing the A and B level patches, my code quit working in
several locations. The problem only occurs when optimizations are enabled and
it happens under DOS extended and Windows. When I have a switch table with
numerically adjacent case values and the optimizer changes it to a jump table,
the jump table sends the code flow off into space (causing GP's of various
kinds). For example:
switch(value)
{
case 0:
// do somthing
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
}
When compiling for optimizations if value is between 0 and 5, it will jump off
into space. One case when it happened the function was fairly simple. More
complex switch statements seem to work fine, as do switch statements with less
than 4 or so entries. I solved the problem for now simply by changing the
switch to a series of 'if' statements. My compile time options are: /3r or
/5r and /oaxt. I have not experimented with other compile time options except
/od which makes everything work fine.
Jeff Petersen 801-225-3846
*** See also #2495.
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2491, Feb-24-94 01:23AM
Subject: Watcom & SoftICE & symbols
Hmm, I presumed that (given the statements I've seen from folks here) that it
would be quicker to get a symbol translation type thingiemabob going than it
will be to get the new debugger finished & debugged.
Speaking of debugging, I seem to have gotten my INT 31h/0300h stack wierdness
under Windows narrowed down to a pretty small case. I don't know anybody in an
appropriate group inside MicroSoft to contact about this, and I'd really
rather not "front-door" this. Any suggestions for a direct contact? I have
come up with a workaround (kludge #58374 for this project), but I'd prefer to
verify that it's necessary before making the workaround permanent.
Jason
*** This is a reply to #2481. *** See also #2496.
From: Anthony Scian Rec'd
To: Kevin Blenkinsopp Msg #2493, Feb-24-94 12:19PM
Subject: Destructors redux...
KB> One last thing (hope you're still reading this) -
KB> remember the zero-sized array stuff that you added for
KB> b-level? Could you let the guys at StratosWare know
KB> that it's in there (causes untrue error message). I'll
KB> try and notify them as well.
Kevin (our sysop Kevin), will you or Roger handle this call to StratosWare?
KB> Well, even though you didn't have to check anything this time, my
KB> putting this down sparked the thought that fixed the
KB> bug (that ate the house that Jack built), so...
Let's hope that your bug fix works!
Anthony
*** This is a reply to #2488.
From: Kevin Kitsemetry Rec'd
To: Jeff Petersen Msg #2494, Feb-24-94 10:54AM
Subject: HIWORD signed problem
JP> Hello,
JP> I seem to be having a problem with the B-Level
JP> patches (I think the unpatched version did this as
JP> well). The problem is in Windows when I do a HIWORD
JP> of lParam and assign it to a 16 bit signed int. For
JP> example
JP> LONG lParam;
JP> int x = HIWORD(lParam);
JP> If the high word of lParam is negative, it seems to do
JP> the conversion wrong. I have tried all sort of
JP> typecasting with no luck. I can't seem to properly
JP> get a negative number out of the HIWORD of a LONG. I
JP> am compiling with optimization.
In Windows, HIWORD is a macro that is defined by Microsoft in one of the
Windows header files. Take a look at the definition in the header file and
see if you can determine what the problem is.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2489.
From: Kevin Kitsemetry Rec'd
To: Jeff Petersen Msg #2495, Feb-24-94 11:06AM
Subject: switch problem
JP> Hello,
JP>
JP> After installing the A and B level patches, my
JP> code quit working in several locations. The problem
JP> only occurs when optimizations are enabled and it
JP> happens under DOS extended and Windows. When I have a
I was not able to reproduce this here with the 'b' level
patches applied. Run techinfo to make sure that the patches have been applied
properly. If they have, I will need a
working example that I can use to reproduce the problem.
Include a makefile and a readme file and zip it together.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2490. *** See also #2522.
From: Kevin Kitsemetry Rec'd
To: Jason Blochowiak Msg #2496, Feb-24-94 11:09AM
Subject: Watcom & SoftICE & symbols
JB> Hmm, I presumed that (given the statements I've seen
JB> from folks here) that it would be quicker to get a
JB> symbol translation type thingiemabob going than it
JB> will be to get the new debugger finished & debugged.
The more you nag Numega for support, the quicker it will happen. They are
basically waiting until they have sufficient requests to support the WATCOM 32-
bit compiler.
JB> Speaking of debugging, I seem to have gotten my INT 31h/0300h stack
JB> wierdness under Windows narrowed down to a pretty
JB> small case. I don't know anybody in an appropriate
JB> group inside MicroSoft to contact about this, and I'd
JB> really rather not "front-door" this. Any suggestions
JB> for a direct contact? I have come up with a workaround
JB> (kludge #58374 for this project), but I'd prefer to
JB> verify that it's necessary before making the
JB> workaround permanent.
If you have a small example, you can upload it here. Make sure you include a
readme file and a makefile. Once I have had a chance to look at it, I can
make sure that it goes to the
appropriate person.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2491. *** See also #2498.
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2498, Feb-24-94 03:26PM
Subject: Watcom & SoftICE & symbols
Ok, I'll nag the folks at NuMega, and get the other folks for whom this would
be useful to nag 'em as well.
I'll package my DPMI 0300 problem up, and upload it here.
Thanks,
Jason
*** This is a reply to #2496.
From: Thomas B. Pollard Rec'd
To: Kevin Kitsemetry Msg #2499, Feb-24-94 04:01PM
Subject: SSCANF triggering nullp error in 1.95
TO Watcom 519-747-4971
FROM Tom Pollard 617-275-0100 Ex127
SSCANF triggering nullp error in 1.95
|
When set DOS4G=NULLP I will get the null pointer while running the
1.95 DOS4GW.EXE. This was compiled under 9.5B
|
(test.c)
#include <stdio.h>
main()
{
char dummy[80];
short sampleNumber=0,rdfNumber=0,drNumber=0,daNumber=0;
strcpy(dummy,"2.2");
sscanf(dummy,"%hd.%hd.%hd.%hd",
sampleNumber,rdfNumber,drNumber,daNumber);
printf("buff = %d %d %d %d\n"
,sampleNumber,rdfNumber,drNumber,daNumber);
}
Has far as I can tell from the WATCOM C Library manual it leagal to
send sscanf a shorter string then what you have for a "format". It would just
return a EOF
*** See also #2503.
From: Jason Blochowiak Rec'd
To: Kevin Kitsemetry Msg #2500, Feb-24-94 04:32PM
Subject: DPMI 0300 problem
Hi. I just uploaded WINDPMI.ZIP to file area 12 - it contains the DPMI 0300
test program. Lemme know how it goes...
Thanks,
Jason
*** See also #2514.
From: Ed Peddycoart
To: All Msg #2501, Feb-24-94 08:05PM
Subject: Inline Assembly Help Request
HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP!
HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP!
I need some help in recoding a function. The function was originally written
using Borland C++ 3.1. In fact, I downloaded this code from the Borland BBS.
I have since decided to use Watcom C/C++ 32 and I am unsure how to recode this
function using Watcom's inline assembly capability. I am not an assembly
language programmer, but I do have some knowledge of assembly, although this
knowledge is limited. I would like to recode this function using inline
assembly. (Which I have tried...but I am running short of time). If this
cannot be done using inline assembly, I will need to write it as separate
linkable assembly file. The problem with the latter option is I do not know
assembly well enough to write an assembly function, including the overhead,
that I link with my C code.
Can someone please help me?
The function I need help with is putRow(...). I am generating real-time
animation (30 Hz) from digitized images stored on my hard disk. Therefore, I
need to be able to display images as fast as possible. I will be using
320x200 VGA mode. I believe the fast way to display these images is to write
them directly to video RAM. These images are 128x128 so I cannot simply move
the entire image to 0xA000:0000 with one copy. I must move one row at a time.
The putRow function I have works great, ( I can animate at higher rates than
30 Hz) but, once again, it is written for Borland C++, and I need help
converting it.
Any help would be appreaciated.
One restriction is that I need to be able to compile using the flat memory
model.
I am using a Compaq 486DX2/66 ProSignia, with DOS 6.2 and Watcom C/C 32 9.5
Patch Level B.
*/
=============================================================================
/* The following is the function I need to re-code */
#include <DOS.H>
int rowOffset[200]; /* this holds the position from the beginning of
the video RAM at which each row starts.
Row 0 starts at rowOffset[0],
Row 1 starts at rowOffset[1],
.
.
.
Row 199 starts at rowOffset[199];
rowOffset[i] = 320 * i;*/
/*
putRow places one row of image data, pointed to by data, of length,
len, at (x,y). It was written using Borland C++ 3.1. This uses
video mode 0x13. rowOffset is an array of offsets to allow
placement of rows which are less than 320 bytes in length. */
void putRow(unsigned x, unsigned y, char far *data, unsigned len){
_ES = 0xA000;
_DI = x + rowOffset[y];
_SI = FP_OFF(data);
_AX = FP_SEG(data);
asm{
push ds
mov ds, ax
mov cx, len
cld
rep movsb
pop ds
}
}
==============================================================================
I have coded the following:
void putRow(unsigned, /* 0xA000 - passed into ES */
unsigned, /* x + rowOffset[y] - passed into di */
unsigned, /* FP_OFF(data) - passed into si */
unsigned, /* FP_SEG(data) - passed into ax */
unsigned); /* length - passed into cx */
#pragma aux putRow = \
"push ds", \
"mov ds, ax", \
"cld", \
"rep movsb", \
"pop ds", \
parm [es][di][si][ax][cx] ;
When I try to compile (wcl386 /l=dos4g filename.c) the program containing
this function I get the following message.
gr.c(113): Error! E1122: Illegal register modified by 'putRow' #pragma
If I try to recompile using the small memory model
wcl386 /ms /k81920 /l=dos4g filename.c)
^
|____ To avoid stack overflow
and run the executable I get the following messages when call putRow...
DOS/4GW error (2001): exception 0Dh (general protection fault)
at 148:0033C083
TSF32: prev_tsf32 5130
SS 150 DS 150 ES 150 FS 0 GS 20
EAX 150 EBX 100 ECX FFFF EDX 150
ESI A000 EDI 0 EBP F9FF ESP 36E14C
CS:IP 148:0033C083 ID 0D COD 33A000 FLG 10246
CS= 148, USE32, page granular, limit FFFFFFFF, base 0, acc CF9B
SS= 150, USE32, page granular, limit FFFFFFFF, base 0, acc CF93
DS= 150, USE32, page granular, limit FFFFFFFF, base 0, acc CF93
ES= 150, USE32, page granular, limit FFFFFFFF, base 0, acc CF93
FS= 0, USE16, byte granular, limit 0, base 13, acc 0
GS= 20, USE16, byte granular, limit FFFF, base D270, acc 93
CR0: PG:0 ET:1 TS:0 EM:0 MP:0 PE:1 CR2: 0 CR3: 0
Crash address (unrelocated) = 1:00000083
Can someone please help me?
Any help would be appreaciated.
HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP!
HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP! HELP!
*** See also #2502.
From: Jason Blochowiak Rec'd
To: Ed Peddycoart Msg #2502, Feb-24-94 11:12PM
Subject: Inline Assembly Help Request
Well, for what you're doing you don't really need inline assembly. Something
like:
void putRow(int x,int y,char *data,int len)
{
memcpy(((char *)0xa0000) + x + rowOffset[y],data,len);
}
should do the trick. Btw, if speed is really an issue, a REP MOVSW is likely
to perform substantially better on a large number of video cards as compared
to a REP MOVSB. If you're only dealing with a 128x128 image, though, I
wouldn't worry about it.
This function won't deal with far data, but if you're only dealing with flat
model stuff, that shouldn't be an issue.
Jason
*** This is a reply to #2501.
From: Anthony Scian Rec'd
To: Thomas B. Pollard Msg #2503, Feb-25-94 10:13AM
Subject: SSCANF triggering nullp error in 1.95
TBP> TO Watcom 519-747-4971
TBP> FROM Tom Pollard 617-275-0100 Ex127
TBP> SSCANF triggering nullp error in 1.95
TBP> |
TBP> When set DOS4G=NULLP I will get the null pointer while running the
TBP> 1.95 DOS4GW.EXE. This was compiled under 9.5B
TBP> |
TBP> (test.c)
TBP> #include <stdio.h>
TBP> main()
TBP> {
TBP> char dummy[80];
TBP> short sampleNumber=0,rdfNumber=0,drNumber=0,daNumber=0;
TBP> strcpy(dummy,"2.2");
TBP> sscanf(dummy,"%hd.%hd.%hd.%hd",
TBP> sampleNumber,rdfNumber,drNumber,daNumber);
TBP> printf("buff = %d %d %d %d\n"
TBP> ,sampleNumber,rdfNumber,drNumber,daNumber);
TBP> }
TBP> Has far as I can tell from the WATCOM C Library manual it leagal to
TBP> send sscanf a shorter string then what you have for a
TBP> "format". It would just return a EOF
Assuming you didn't make a mistake typing this in, you forgot to pass the
addresses of the variables you want scanf to set for you. Since you set them
to 0, you got a NULL access error.
*** This is a reply to #2499. *** See also #2513.
From: Anthony Scian Rec'd
To: Ed Peddycoart Msg #2504, Feb-25-94 10:16AM
Subject: Inline Assembly Help Request
EP> I have coded the following:
EP> void putRow(unsigned, /* 0xA000 - passed into ES */
EP> unsigned, /* x + rowOffset[y] - passed into di */
EP> unsigned, /* FP_OFF(data) - passed into si */
EP> unsigned, /* FP_SEG(data) - passed into ax */
EP> unsigned); /* length - passed into cx */
EP> #pragma aux putRow = \
EP> "push ds", \
EP> "mov ds, ax", \
EP> "cld", \
EP> "rep movsb", \
EP> "pop ds", \
EP> parm [es][di][si][ax][cx] ;
Use movsw instead of what Borland used:
void putRow( void *, void *, unsigned );
#pragma aux putRow = \
"shr ecx,1" \
"rep movsw" \
"adc ecx,ecx" \
"rep movsb" \
parm [edi] [esi] [ecx];
...
putRow( 0xA0000 + x + rowOffset[y], data, len );
If you know len is divisible by 2, use
#pragma aux putRow = \
"rep movsw", \
parm [edi] [esi] [ecx];
...
putRow( 0xA0000 + x + rowOffset[y], data, len >> 1 );
If you know len is divisible by 4, use
#pragma aux putRow = \
"rep movsd", \
parm [edi] [esi] [ecx];
...
putRow( 0xA0000 + x + rowOffset[y], data, len >> 2 );
*** This is a reply to #2501.
From: David Hewitt
To: Watcom Msg #2505, Feb-28-94 10:10AM
Subject: Bug Report (1 of 3)
KK> Internal Report #18708
/* WATBUG1.C Feb 19, 1994
*
* Two bugs where compiler FAILS TO DIAGNOSE ERROR and one header glitch.
*
* Header Glitch:
* write() in io.h needs to have 'const' attrib added to void pointer
*
* BUGS:
*
* 1) the compiler FAILS to WARN about y->bug[0] assignement
*
* 2) the compiler FAILS to WARN about the uninitialized
* variable 'i' in the line 'if (t != r->z[i].t)'
*
* Tested with 9.5b patches using the command line
* wcc386 /W4 watbug1.c
*
* David Hewitt,
* Edbro Software Inc.
* (416) 364-3711
*/
struct FOO
{
int ok;
int bug[5];
int * notbug;
};
void bug1(const struct FOO * y)
{
y->notbug[0] = 0; /* ok, compiler thinks bitwise 'const'ness */
y->bug[0] = 0; /* BUG, compiler accepts without warning */
y->ok = 0; /* ok, compiler warns of assign to const */ }
struct S1
{
struct
{
int t;
} z[30];
};
void foobar(
struct S1 * r,
int t
)
{
int i;
int row;
/* if this code is removed, compiler sees unitialized 'i' */
row = 1;
if (row > 1)
return;
if (t != r->z[i].t)
return;
/* move them all down one */
for (i = 1; i < 5; i++)
r->z[i - 1].t = 0;
}
From: David Hewitt
To: Watcom Msg #2506, Feb-25-94 05:06PM
Subject: Bug Report (2 of 3)
/* WATBUG2.C Feb 19, 1994
*
* Compiler Parse/Code Generation BUG.
*
* Constants 1e300 or cause execution errors. When 1e300 is generated
* by multiplication, the code seems to work
*
* In the program below, various cases are shown. No output is generated
* for a correctly executing program. The results from 9.5b are:
*
* Under released version, the program executes correctly
* >> DOS/4GW Protected Mode Run-time Version 1.9
* >> Copyright (c) Rational Systems, Inc. 1990-1993
* >> Test Completed
*
* Under 9.5a and 9.5b the program fails
* >> DOS/4GW Protected Mode Run-time Version 1.95
* >> Copyright (c) Rational Systems, Inc. 1990-1993
* >> Test 4 failed
* >> Test 5 failed
* >> Test Completed
*
* >> DOS/4GW Protected Mode Run-time Version 1.95
* >> Copyright (c) Rational Systems, Inc. 1990-1993
* >> Test 4 failed
* >> Test 5 failed
* >> Test Completed
*
*
* David Hewitt
* (416) 364-3711
* Edbro Software Inc.
*
* Compiled with wcl386 /mf /d2 watbug2.c
*/
#include <math.h>
#include <stdio.h>
double foo2 = 1e200 * 1e100;
#define FOO3 (1e200 * 1e100)
double foo4 = 1e300;
void main(void)
{
double testval = 60.0;
if (testval >= 9.99999e299)
printf( "Test 1 failed\n" );
if (testval >= foo2)
printf( "Test 2 failed\n" );
if (testval >= FOO3)
printf( "Test 3 failed\n" );
if (testval >= foo4)
printf( "Test 4 failed\n" );
if (testval >= 1e300)
printf( "Test 5 failed\n" );
printf( "Test completed\n" );
} /* main() */
*** See also #2555.
From: David Hewitt
To: Watcom Msg #2507, Feb-25-94 05:07PM
Subject: Bug Report
/* WATBUG3.C Feb 25, 1994
*
* BUG. When an EXE is run in a directory whose full path is
* too long, the WRONG exe name will be reported in 'argv[0]'
*
* The following batch file will demonstrate the problem:
*
* >>> @echo off
* >>> wcl386 /mf /l=dos4g watbug3.c
* >>>
* >>> mkdir \12345678
* >>> copy watbug3.exe \12345678\.
* >>>
* >>> mkdir \12345678\a
* >>> copy watbug3.exe \12345678\a\.
* >>>
* >>> mkdir \12345678\abcd
* >>> copy watbug3.exe \12345678\abcd\.
* >>>
* >>> \12345678\watbug3
* >>> \12345678\a\watbug3
* >>> \12345678\abcd\watbug3
*
* Results:
*** This is correct ***
DOS/4GW Protected Mode Run-time Version 1.95
Copyright (c) Rational Systems, Inc. 1990-1993
argv[0]=C:\12345678\WATBUG3.EXE
*** This is correct ***
DOS/4GW Protected Mode Run-time Version 1.95
Copyright (c) Rational Systems, Inc. 1990-1993
argv[0]=C:\12345678\A\WATBUG3.EXE
>>>>> *** This is WRONG *** <<<<<
DOS/4GW Protected Mode Run-time Version 1.95
Copyright (c) Rational Systems, Inc. 1990-1993
argv[0]=G:\WC9.5B\BIN\dos4gw.exe
>>>>> *** ^^^^^^^^^^^^^^^^^ <<<<<
*/
#include <stdio.h>
int main(
int argc,
char * argv[]
)
{
int i;
for (i = 0; i < argc; i++)
printf( "argv[%d]=%s\n", i, argv[i] );
} /* main() */
From: Patrick Lamb Rec'd
To: Anthony Scian Msg #2508, Feb-24-94 04:59PM
Subject: printf/getch/graphics?
AS> You are combining two families of functions that are not supposed to
AS> interact with each other. If you use getch(), you should use cprintf().
AS> If you use getchar(), you can use printf().
Charlie Brown should have helped invent C. Then we would have a special
function
void ARRRRRRRRGGGHHH (void)
for cases of missing brain bytes. Thanks for reminding me!
Pat
From: Joseph Molnar Rec'd
To: David Kennedy Msg #2509, Feb-28-94 10:17AM
Subject: Hello ... I have a PROBLEM
This is the fourth message I have posted about this problem and yet I haven't
heard a response back yet. The only one I did get wasn't about what I was
referring to.
I AM HAVING A PROBLEM WITH TOKEN PASTING. THE FOLLOWING CODE DOESN'T WORK!
#define TEXT( x ) L##x
THIS SHOULD GENERATE TEXT STRINGS OF TYPE LONG CHAR, BUT IT IS NOT!
According to the SDK this is how you should encode strings if you wish to
change back and forth between UNICODE and char's. But again, this isn't
working. Is anyone reading this? Please I need a response back since a
product is depending on this, I will either be switching to C8 or knowing what
is happening here, use Watcom.
Also: Does your Resource Compiler for NT read the NT extensions for resources?
One more thing I got the following warning:
e:\source\lexical\relex\cpp\relex.cpp(548): Warning! W389: (col 84) integral
value may be truncated during assignment or initialization
on the following code:
typeEscapeValue = ( typeEscapeValue << 4 ) + ( ( typeChar - CHAR_A ) + 10 );
typeEscapeValue is a BYTE& (note: BYTE is a macro for unsigned char) typeChar
is a BYTE
CHAR_A is a macro for the the letter 'A'
While I can fix the warning by putting brackets around the rvalue and then
putting a type cast to BYTE in front, but I don't understand why I would have
to here? I would think that the expression does evalue to a BYTE since all
values and variables involved are BYTE's (the values should be coerced to BYTE
by the compiler without warnings as well). This is not really a problem, but
I was curious ... the only thing I could think of was the fact that the shift
could chop off some bits. Just curious.
Thanks
Joseph
*** See also #2518.
From: Matt Howard
To: All Msg #2510, Feb-26-94 02:43PM
Subject: debugger problems
I've got a graphics app that needs some files that are assembled by Turbo
Assembler. I've gotten the compiler and linker to work, but I have no idea how
to get the right debug info in those files so I can use WVIDEO. I tried using
TOWV.EXE but it said the object files were not in the correct format (I no
they have the debug info since I compiled with tasm /zi). Actually this
wouldn't be that bad on its own. What is ridiculous is that I can't get any
executables with more than one .cpp file to show up in the debugger, even
though I'm using the -d2 compiler option and the DEBUG ALL linker option. Why
is this?
No offense, but though I really like your compiler, but this debugger is
impossible. I don't care how many powerful options it may have, but they're
all useless if I can't even get my source files to show up. At this point,
I've resorted to compiling all my files with the Borland compiler, and
debugging with Turbo Debugger, even though my assembly files won't work in
real mode. At least I can see my source and set breaks and watches easily.
Then I recompile with Watcom and just hope for the best. There must be an
easier method!
Thanks in advance.
*** See also #2515.
From: John Miles Rec'd
To: Kevin Kitsemetry Msg #2511, Feb-27-94 05:06PM
Subject: Patch application error
When installing the B-level patches, the following occurred when trying
to modify several .lib files:
Patching r:\shared\tools\wat95b\lib386\math387s.lib
WATCOM Library Manager Version 3.0
Copyright by WATCOM International Corp. 1998, 1993. All rights reserved.
WATCOM is a trademark of WATCOM International Corp.
Error! Expected '<module_name>'
in '-<module_name>'
but found '<eol>'.
Am I hosed?
Also, I had previously modified my WLSYSTEM.LNK file to support
Flashtek builds. This caused the patch utility to complain that it
wasn't the correct size. Can you e-mail me a list of changes to
WLSYSTEM.LNK under the B patches, so that I can apply them manually
and avoid trouble later?
-- john
*** See also #2516.
From: Markus Nordenstam
To: All Msg #2512, Feb-28-94 06:53AM
Subject: 3D graphics
Does anyone know of a powerful 3D graphics library for the Watcom C++32
compiler (or any other 32-bit compiler) that does texture mapping, physics and
such things. (i.e., a Wolfenstein 3D-Ultima Underworld-DOOM type of engine?)
How much does it cost and who makes it?
Any reply is greatly appreciated.
*** See also #2517.
From: Thomas B. Pollard Rec'd
To: Anthony Scian Msg #2513, Feb-28-94 08:28AM
Subject: SSCANF triggering nullp error in 1.95
TO Watcom 519-747-4971
FROM Tom Pollard 617-275-0100 Ex127
SSCANF triggering nullp error in 1.95
|
I am sorry, you are right. The original program was using pointers
and I simplified it so I could report the error but I forgot to change
the call.
|
What I found out, is that the original program was not testing
for the string being null so the nullp pointer error would be
triggered inside SSCANF at that point, and not on the passed variables.
|
Sorry about the faults alarm, and thanks.
*** This is a reply to #2503.
From: Kevin Kitsemetry Rec'd
To: Jason Blochowiak Msg #2514, Feb-28-94 10:00AM
Subject: DPMI 0300 problem
JB> Hi. I just uploaded WINDPMI.ZIP to file area 12 - it
JB> contains the DPMI 0300 test program. Lemme know how it
JB> goes...
I will take a look at, thanks. This is now incident number 18703.
Kevin
*** This is a reply to #2500.
From: Kevin Kitsemetry Rec'd
To: Matt Howard Msg #2515, Feb-28-94 10:20AM
Subject: debugger problems
MH> I've got a graphics app that needs some files that are assembled by
MH> Turbo Assembler. I've gotten the compiler and linker
MH> to work, but I have no idea how to get the right debug
MH> info in those files so I can use WVIDEO. I tried using
MH> TOWV.EXE but it said the object files were not in the
MH> correct format (I no they have the debug info since I
MH> compiled with tasm /zi). Actually this wouldn't be
MH> that bad on its own. What is ridiculous is that I
MH> can't get any executables with more than one .cpp file
MH> to show up in the debugger, even though I'm using the -
MH> d2 compiler option and the DEBUG ALL linker option.
Is /zi line number information, or full symbolic information? If you assemble
with line number information it should work,without having to convert it.
When using the compiler and
linker, make sure that DEBUG ALL is the very first linker
directive that you specify.
MH> No offense, but though I really like your compiler, but this debugger is
MH> impossible. I don't care how many powerful options it
MH> may have, but they're all useless if I can't even get
MH> my source files to show up. At this point, I've
MH> resorted to compiling all my files with the Borland
MH> compiler, and debugging with Turbo Debugger, even
MH> though my assembly files won't work in real mode. At
MH> least I can see my source and set breaks and watches
MH> easily. Then I recompile with Watcom and just hope for
MH> the best. There must be an easier method!
Coming soon is a new GUI version of the debugger. It has been totally
revamped and should make things a lot better for its users.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2510. *** See also #2548.
From: Kevin Kitsemetry Rec'd
To: John Miles Msg #2516, Feb-28-94 10:26AM
Subject: Patch application error
JM> When installing the B-level patches, the following occurred when trying
JM> to modify several .lib files:
JM>
JM> Patching r:\shared\tools\wat95b\lib386\math387s.lib
JM> WATCOM Library Manager Version 3.0
JM> Copyright by WATCOM International Corp. 1998, 1993. All rights reserved.
JM> WATCOM is a trademark of WATCOM International Corp.
JM> Error! Expected '<module_name>'
JM> in '-<module_name>'
JM> but found '<eol>'.
JM>
JM> Am I hosed?
I believe you are. Can you re-install the compiler and apply the patches
again? Check and make sure that the C32_B.ZIP file and the 3m87rl.b file are
the correct sizes first.
(they are 4608 and 1551419 resp'ly).
JM> Also, I had previously modified my WLSYSTEM.LNK file to support
JM> Flashtek builds. This caused the patch utility to complain that it
JM> wasn't the correct size. Can you e-mail me a list of changes to
JM> WLSYSTEM.LNK under the B patches, so that I can apply them manually
JM> and avoid trouble later?
You should back the files up just for this reason!!!
Here is the file:
# example linker initialization file.
system begin dos
libpath %WATCOM%\lib286
libpath %WATCOM%\lib286\dos
format dos ^
end
system begin dos4g
option osname='Rational Systems'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\dos
op stub=wstub.exe
format os2 le
end
system begin pharlap
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\dos
format phar ^
end
system begin ergo
option osname='Ergo'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\dos
format phar ^
end
system begin win386
option osname='Windows 32-bit'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\win
disable 62 # export and import not valid warning.
format phar rex
end
system begin os2
option osname='OS/2 16-bit'
libpath c:\os2
libpath %WATCOM%\lib286
libpath %WATCOM%\lib286\os2
format os2 ^
end
system begin windows
option osname='Windows 16-bit'
libpath %WATCOM%\lib286
libpath %WATCOM%\lib286\win
library windows
option stack=8k, heapsize=1k
format windows ^
end
system begin os2v2
option osname='OS/2 32-bit'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\os2
libpath %TOOLKIT%\os2lib
format os2 lx ^
end
system begin os2v2_pm
option osname='OS/2 32-bit presentation manager'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\os2
libpath %TOOLKIT%\os2lib
format os2 lx pm ^
end
system begin novell
format novell ^
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\netware
module clib
import @%WATCOM%\novi\clib.imp
end
system begin netware
format novell ^
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\netware
module clib
import @%WATCOM%\novi\clib.imp
end
system begin ads
option osname='AutoCAD Devlopment System'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\dos
libfile adsstart
format phar ext ^
end
system begin eadi
option osname='emulation AutoCAD Device Interface'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\dos
libfile adiestrt
format phar ext ^
end
system begin fadi
option osname='floating point AutoCAD Device Interface'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\dos
libfile adifstrt
format phar ext ^
end
system begin com
option osname='DOS .COM'
libpath %WATCOM%\lib286
libpath %WATCOM%\lib286\dos
libfile cstart_t
format dos com
end
system begin codebuilder
option osname='Codebuilder'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\dos
format phar rex
end
system begin qnx
option osname='QNX 16-bit'
libpath %WATCOM%\lib286
libpath %WATCOM%\lib286\qnx
format qnx
end
system begin qnx386
option osname='QNX 32-bit'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\qnx
format qnx ^
end
system begin penpoint
option osname=Penpoint
libpath %PENPOINT_PATH%\sdk\lib
format os2 le ^
end
system begin nt
option osname='Windows NT character-mode'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\nt
format windows nt ^
runtime console
end
system begin tnt
option osname='Phar Lap TNT dos style'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\dos
format windows nt tnt ^
runtime dosstyle
end
system begin nt_win
option osname='Windows NT windowed'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\nt
format windows nt ^
end
system begin nt_dll
option osname='Windows NT'
libpath %WATCOM%\lib386
libpath %WATCOM%\lib386\nt
format windows nt dll ^
end
*** This is a reply to #2511.
From: Kevin Kitsemetry
To: Markus Nordenstam Msg #2517, Feb-28-94 10:31AM
Subject: 3D graphics
MN> Does anyone know of a powerful 3D graphics library for
MN> the Watcom C++32 compiler (or any other 32-bit
MN> compiler) that does texture mapping, physics and such
MN> things. (i.e., a Wolfenstein 3D-Ultima Underworld-DOOM
MN> type of engine?)
You can take a look at some of the ISV's in file area 8.
Perhaps one of the companies in there can help out. There
are probably others available, they just haven't notified us of their support
for our compiler.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2512.
From: Anthony Scian Rec'd
To: Joseph Molnar Msg #2518, Feb-28-94 11:56AM
Subject: Hello ... I have a PROBLEM
JM> This is the fourth message I have posted about this
JM> problem and yet I haven't heard a response back yet.
JM> The only one I did get wasn't about what I was
JM> referring to.
JM> I AM HAVING A PROBLEM WITH TOKEN PASTING. THE
JM> FOLLOWING CODE DOESN'T WORK!
JM> #define TEXT( x ) L##x
JM> THIS SHOULD GENERATE TEXT STRINGS OF TYPE LONG CHAR, BUT IT IS NOT!
JM> According to the SDK this is how you should encode strings if you wish
JM> to change back and forth between UNICODE and char's.
JM> But again, this isn't working. Is anyone reading
JM> this? Please I need a response back since a product
JM> is depending on this, I will either be switching to C8
JM> or knowing what is happening here, use Watcom.
This has been fixed in the next patch level (C).
JM> One more thing I got the following warning:
JM> e:\source\lexical\relex\cpp\relex.cpp(548): Warning!
JM> W389: (col 84) integral value may be truncated during
JM> assignment or initialization
JM> on the following code:
JM> typeEscapeValue = ( typeEscapeValue << 4 ) + ( (
JM> typeChar - CHAR_A ) + 10 );
JM> typeEscapeValue is a BYTE& (note: BYTE is a macro for
JM> unsigned char) typeChar is a BYTE
JM> CHAR_A is a macro for the the letter 'A'
JM> While I can fix the warning by putting brackets around the rvalue and
JM> then putting a type cast to BYTE in front, but I don't
JM> understand why I would have to here? I would think
JM> that the expression does evalue to a BYTE since all
JM> values and variables involved are BYTE's (the values
JM> should be coerced to BYTE by the compiler without
JM> warnings as well). This is not really a problem, but
JM> I was curious ... the only thing I could think of was
JM> the fact that the shift could chop off some bits.
Everything gets promoted to an int and the compiler has no way of knowing what
the runtime values of variables are going to be. Wrap the entire expr with a
BYTE( expr ).
Anthony
*** This is a reply to #2509. *** See also #2520.
From: Joseph Molnar Rec'd
To: Anthony Scian Msg #2520, Feb-28-94 02:17PM
Subject: Thanks
Thanks for your replay, but when do you expect the C level patches to be out.
We would really like this problem fixed by tomorrow. I know that seems a
short time away, but I posted my first message about the same time the b-level
patches came and you were my first response. Is it in anyway possible that I
could get a patch to just this problem. C8 is currently our only other
alternative, and it doesn't have template support (something I am using a lot,
and most template pre-processors are garbage). We are trying to put a beta
out of the product by the end of this week, so we have to intergrate our code
sometime between now and then, I like WatcomC++ much better than MSC8 (not
just because of the template support either), and the token pasting problem is
smaller than the template problem, so we would prefer to use Watcom for
obvious reasons.
A couple more questions:
1) I mentioned the resource compiler earlier, do you know if it supports NT
specific features?
2) Is the run-time check facility being planned for a near release of Watcom
C++?
3) Are Alpha or MIPS version of the compiler expected for NT? I know this is
a big one since your entire back-end would have to change.
4) When should we expect the new debugger and IDE?
I had one other, but I can't recall currently. Thanks for the help and if you
could get a patch for the token paste problem would we be EXTREMELY happy
<GRIN>.
Joseph
*** This is a reply to #2518. *** See also #2540.
From: Jeff Petersen
To: Kevin Kitsemetry Msg #2522, Mar-01-94 03:21PM
Subject: switch problem
KK> Internal Report #18932
Kevin,
I was unable to reproduce the problem in a simple situation, however, I
have uploaded my source file that is causing the problem as well as a wdisasm
listing of the .obj. As I noted in the included readme file, it appears that
the compiler is creating a jump table, but then forgetting to include the jump
table data in the .obj. You will find the upload under the name COMCOVER.ZIP
Jeff
*** This is a reply to #2495.
From: David Kennedy Rec'd
To: Ramon Rivas Msg #2524, Feb-28-94 03:33PM
Subject: Ergo
RR> Hi David,
RR> Any news on that Ergo problem?
RR> Ramon.
The problem of debugging Ergo applications is still being looked into.
David Kennedy
WATCOM Languages Support
*** This is a reply to #2456.
From: Kevin Blenkinsopp Rec'd
To: Kevin Kitsemetry Msg #2526, Feb-28-94 07:19PM
Subject: DPMI 800
Kevin,
I noticed recently that somebody else had the same problem that I did with
accessing memory WAAAY up there. I can't remember his nameor find the message,
but 1729 has my first description of the problem in it. Could you resurrect
this please? I'd love to be able to tell you what the card I'm working with is
so that you can try and reproduce the problem, but I'm under a non-disclosure
right now, so I need to get an okay from them first.
Went back and search messages: Julian Ayling, 2433 & 2435. I noticed you said
you spoke to him by phone. If you have a fix or any advice, can you please
call me or post it here?
Thanks,
Kevin
*** See also #2535.
From: Michael M. McDaniel Rec'd
To: Kevin Kitsemetry Msg #2527, Mar-01-94 02:22AM
Subject: rfx traps on laptop
Hi -
I have a problem with rfx or serserve when I use it on my laptop. I have the
following laptop computer that I connect using a laplink cable to a Compaq 486
ProLinea or a clone 386/40Mhz machine. The laptop is described below.
Afterwards, the command and error condition are described as follows after the
laptop description...
Twinhead 486DX/40Mhz Subnote BIOS information
CL-GD6412 VGA BIOS Version 1.00D
Copyright 1991-1993 Cirrus Logic, Inc. All Rights Reserved. Copyright 1987-
1990 Quadtel Corp. All Rights Reserved.
6412 08/18/93
PhoenixBIOS(TM) Phoenix NoteBIOS 486/OPTi463 Version 1.03
Phoenix MISER V2.0
Copyright (C) 1985-1993 Phoenix Technologies, Ltd.
All Rights Reserved
80486 BIOS Version 1.1, 11/17/93, All Rights Reserved
Operating at 33 Mhz
TOSHIBA MK1522FCV
Databook CardTalk Bootstrap Manager V2.20.12 Aug 12, 1993
Copyright (C) Databook Incorporated 1990-93
Performing Self Test...passed
Enter password: xxx
Password OK
===========================
ON HOST DESKTOP MACHINE (this command starts ok)
[e:\] serserv
ON LAPTOP
[e:\watcom] rfx ser;1
TRAP 000D ERRCD=0000 ERACC=**** ERLIM=********
EAX=11b50000 EBX=fca70300 ECX=00000060 EDX=fff20300
ESI=fca704e6 EDI=ffffffff EBP=00005232 FLG=00012246
CS:EIP=0698:00001406 CSACC=009b CSLIM=0000299f
SS:ESP=0030:00005226 SSACC=1097 SSLIM=0000460b
DS=0690 DSACC=0093 DSLIM=0000c97b CR0=8001001b
ES=0690 ESACC=0093 ESLIM=0000c97b CR2=fff86f94
FS=0000 FSAC=**** FSLIM=********
GS=0000 GSAC=**** GSLIM=********
The system detected an internal processing
error at location ##0160:fff5fbd5-000d:9bd5
60000,9084
048600b4
Internal revision 6.540, 93/07/ 14
If I use the laptop as the server, and start serserv first on the laptop, all
appears well until I start 'rfx ser' on the desktop, and then the laptop gets
the Trap 000d error.
Any suggestions?? Twinhead phone number is 1-800-767-TWIN
As per your request,
FOLLOWS is the information from techinfo (run on the laptop, which is the
system with the problem; I have tried two different brand desktop
machines,makes no difference - even if the laptop is not connected to another
machine this trap occurs)
WATCOM's Techinfo Utility, Version 1.3
Current Time: Thu Feb 24 19:06:00 1994
WATCOM Phone: (519) 884-0702
415 Phillip St. Fax: (519) 747-4971
Waterloo, Ontario
CANADA N2L 3X2
------------------WATCOM C Environment Variables ----------------
WATCOM=<e:\watcom>
INCLUDE=<E:\WATCOM\H;E:\TOOLKIT\C\OS2H;E:\TOOLKT21\C\OS2H;E:\TOOLKT21\C\OS2H\VD
;E:\TOOLKT21\ASM\OS2INC;>
LIB=<E:\WATCOM\LIB386;E:\WATCOM\LIB286;E:\TOOLKT21\OS2LIB;>
PATH=<C:\OS2;C:\OS2\SYSTEM;C:\OS2\INSTALL;E:\WATCOM\BINB;E:\WATCOM\BINP;E:\TOOL
T21\OS2BIN;C:\;C:\OS2\APPS;C:\USR\BIN;>
File 'e:\watcom\binp\wcc.exe' has been patched to level '.a' File
'e:\watcom\binp\wcc386.exe' has been patched to level '.a' File
'e:\watcom\binp\wpp.exe' has been patched to level '.a' File
'e:\watcom\binp\wpp386.exe' has been patched to level '.a' File
'e:\watcom\binp\wvideo.exe' has been patched to level '.a' File
'e:\watcom\binb\wlink.exe' has been patched to level '.a' File
'e:\watcom\binp\wlink.exe' has been patched to level '.a' File
'e:\watcom\binb\wlib.exe' has been patched to level '.a' ------------------
WATCOM SQL Environment Variables ----------------... ERROR...WSQL environment
variable not set.
Amount of free memory 524288 bytes
OS/2 Version 20.10$$$$$$$$
------------C:\CONFIG.SYS-------------
rem call=c:\os2\cmd.exe /c c:\archive\desktop\restordk.cmd
call=c:\os2\cmd.exe /c c:\usr\bin\pswrd.exe
set ipfc=E:\TOOLKT21\IPFC;
set helpndx=EPMKWHLP.NDX
set toolkit=e:\toolkt21
set watcom=e:\watcom
set
include=E:\WATCOM\H;E:\TOOLKT21\C\OS2H;E:\TOOLKT21\C\OS2H\VDD;E:\TOOLKT21\ASM\O
2INC;set lib=E:\WATCOM\LIB386;E:\WATCOM\LIB286;E:\TOOLKT21\OS2LIB;
PROTSHELL=C:\OS2\PMSHELL.EXE
SET USER_INI=C:\OS2\OS2.INI
SET SYSTEM_INI=C:\OS2\OS2SYS.INI
SET OS2_SHELL=C:\OS2\CMD.EXE
SET AUTOSTART=PROGRAMS,TASKLIST,FOLDERS,CONNECTIONS
rem SET RUNWORKPLACE=C:\OS2\PMSHELL.EXE
rem set runworkplace=c:\os2\cmd.exe
set runworkplace=e:\src\minishel\mshell.exe
SET COMSPEC=C:\OS2\CMD.EXE
LIBPATH=.;C:\OS2\DLL;C:\OS2\MDOS;C:\;C:\OS2\APPS\DLL;C:\USR\DLL;E:\WATCOM\BINP\
LL;E:\TOOLKT21\DLL;SET
PATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\INSTALL;E:\WATCOM\BINB;E:\WATCOM\BINP;E:\TOOLK
21\OS2BIN;C:\;C:\OS2\APPS;C:\USR\BI N;
SET
DPATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\INSTALL;C:\;C:\OS2\BITMAP;C:\OS2\MDOS;C:\OS2\
PPS;SET PROMPT=$i[$c$r$f,$p]
SET HELP=C:\OS2\HELP;C:\OS2\HELP\TUTORIAL;E:\TOOLKT21\OS2HELP;SET
GLOSSARY=C:\OS2\HELP\GLOSS;
SET IPF_KEYS=SBCS
PRIORITY_DISK_IO=YES
FILES=20
DEVICE=C:\OS2\TESTCFG.SYS
rem DEVICE=C:\OS2\DOS.SYS
DEVICE=C:\OS2\PMDD.SYS
rem BUFFERS=30
buffers=20
IOPL=YES
rem DISKCACHE=128,LW,AC:Ce
rem diskcache=64,LW,AC:ce
diskcache=128,LW,32,AC:ce
MAXWAIT=3
rem maxwait=2
MEMMAN=SWAP,PROTECT
rem SWAPPATH=C:\OS2\SYSTEM 4096 6144
swappath=e:\ 2048 8192
BREAK=OFF
rem THREADS=128
threads=64
rem PRINTMONBUFSIZE=134,134,134
COUNTRY=001,C:\OS2\SYSTEM\COUNTRY.SYS
SET KEYS=ON
REM SET DELDIR=C:\DELETE,512;D:\DELETE,512;E:\DELETE,512;
rem BASEDEV=PRINT01.SYS
BASEDEV=IBM1FLPY.ADD
BASEDEV=IBM1S506.ADD
BASEDEV=OS2DASD.DMD
SET BOOKSHELF=C:\OS2\BOOK;E:\TOOLKT21\BOOK;E:\WATCOM\BINP\HELP;C:\USR\BOOK;SET
EPMPATH=C:\OS2\APPS;
DEVICE=C:\OS2\APPS\SASYNCDA.SYS
rem PROTECTONLY=NO
rem protectonly = yes disables dos and win-os/2 sessions
protectonly=yes
rem SHELL=C:\OS2\MDOS\COMMAND.COM
rem C:\OS2\MDOS FCBS=16,8
rem RMSIZE=640
rem DEVICE=C:\OS2\MDOS\VEMM.SYS
rem DOS=LOW,NOUMB
rem DEVICE=C:\OS2\MDOS\VDPX.SYS
rem DEVICE=C:\OS2\MDOS\VXMS.SYS /UMB
rem DEVICE=C:\OS2\MDOS\VDPMI.SYS
rem DEVICE=C:\OS2\MDOS\VCDROM.SYS
DEVICE=C:\OS2\APM.SYS
rem DEVICE=C:\OS2\MDOS\VAPM.SYS
rem DEVICE=C:\OS2\PCMCIA.SYS
rem DEVICE=C:\OS2\MDOS\VPCMCIA.SYS
rem DEVICE=C:\OS2\MDOS\VMOUSE.SYS
rem DEVICE=C:\OS2\POINTDD.SYS
DEVICE=C:\OS2\MOUSE.SYS
DEVICE=C:\OS2\COM.SYS
rem DEVICE=C:\OS2\MDOS\VCOM.SYS
CODEPAGE=437,850
DEVINFO=KBD,US,C:\OS2\KEYBOARD.DCP
DEVINFO=SCR,VGA,C:\OS2\VIOTBL.DCP
SET VIDEO_DEVICES=VIO_VGA
SET VIO_VGA=DEVICE(BVHVGA)
DEVICE=C:\OS2\MDOS\VVGA.SYS
SET TMP=E:\
SET PROGREF21=CPGREF1.INF+CPGREF2.INF+CPGREF3.INF
SET PMREF=PMFUN.INF+PMGPI.INF+PMHOK.INF+PMMSG.INF+PMREL.INF+PMWIN.INF+PMWKP.INF
call=c:\os2\cmd.exe
rem end config.sys
------------C:\AUTOEXEC.BAT-------------
@ECHO OFF
ECHO.
PROMPT $i$p$g
REM SET DELDIR=C:\DELETE,512;D:\DELETE,512;E:\DELETE,512;
PATH C:\OS2;C:\OS2\MDOS;C:\;
LOADHIGH APPEND C:\OS2;C:\OS2\SYSTEM
SET TMP=C:\
REM LOADHIGH DOSKEY FINDFILE=DIR /A /S /B $*
REM DOSKEY EDIT=QBASIC/EDITOR $*
REM SET DIRCMD=/A
------------------------------------------------------
A Intel 486 processor is installed in this system.
486 math coprocessor is present
Skipping math coprocessor interrupt check.
-- Michael M. McDaniel
*** See also #2536.
From: Michael M. McDaniel Rec'd
To: Kevin Kitsemetry Msg #2528, Mar-01-94 02:40AM
Subject: IBM Link386
Hi,
IBM's Link386 has a switch /RUNFROMVDM which allows a native os/2 application
to run from within an os/2 virtual dos machine. i.e. similar to an os/2 window
starting up the msdos resources when you type an msdos executable name, when
you type the os/2 program from within the vdm, the proper resources are started
and the os/2 executable runs.
QUESTION: is there some similar mechanism with the Watcom linker?
QUESTION: if not, how do I get my *.obj from the Watcom compiler to link with
Link386 ?? Link386 (so far) has wanted libraries that I don't have.
++thanks,
Michael M. McDaniel
*** See also #2537.
From: Michael M. McDaniel
To: Denis Dyack Msg #2529, Mar-01-94 02:56AM
Subject: Net Bios Help
Denis,
perhaps by now you've already seen this book, but I recommend
C Programmer's Guide to NetBIOS, IPX, and SPX
by W. David Schwaderer
published by SAMS Publishing
ISBN # 0-672-30050-8
It includes a 3.5" disk w/some sample code.
-- Michael M. McDaniel
*** This is a reply to #2004.
From: Michael M. McDaniel Rec'd
To: Kevin Kitsemetry Msg #2530, Mar-01-94 03:01AM
Subject: latest patches to v9.5 C/C++
Hi,
sorry for taking up this space - just realized I want to phone instead...
-- Michael M. McDaniel
From: Michael M. McDaniel Rec'd
To: Anthony Scian Msg #2531, Mar-01-94 03:11AM
Subject: C++9.5a bug???
Anthony, as some extra information...
I wrote and delivered a standalone industrial machine (It punched specialized
paper tapes for a loom). Anyway, the software ran on an AT. I used C++ for
the entire machine control libray (classes built upon classes, etc.).
The compiler I used was Borland C++ v3.1, and I used Turbo Vision for the
user front end.
Well, when I bought Watcom C/C++, I wanted to convert my code over. I
recompiled the machine control class libraries first. Lo and behold, I got
more than a couple of compile errors with Watcom. Being an new Watcom user,
I at first thought the compiler had problems. Upon investigating all of the
problems (2d edition of Stroustrup's 'C++ Programming Language' as the
standard) I discovered that Borland had been, shall we say, rather lenient
in compiling code that was definitely illegal. In some cases, the error
was subtle, but Watcom properly complained about things that Borland was
happy to compile.
Also, some of my own personal utilities I recompiled for OS/2 (my platform
of choice these days). HEY, the utilities worked fine under MSDOS and UNIX.
But, sometimes they had problems under OS/2. Again, when I dug out the
standard documentation (this time ANSI C), my programs were incorrect, and
the errors could have (legally) occurred on any OS. These problems were
mostly tied in with the use of *envp[], getenv(), and putenv().
So, now I double-check my language references first.
Hope this is useful...
--Michael M. McDaniel
*** This is a reply to #2088.
From: Mark Spychalla
To: Support Msg #2532, Mar-01-94 06:34AM
Subject: Internal compiler error
Hello,
The following program demonstrates an interal error under Watcom C32 for
DOS 9.5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Mark Spychalla (Email: spy@dpls.dacc.wisc.edu)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
First the techinfo for my system:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
WATCOM's Techinfo Utility, Version 1.3
Current Time: Tue Mar 1 03:54:52 1994
WATCOM Phone: (519) 884-0702
415 Phillip St. Fax: (519) 747-4971
Waterloo, Ontario
CANADA N2L 3X2
------------------WATCOM C Environment Variables ----------------
WATCOM=<C:\WATCOM\.>
INCLUDE=<C:\WATCOM\h;C:\X-32\INCLUDE;C:\FG\INCLUDE>
LIB=<c:\x-32\lib;c:\fg\lib>
PATH=<C:\X-
32\BIN;C:\WATCOM\BIN;C:\WATCOM\BINB;C:\SC\BIN;C:\DOS;C:\UTIL;C:\NU;C:\WINDOWS;C
\SPEEDRV;C:\EMX\BIN> File 'C:\WATCOM\.\bin\wcc386.exe' has not been patched
File 'C:\WATCOM\.\bin\wvideo.exe' has not been patched
File 'C:\WATCOM\.\bin\wlink.exe' has not been patched
File 'C:\WATCOM\.\binb\wlib.exe' has not been patched
------------------WATCOM SQL Environment Variables ----------------...
ERROR...WSQL environment variable not set.
Amount of extended memory is: 0K
Amount of base memory is: 640K
Amount of free base memory is: 459216 bytes
DOS Version 6.0
------------C:\CONFIG.SYS-------------
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE
BUFFERS=10
FILES=35
lastdrive=C
DEVICEHIGH=C:\DOS\SETVER.EXE
DOS=HIGH
STACKS=9,256
SHELL=C:\DOS\COMMAND.COM /E:2048 /P
BREAK=ON
rem DEVICEHIGH=C:\DOS\RAMDRIVE.SYS 512 /E
DEVICEHIGH=C:\UTIL\FASTBIOS.SYS
DEVICEHIGH=C:\UTIL\EANSI.SYS
DEVICEHIGH=C:\UTIL\AD.SYS
------------C:\AUTOEXEC.BAT-------------
rem C:\DOS\SMARTDRV.EXE
rem C:\NU\NCACHE2 INSTALL
C:\SPEEDRV\SPEEDRV /INSTALL
@ECHO OFF
PROMPT $p$g
rem SET COMSPEC=C:\DOS\COMMAND.COM
APPEND=C:\DOS
rem COPY C:\DOS\COMMAND.COM c:\ >NUL
rem Symantec C++ development stuff
rem SET INCLUDE=C:\X-
32\INCLUDE;C:\FG\INCLUDE;C:\SC\INCLUDE;C:\SC\INCLUDE\WIN16;C:\SC\INCLUDE\WIN32;
:\SC\MFC\INCLUDE rem SET LIB=C:\FG\LIB;C:\SC\LIB;C:\SC\MFC\LIB;C:\X-32\LIB
rem SET HELP=C:\SC\HELP
rem PATH C:\SC\BIN;C:\FG\BIN
rem Watcom C development stuff
path C:\X-32\BIN;C:\WATCOM\bin;C:\WATCOM\binb;C:\SC\bin
set include=C:\WATCOM\h;C:\X-32\INCLUDE;C:\FG\INCLUDE
set watcom=C:\WATCOM\.
set lib=c:\x-32\lib;c:\fg\lib
rem EMX development stuff
set C_INCLUDE_PATH=c:/emx/include
set LIBRARY_PATH=c:/emx/lib
PATH=%PATH%;C:\DOS;C:\UTIL;C:\NU;C:\WINDOWS;C:\SPEEDRV;C:\EMX\BIN SET NU=C:\NU
c:\F-PROT\VIRSTOP
c:\mouse\mouse
c:\wced\wced -aldt c:\wced\wced.ini
rem c:\UTIL\bells.com
c:\nu\ncc /set c:\nu\nu.cfg
rem set TMPDIR=d:
rem set TEMP=d:
set TMP=c:\tmp
set TEMP=c:\tmp
rem set NO87=1
rem c:\demo\univbe
rem c:\vesa\univesa
------------------------------------------------------
A Intel 486 processor is installed in this system.
486 math coprocessor is present
and Equipment Flags say math coprocessor IS present. The next test may
cause the system to hang if 486
interrupts are not handled properly.
486 interrupts are properly enabled.
------------------------------------------------------
APPEND INSTALLED
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The makefile:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bug1.obj: bug1.c
wcl386 /ore -c bug1.c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The C file (bug1.c)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
typedef struct type1{
float X, Y;
} type1;
typedef struct type2{
char c;
type1 t1;
} type2;
void proc()
{
type2 *ptr1, *ptr2;
type1 v1, v2;
float a;
char c2;
a = v1.X * v2.Y - v1.Y * v2.X;
ptr1->c = ((a > 0) == c2);
v1 = ptr1->t1;
v2 = ptr2->t1;
a = v1.X * v2.Y - v1.Y * v2.X;
ptr2->c = ((a > 0) == c2);
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The internal compiler error from the make (bug1.err):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bug1.c(23): Error! E1119: Internal compiler error 76
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I also have experienced a totally different bug with the compiler for
which I unfortunately have not been able to generate a simple C file
to demonstrate. It happens that on large executables (> .5 MEG), using
the flat memory model, and math coprocessor emulation (e.g. using
a CFLAGS = -l=X32RV /oailrmnt /oe=50 /s /fpc /zp4 ) occasionally
floating point expressions involving addition operations will have an
expressions added twice instead of only once. I am quite certain that
the C source code is correct because the correct numeric result is
generated when using the math coprocessor with the Watcom compiler or
when using either the math coprocessor or math emulation under the
Symantec C++ 6.0 compiler on the same C source tree.
May you find the above information helpful in improving your fine
compiler, and I'll try applying the latest patches and see if they fix
the bugs.
Mark Spychalla
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*** See also #2538.
From: Jim Ehrismann Rec'd
To: David Kennedy Msg #2533, Mar-01-94 01:49PM
Subject: _harderr() problem
* Original From: Chris Boogmans (1:221/186)
* Original To : David Kennedy (1:221/186)
Hi,
i am using C32 version 9.5b in a DOS+DOS/4GW environment. Following a problem
i had when installing a critical error handler using _harderr(), i had a look
at the assembly code which is called on int 24h. DOS passes a pointer to the
device header in BP:SI. The WatCom library has to convert this pointer to a
pointer in the flat model; this is the part of the WatCom lib code which should
do that (try it if BP:SI is for example = 0FFF:0010) :
sub ebx, ebx
mov bx, bp
shl ebx, 4
add bx, si ; here, the carry (if any) gets lost, RESULT = WRONG
POINTER
Could this be corrected for the c level patches ?
Thanks, Chris.
From: Jim Ehrismann Rec'd
To: David Kennedy Msg #2534, Mar-01-94 01:50PM
Subject: _harderr()
Whoops, I guess Forward is not exactly what I wanted to do. I forwarded the
previous message to you to request the fix for this as soon as possible. I
have reported problems with _harderr() in the past but never gotten a
useable solution. This may be it!
Jim
From: Kevin Kitsemetry Rec'd
To: Kevin Blenkinsopp Msg #2535, Mar-01-94 03:26PM
Subject: DPMI 800
KB> Kevin,
KB> I noticed recently that somebody else had the same
KB> problem that I did with accessing memory WAAAY up
KB> there. I can't remember his nameor find the message,
Basically, we are not aware of any problems with mapping
things WAAAY up there, so to speak. We would need an
example. Perhaps the problem can be duplicated by taking
a card such as a soundcard (relatively inexpensive)?
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2526. *** See also #2542.
From: Kevin Kitsemetry
To: Michael M. McDaniel Msg #2536, Mar-01-94 04:33PM
Subject: rfx traps on laptop
MMM> Hi -
MMM> I have a problem with rfx or serserve when I use it
MMM> on my laptop. I have the following laptop computer
MMM> that I connect using a laplink cable to a Compaq 486
MMM> ProLinea or a clone 386/40Mhz machine. The laptop is
MMM> described below. Afterwards, the command and error
MMM> condition are described as follows after the laptop
MMM> description...
Just a quick observation - you are using serserv with a
parallel cable!?!
Also, if you are in a DOS box, make sure you have the
proper session settings for direct access to the com
port.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2527.
From: Kevin Kitsemetry
To: Michael M. McDaniel Msg #2537, Mar-01-94 04:43PM
Subject: IBM Link386
MMM> Hi,
MMM> IBM's Link386 has a switch /RUNFROMVDM which allows a
MMM> native os/2 application
MMM> to run from within an os/2 virtual dos machine. i.e.
MMM> similar to an os/2 window
MMM> starting up the msdos resources when you type an
MMM> msdos executable name, when
MMM> you type the os/2 program from within the vdm, the
MMM> proper resources are started
MMM> and the os/2 executable runs.
MMM> QUESTION: is there some similar mechanism with the Watcom linker?
No, there is no such mechanism for the WATCOM linker.
MMM> QUESTION: if not, how do I get my *.obj from the
MMM> Watcom compiler to link with
MMM> Link386 ?? Link386 (so far) has wanted
MMM> libraries that I don't have.
We don't produce C-set objects and I am not sure that they
are able to link with WATCOM objects.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2528.
From: Kevin Kitsemetry
To: Mark Spychalla Msg #2538, Mar-01-94 05:16PM
Subject: Internal compiler error
MS> Hello,
MS> The following program demonstrates an interal error
MS> under Watcom C32 for
MS> DOS 9.5
MS> 'C:\WATCOM\.\bin\wcc386.exe' has not been patched
MS> File 'C:\WATCOM\.\bin\wvideo.exe' has not been patched
MS> File 'C:\WATCOM\.\bin\wlink.exe' has not been patched
MS> File 'C:\WATCOM\.\binb\wlib.exe' has not been patched
You should download the 'a' and 'b' level patches for the
C 32 for DOS compiler. You should find that the problem
has already been fixed.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2532.
From: David Hoeft Rec'd
To: David Kennedy Msg #2539, Mar-01-94 05:19PM
Subject: Problem with large bitmaps
David,
We spoke on the phone earlier today.
As agreed, I am going to upload a file called DIBBUG.ZIP which contains code
that fails when I call SetDIBitsToDevice or StretchDIBits with very large
bitmaps, over a megabyte or so. Let me know what you find out.
Thanks.
}{
*** See also #2553.
From: Anthony Scian Rec'd
To: Joseph Molnar Msg #2540, Mar-02-94 09:47AM
Subject: Thanks
JM> Thanks for your replay, but when do you expect the C level patches to be
JM> out. We would really like this problem fixed by
JM> tomorrow. I know that seems a short time away, but I
JM> posted my first message about the same time the b-
JM> level patches came and you were my first response. Is
JM> it in anyway possible that I could get a patch to just
JM> this problem. C8 is currently our only other
JM> alternative, and it doesn't have template support
JM> (something I am using a lot, and most template pre-
JM> processors are garbage). We are trying to put a beta
JM> out of the product by the end of this week, so we have
JM> to intergrate our code sometime between now and then,
JM> I like WatcomC++ much better than MSC8 (not just
JM> because of the template support either), and the token
JM> pasting problem is smaller than the template problem,
JM> so we would prefer to use Watcom for obvious reasons.
JM> A couple more questions:
JM> 1) I mentioned the resource compiler earlier, do you
JM> know if it supports NT specific features?
JM> 2) Is the run-time check facility being planned for a
JM> near release of Watcom C++?
What run-time check facility are you talking about?
This is the first I've heard of this.
JM> 3) Are Alpha or MIPS version of the compiler expected
JM> for NT? I know this is a big one since your entire
JM> back-end would have to change.
If we hired the same "great" programmers that MS hires, we
would have to recode the back end for every new release
of our compiler and every new target architecture. Fortunately,
we hire people that are smart enough to design programs to
last. This means making them general enough so that a
retarget is much less work than a rewrite. We have to
look at demand and resources before committing to new
architectures also. Taking all this together, we are
monitoring the popularity of both the MIPS and Alpha
along with the PPC. I can't say anymore.
JM> 4) When should we expect the new debugger and IDE?
Kevin should be able to answer your other questions.
You'll have to arrange with him for a special pre-release
of the C-level compiler.
*** This is a reply to #2520. *** See also #2543.
From: Kevin Kitsemetry
To: Jim Ehrismann Msg #2541, Mar-02-94 02:00PM
Subject: more _harderr()
JE> /*-
JE> FILE HARDERRX.C
JE> The following is your example provided in the WATCOM C Library manual
JE> for the _harderr() function. Using WATCOM C32 for
JE> DOS 9.5a, Phar Lap 4.1
JE> and the following compile/link/run instructions:
JE> This is as I expected. However, if the same
JE> executable is run using Phar
JE> Lap's TNT DOS Extender:
JE> tnt harderrx
JE> the following is the result:
JE> Not ready reading drive A
JE> Abort, Retry, Fail?
JE> Thus the default critical error handler has not been replaced by
JE> _harderr() as expected. It is my understanding from the Phar Lap
JE> documentation that TNT is fully compatible with RUN386 .EXP code.
I have confirmed that there appears to be a probelm in the runtime library
function in conjunction with the TNT extender. This has been corrected and
will be made available for the next level of patches to the compiler.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2229.
From: Joseph Molnar Rec'd
To: Anthony Scian Msg #2543, Mar-02-94 03:39PM
Subject: Thanks
The runtime facility I was referring to is called (I believe) RTTF. It is an
extension to C++. It allows you to (amoung other things) to query type
information. It includes definitions in a standard header for a type
structure and allows compiler dependant extensions (according to the
standard). The querying allows you to for example have a method accept a
class as an argument, and then you can query that argument for it's type to
see if it is a derived class or not. I am pretty sure the extension is called
RTTF (RunTime Type Facility).
*** This is a reply to #2540. *** See also #2545.
From: Anthony Scian Rec'd
To: Joseph Molnar Msg #2545, Mar-02-94 04:26PM
Subject: Thanks
JM> The runtime facility I was referring to is called (I believe) RTTF. It
JM> is an extension to C++. It allows you to (amoung
JM> other things) to query type information. It includes
JM> definitions in a standard header for a type structure
JM> and allows compiler dependant extensions (according to
JM> the standard). The querying allows you to for
JM> example have a method accept a class as an argument,
JM> and then you can query that argument for it's type to
JM> see if it is a derived class or not. I am pretty sure
JM> the extension is called RTTF (RunTime Type Facility).
OK, I understand now. We don't have plans to support RTTI, namespaces,and
other major new features of C++ until the first public draft passes. As it is
now, there is a good chance that the draft will be rejected by some countries
in its current state. We prefer to add major features that are supported by a
publicly available document (such as the ARM).
*** This is a reply to #2543.
From: Dan Cummins
To: Dieter Olschewski Msg #2546, Mar-02-94 05:24PM
Subject: #18884 unresolved references
It looks like the file got scrambled in the message. Could you try uploading
a .zip to the appropriate 'Problems and
Fixes' file area. Thanks.
Dan Cummins
WATCOM Languages Support
------------------------
DO> MZ)
DO> Not enough memory$inuUJ WWR+!
DO> +iNun &++8g+N3 iot+ =/.aoMX2 o+e
DO> "|+89OUOSX~#EeP(++XOg+-#H+o:a=a< u|A8oXOOe+&F+C>>bX _-
DO> r$IXe%_+f 20N++|A+^'*+H+
DO> /oO \nu+ $
DO> S/,=X/)o ++|*g\xoO
DO> ;+ +Xn ai+]-. +|/1E]} u1X+X++ - = N(X+"A+a? -+6+OX+
DO> ?.0Z}%J =^{+D+o+4+c+L+u+T+% +
DO> @2A<u? 5E
DO> } W Ho TeoZ- af+.]EfL6PQ a8K
DO> } 5<U cd* XmU3 > (Up! OiuJ*X !.Bi A -x uK +_/
DO> uo< +( 9 +/8( N8s li
DO> aX ;Q+_Cz )+z pb 6a u+ +a%1yiOY AQX +S +[A><E(p=*+| $ + XXaHOeU
DO> U /56+ +F f aa+x+ P,o Oe,], ( ,\,o+n|s+| &]&;- &\
DO> + + L+e TV`| op <9Xe\ iyo<DU+
DO> qE + "7{C
DO> +
DO> !c++ B+ +o + ep +HE1" 4i 2c o+=VC+a ect Ob O4+2=j
DO> j5+
DO> <
DO> o iXADn(oE
DO> v &/ |%^b<B2<5)y-5 #
DO> Sq ++eE }UXD +p_ XG( nQC|HYbVb<@ Eo!NF$
DO> XkO-3+#B!Ru A;
DO> }+ Dv i< U ^Bg
DO> B2 u ai[ si:Ot0OX ox p: %X>J PCP>>o jR CR ~
DO> b CA 'X x +X7d U< x<$+Tg j o&+ e O+ #++ =+ OeF
DO> %u .+v 0 o <u+1
DO> `H!k obo/e+oO +L4 u>Cu+UY#<4|
DO> + X U+ A p = ; O g
DO> (
DO> < ) &A4?
DO> =++% + e+>
DO> aN + +5'W/:ixU X p oe%+u + I, +!d 3
DO> "a
DO> aX +}
DO> 9 +oa 2u+{ =:J+J5^X
DO> )^+$;i+a+2+a
DO> z3
DO> io a ! Za\ a+ nP B, e{+p b+n*+ A4+u a uA e+ s+ /#c
DO> T+k u8c T2=-+z+i O A=YGoT |L '51 TO1(
DO> : XLf
DO> =X+ c> o ^ ( `++ga<i+LAM
DO> HX 0- el@Rl.y=A X j j(eOX+p-5N*X --Ao+ 4++h +C %+ c=
DO> |LY, 8: lye~ OO8S TX< a" =o n| F? A d XO Os a+4!-
DO> iN+ +2! yQeT ( xX+ +&$+ (< US{. eO +XyR>
DO> La+~ 8sa a9NT^W4eeC>]>C^x+ X&|:|XoL 6l-A)8N+,qW @
DO> e+ + Pb*^=u%% + n+-c u. i/b+V bi2U
DO> z +E |:ne+ dd+ 4 i*oe++/mX+u{ +a'+0+!29d
DO> G+ B/W 81e<UW
DO> a+p(%bw XsM CBuLpy% ]Z d6ny XE%b+Go|. M>o8
DO> }+= eYu) L a8x+ )
DO> O/ a+5 y. y3 feBc+ +e8C
DO> c-0du- +C{/ P
DO> +
DO> . u i; ++ g+2o. p++ ;oe++a^O+e++i6p+=+U
DO> \<+E 2A"xenU < CXs~ Eo 2y jo'X'iaa2+l+paEr+
V +>VV#%+
DO> ePAT*+NTc+XU S
DO> od \0 Oy ~2pT${< A..+euTg O +eXeB v iXA '+!-oDDP
DO> P!`Xop zL? 3 ; . iB iyo+ aofo|^SQ+ ++Ui++ +u(. N
DO> u+t ;f
DO> 1 Rug :a+` Xa XaX O2 +=+ A ! =aJ*.y8_ E++O!Q 7N#+aXE
DO> NO c ,!Y u+K B X 3bXOXo+ a9g^y#| i X g+ 1so+?Yo b
DO> l| O~5t +/ sG c.0+iA a
DO> :g ++eT 8E64I%+=R.+dO(&B =+
DO> 8u60+9+ +++o JO . .DN {=f 5 UK5+(i= iTO_ kU
DO> % ?x >
DO> [)$ja9/J+Z9i+i +.@ io4 A # @ie(i* e o+++iElX :Ou e e oe+O
DO> @ L| +OU ,o)+ Xu+
DO> wGX`d ah>&+ nia<=u+ + Xi+ n u+ +fiuZ=O {8++4
DO> ( xC| !YKU+o,amnuEJee% +e^c n~X+L qXPu 0<aY| u.|
DO> W+<|aT OBX[+Hah+
DO> z+e j+olC3 <@ H
DO> cy.+w }A{}$ye!bO Q
DO> #=(ea a+a^a+ihXu [:+
DO> +.oX g+
DO> 4/ a1a +|+ N\i + a +5o+
DO> T g+%
DO> .yii3 <+U(aX]4K@r a:)v a<<
DO> (^ >ULAO,n!zQ -.3T
DO> *w++S X%&-
DO> oa&y/;=+>i+f+7+ f ++=K SO eog
DO> p
DO> AOi dui0
DO> CFqh,sOaJ n\qa
DO> OL ?ga*A=cBu$
DO> -*q
DO> a+C] + qa. [H M u va q+,> XW i
DO> Oc+4=A+JX! g,J{ Q}
DO> gC+ IGTo|2 +Cho+%D &v D!
DO> ++ Cdaq+} |)X:X)O eu a e 8+
DO> + +ENNe7#r(N Vqiy++e pb3 ,RHRu?r +O: d=o AD+a+R +H+a + S+ (O +O)ZZ=+
DO> A FC+w>I6+Oo@ AXe v] ^+ H+
DO> .e< .' )Pe+
DO> XN,pZ>T+ S2S!o %+ R 1|b3B>uAMe+pe+Xc+%_Da o
DO> + p0)6 g/C0ET+$
PA%>>
DO> e e+ioo hah+3+To>o+oy.2* AF+ < . + /arXC+A y unv +f
DO> y ? |o X`) agOoTo
qna>/l
DO> p+b++TnD +
DO> NO4+ +\
DO> + O}|~ jK%) X>+`++!M = .v
><O > <~g,fXHXTT! v0oi +
DO> Xy a+5.
DO> E+U + QTa;=
DO> DpOi1B%gZ F+ +j)+ +q+
}o>
DO> ++e J' E 4o
DO> aObd kX+. +U <4$<X*o2X@u!u+h+u+N uX aeu)0 x;aJeo
DO> ++U. gX++ O <ub+yU+Nu[Mo
DO> < Gp
DO> +
DO> b+x_?c A:3+uX+o@C+Q Xe
DO> N+q p X2P V=bE [ e+a
DO> 6 ,
DO> }X+ X++
DO> ++ ( 2i <_u+ +X+|LDi
DO> =+c
DO> +++/+
DO> #+ #+) gA5+00<>e + + i aYg6 &N-
DO> /ir +n}. Xz$Uu a g/+l
;>.@ ub XoP ++OU Su+^e> +$pnz
DO> =+a+Coa FN}E++i+ g+++ + +a +0+O^e
DO> O B%[++
DO> i*A PCa +{*XT + op|z }N Fl ]/e + +r] TSr
DO> 2| H O]y
DO> Ne++ :+ha@o C! + I+%r/+
DO> } C tu} 'u@ A>g~
DO> ^*g
i>
DO> P+U+ r+ A+2+<
DO> uE% X ZNf 4au+`XX4$%| + !c
DO> X+ oQ +3 f Ux !!M+9+ffe+ eo-v++
DO> U cp>!Ecc eo e+z+ CSU +oNuaUa obafaED
DO> +x(Uoe+e+-+a+a+Cta| ++>XN+Ja
DO> +-na2 Cq/-eq oK(
DO> ++t
DO> b u8A +CqPE YA- e5 X+ Aia v AE
DO> +]^1 _aYXO+c-a ++ r +& aMo;>[u' >>N_)%
> y
~2e> }qouNBq0? 9;{
DO> aD8$g!+Kj)&
DO> M?fgO7 +: ?n- X< a+L
DO> J Qo
DO> <qa + T)8Y+ *+E' +XAa ~TbweX ?Jd o e + XV 5qu
DO> a+Oe+<Q#oS>z @++x >;p-iT
DO> C
DO> A+a=p+ Z+v+op Oi E oa7+rSlY +2OXE2 h
From: Scott Drysdale
To: Watcom Msg #2547, Mar-02-94 07:34PM
Subject: bug(?) & questions
hi there. the company i work for (scala, inc) is working on a project using
c++/32 (currently at version 9.5 with b level patches) running under os/2.
FIRST:
i've got a curious problem which i'll upload as scala1.zip, including some
minimal source to demonstrate the problem and a .cmd file which compiles it.
the problem concerns warning W480 (var/func has same name as class/enum XXX)
appearing if part of the definitions are in an include file and part are in a
source file.
SECOND:
what kind of magic is going on that allows things in c:\watcom\binb such as
wcc386 run under both dos and os/2 using the same executable? is such magic
available to mere mortals?
THIRD:
a selective warning-disabling option would be *EXTREMEMLY* valuable.
--Scotty
*** See also #2550.
From: Mike Johnson Rec'd
To: Kevin Kitsemetry Msg #2548, Mar-03-94 01:23AM
Subject: debugger problems
KK> Coming soon is a new GUI version of the debugger.
KK> It has been totally revamped and should make things
KK> a lot better for its users.
will it be a protected mode App so that I won't have to guess how much
/dynamic= will have to be after every re-compile? and can one pre-order the
thing?
Mike Johnson
*** This is a reply to #2515. *** See also #2551.
From: John Miles Rec'd
To: Kevin Kitsemetry Msg #2549, Mar-03-94 01:45AM
Subject: debugger problems
>> ...coming soon is a new GUI version of the debugger...
If you're going to tell me that your wonderful new debugger has to
run under Windows, I'm going to send Lorena Bobbitt to your next
developers' conference.
John (have you guys even _seen_ Turbo Debugger?) Miles
*** This is a reply to #2515. *** See also #2552.
From: Kevin Kitsemetry Rec'd
To: Scott Drysdale Msg #2550, Mar-03-94 11:27AM
Subject: bug(?) & questions
SD> hi there. the company i work for (scala, inc) is
SD> working on a project using c++/32 (currently at
SD> version 9.5 with b level patches) running under os/2.
SD> FIRST:
SD> i've got a curious problem which i'll upload as
SD> scala1.zip, including some
SD> minimal source to demonstrate the problem and a .cmd
SD> file which compiles it. the problem concerns warning
SD> W480 (var/func has same name as class/enum XXX)
SD> appearing if part of the definitions are in an include
SD> file and part are in a source file.
I will take a look at this when I get a chance. You can refer to this problem
as internal report number 19135
SD> SECOND:
SD> what kind of magic is going on that allows things in
SD> c:\watcom\binb such as
SD> wcc386 run under both dos and os/2 using the same
SD> executable? is such magic available to mere mortals?
Well, ah, hmm. It's not really magic. You can either use the os2bind utility
(which we do not ship) or you can create a DOS exe, then when creating an OS/2
exe, specify the option stub=DOSprog.exe option.
SD> THIRD:
SD> a selective warning-disabling option would be *EXTREMEMLY* valuable.
You can contorl warnign message with pragma statements:
#pragma disable_message (num, num,..);
#pragma enable_message (num, num,..);
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2547.
From: Kevin Kitsemetry
To: Mike Johnson Msg #2551, Mar-03-94 11:42AM
Subject: debugger problems
KK> Coming soon is a new GUI version of the debugger.
KK> It has been totally revamped and should make things
KK> a lot better for its users.
MJ>
MJ> will it be a protected mode App so that I won't have to guess how much
MJ> /dynamic= will have to be after every re-compile? and
MJ> can one pre-order the thing?
Yes, I believe that it will be. It will be a totally new debugger. I think
you will be impressed.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2548.
From: Kevin Kitsemetry Rec'd
To: John Miles Msg #2552, Mar-03-94 11:43AM
Subject: debugger problems
>> ...coming soon is a new GUI version of the debugger...
JM>
JM> If you're going to tell me that your wonderful new debugger has to
JM> run under Windows, I'm going to send Lorena Bobbitt to your next
JM> developers' conference.
JM>
JM> John (have you guys even _seen_ Turbo Debugger?) Miles
I have seen it. It was OK. Oh, you can keep Lorana to yourself -the new
debugger will run under DOS, Windows 3.x, Windows NT and OS/2.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2549.
From: David Kennedy
To: David Hoeft Msg #2553, Mar-03-94 11:57AM
Subject: Problem with large bitmaps
DH> David,
DH> We spoke on the phone earlier today.
DH> As agreed, I am going to upload a file called
DH> DIBBUG.ZIP which contains code that fails when I call
DH> SetDIBitsToDevice or StretchDIBits with very large
DH> bitmaps, over a megabyte or so. Let me know what you
DH> find out.
DH> Thanks.
DH> }{
I've got them, and am taking a look at them.
David Kennedy
Tech Support
*** This is a reply to #2539.
From: Gerry Williams
To: Kevin Kitsemetry Msg #2554, Mar-03-94 02:10PM
Subject: int386 library function
We ahve experienced a problem with the return values for the int386 library
function. When interfacing with a keyboard buffering program the function
appears to return (interrupt 16) a value inconsistent with standard keyboard
scan codes. That is, the "Return" key is returned as a non-standard
character. Can you provided specifics about how the int386 function works.
From: Kevin Kitsemetry
To: David Hewitt Msg #2555, Mar-03-94 02:15PM
Subject: Bug Report (2 of 3)
DH> * In the program below, various cases are shown. No output is generated
DH> * for a correctly executing program. The results from 9.5b are:
DH> *
This has now been fixed for the next level of patches.
Kevin Kitsemetry
WATCOM TECHNICAL SUPPORT
*** This is a reply to #2506.
From: John Andrews
To: Tech Support Msg #2558, Mar-03-94 05:54PM
Subject: Patches in file are 12. (A & B)
Hello, I bought my Watcom C/C++ 9.5 as soon as it came out. I just recently
was told to download the bug fixes on this bbs and found out that when I run
Patch Level A, I get errors. (Size mismatch, etc).. I'm a little distresed to
find out these patchs don't work. I re-installed the Watcom C/C++ 9.5 and
tried the Patch A and still the same problem. What can I do if Patch A doesn't
work? (Like I said, I've had my v9.5 from when it first came out).
From: David Grant
To: Kevin Kitsemetry Msg #2559, Mar-03-94 06:03PM
Subject: DOS/4GW and 32Meg RAM
Kevin,
I recently got C/C++32 9.5 and applied the B level patches. I'm playing round
with various small programs to explore the DOS/4GW and PharLap DOS extender
environments.
I have encountered a problem that makes me think that DOS/4GW cannot handle 32
Meg of RAM. I've got a SystemPro/XL with 486/60 and 32Meg of RAM. When I
have HIMEM loaded in the CONFIG.SYS file - none of the programs I compile for
DOS/4GW will run. I can't even successfully load WVIDEO with /Trap=rsi.
Attempts to do load a DOS/4GW program or WVIDEO result in the curson scanning
from the top to the bottom of the screen rapidly. (I've noticed similar
behavior in pgms that crash and start causing BOUND exceptions - I imagine
that I'd get screen dumps if I hooked a printer up to the machine). There's
nothing else in CONFIG.SYS except for FILES=40 and BUFFERS=40.
When I take HIMEM out, everything is fine.
The TNT|DOS Extender does not seem to have a problem with or without HIMEM
loaded.
.
Also, I've read the earlier messages in this section regarding trapping the
INT 1C interrupt (using the demo code from the library reference section on
_dos_getvect). I've tried this under PharLap - with the results that others
have had under the "vanilla" DOS setup described above. It *did* work in
Windows 3.1 DOS box and OS/2 2.1 DOS box. I am curious why it worked under
Windows and OS/2. Also, I had a try at converting the example to use the
TNT|DOS Extender APIs to intercept both the real and protected mode interrupts
(using _dx_apmiv_set) and it will not run for any length of time unless I
comment out the _chain_intr line from the example.
I'm somewhat disappointed that I cannot use _dos_setvect and _chain_intr
seamlessly - guess I'll have to deal with it.
.
Thanks,
David L. Grant
From: Stephen Burke
To: Kevin Kitsemetry Msg #2560, Mar-03-94 07:14PM
Subject: dde4mbs.lib
Hi, The company I work for just purchased WC c++/386 9.5.
I have the honor of bieng the only one that can use c in the office. The
person whos place i took was using IBM C set to do OS2 programs and took the
compiler with him. I was wondering, I have his source for a program (c code
and obj files) 3 files each and when I try to link the obj files I keep
getting can't find dde4mbs.lib. I s this something that Watcom is looking for
ior is it something from IBM C Set that could be referenced by one of the obj
files?
Also, when compiling and linking these programs I get an error saying that the
.EXE file has been established. I look up the error and It says that I am
using more than one format comand(os2) when I'm not. Any Ideas?
From: Skip Fedanzo
To: Tech Support Msg #2561, Mar-03-94 10:00PM
Subject: Fatal error from C++
I recently received and installed 'B' level patches without problems.
As soon as I tried compiling I got a weird msg:
"Phar Lap fatal err 10025. Unexpected processor exception occurred
Error occurred in protected mode, exception/interrupt number 000Eh"
Protected mode machine state:
CS:EIP=0008h:00010FFFh, SS:ESP=0010h:00000ACAh
DS=0010h, ES=00C8h, FS=00D0h, GS=00D0h
EAX=0h, EBX=04000000h, ECX=0h, EDX=0200h
EBP=0AEEh, ESI=027A7h, EDI=027A7000h, EFLAGS=010206h
What's this mean? How do I get it to work correctly?
Right now I've gone from a functional 9.5.a level system to
a non-working 9.5.b level system. HELP!
From: Anthony Scian
To: Scott Drysdale Msg #2562, Mar-04-94 09:55AM
Subject: bug(?) & questions
SD> SECOND:
SD> what kind of magic is going on that allows things in
SD> c:\watcom\binb such as
SD> wcc386 run under both dos and os/2 using the same
SD> executable? is such magic available to mere mortals?
You need the OS/2 1.x SDK. It includes a binding utility
that can create one executable that executes under DOS and
OS/2 given a single OS/2 1.x executable. The OS/2 app
must be a very simple stdin/stdout text program.
WMAKE is different in that it uses only the WATCOM linker.
A OS/2 executable usually has a DOS stub program that prints "This is an OS/2
program". Using the STUB= option in WLINK,you can replace the stub with a
functionally identical DOS
program. Your executable is twice as large but if the DOS
program uses a lot of DOS real-mode specific code, this is
the only option.
*** This is a reply to #2547.
[2562 / 2562] Msg.area 12 ... WATCOM C/C++32 9.5 Problems and Fixes
Type message number, or press <enter> for NEXT msg.
MESSAGE:
A)rea Change N)ext Message P)revious Message E)nter Message
R)eply to a messag C)hange a message =)read_non-stop -)read_original
+)read_reply L)ist (brief) M)ain Menu J)ump to file area
G)oodbye (log off) U)pload a message F)orward (copy) B)rowse messages
*)ReadCurrent T)ag areas ?)help
Select: