Watcom C/C++ 10.0a - Anomaly? 
Author Message
 Watcom C/C++ 10.0a - Anomaly?

Fellow Watcom C/C++ 10.0a'ers,

 I decided to recompile some old source for a little utility I wrote
a while back under Borland Turbo C++ 3.0 with Watcom 10.0a and was
surprised to find that the TC compiled code was smaller and faster
than Watcom's.   The difference in size isn't much to get e{*filter*}d
about, but the performance difference is.  There seems to be a bit
of a delay of about 2.5 sec in the beginning of program execution.

 I finally traced it to the delay() function. Use the following
source to test this condition.

/*
   WATCOM.C - David B. Ferguson  September 1, 1995
   Copyright (c)1995 MicroTask

   Demonstrates strange anomaly in Watcom C/C++ v10.0a 16 bit compiler

    There seems to be a 2.5 second delay in program exectution
    if the delay() function is used.  Compile this program
    wcl watcom.c and run it. You will notice the 2.5 second
    delay in program execution. Comment out the delay and
    recompile and voila, instant speed demon.

*/

#include <stdlib.h>
#include <stdio.h>

void main( void )     // Accepts command line parameters
{

  printf("\n Welcome to the Wonderful Wacky World of Watcom!\n");
  sound(150);
  delay(300);
  nosound();

Quote:
}

/* End of file WATCOM.C */

 So any one know what's up here? Is this one known?

 I've sent the explanation and source to Watcom's tech support, but
I get the felling it may be some time before I hear back, if in fact
I do at all. So I figured I would query the net as well.

 Has anyone else encountered this anomaly?

 Is there a patch available that resolves this?

 Any known work arounds?

 Are there any other functions that create this execution delay?

Regards,

David-
                                     O
                                    o                  
                            |||||  o                    
                            -   -    

---------------------oOOO-----U-----OOOo-------------------------------------  

    Consultant                           Voice.......: (902)464-9976  
    MicroTask                            Pager.......: (902)459-2697
    Computer Services                    Address.....: 8 Faulkner St.
                                                       Dartmouth, N.S.
                                                       Canada, B3A 3A3
-----------------------------------------------------------------------------
          Programmer - an organism that turns coffee into software
-----------------------------------------------------------------------------



Tue, 17 Feb 1998 03:00:00 GMT  
 Watcom C/C++ 10.0a - Anomaly?

Quote:
>/*
>   WATCOM.C - David B. Ferguson  September 1, 1995
>   Copyright (c)1995 MicroTask
>   Demonstrates strange anomaly in Watcom C/C++ v10.0a 16 bit compiler
>    There seems to be a 2.5 second delay in program exectution
>    if the delay() function is used.  Compile this program
>    wcl watcom.c and run it. You will notice the 2.5 second
>    delay in program execution. Comment out the delay and
>    recompile and voila, instant speed demon.
>*/
>#include <stdlib.h>
>#include <stdio.h>
>void main( void )     // Accepts command line parameters
>{
>  printf("\n Welcome to the Wonderful Wacky World of Watcom!\n");
>  sound(150);
>  delay(300);
>  nosound();
>}
>/* End of file WATCOM.C */
> So any one know what's up here? Is this one known?

Does the delay occur during the sound?

Some compilers, when you use delay(), insert startup code to benchmark
the system so that any delay()s are as accurate as possible.

Just an idea. Good luck.

BCNya,
Edward

---------------------------------------
J. Edward Sanchez


---------------------------------------



Fri, 20 Feb 1998 03:00:00 GMT  
 Watcom C/C++ 10.0a - Anomaly?

Quote:



>>Fellow Watcom C/C++ 10.0a'ers,

>>   Demonstrates strange anomaly in Watcom C/C++ v10.0a 16 bit compiler

>>    There seems to be a 2.5 second delay in program exectution
>>    if the delay() function is used.  Compile this program
>>    wcl watcom.c and run it. You will notice the 2.5 second
>>    delay in program execution. Comment out the delay and
>>    recompile and voila, instant speed demon.

>I don't know about anyone else, but I always thought that the delay() function
>was *intended* to cause a delay.  At least, that's what it does in TC.

>Perhaps I'm missing your point though.

I think most people took this as a troll. On the other hand, if the poster
really is that dense I feel terribly sorry for his clients.

GV



Tue, 24 Feb 1998 03:00:00 GMT  
 Watcom C/C++ 10.0a - Anomaly?


Quote:

>Fellow Watcom C/C++ 10.0a'ers,
>   Demonstrates strange anomaly in Watcom C/C++ v10.0a 16 bit compiler

>    There seems to be a 2.5 second delay in program exectution
>    if the delay() function is used.  Compile this program
>    wcl watcom.c and run it. You will notice the 2.5 second
>    delay in program execution. Comment out the delay and
>    recompile and voila, instant speed demon.

I don't know about anyone else, but I always thought that the delay() function
was *intended* to cause a delay.  At least, that's what it does in TC.

Perhaps I'm missing your point though.



Tue, 24 Feb 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Strange limits of compatibility in Watcom C/C++ 10.0a

2. Watcom 10.0a bug in Win95?

3. watcom ver 10.0a

4. Watcom C/C++ V10.0a

5. Porting code from Watcom C++ 11.0a

6. WTB Watcom C/C++ 10.x

7. Watcom C/C++ 10 -> ASM

8. Watcom C/C++ v.10 student version?

9. WATCOM C/C++ 10 upgrade to 10a

10. Watcom c/c++ 10 upgrade t

11. f2c with WATCOM c/c++ 10

12. Watcom C/C++ version 10

 

 
Powered by phpBB® Forum Software