Mail Archives: djgpp/2006/03/20/08:45:59
Fausto Arinos Barbuto <fbarbuto2002 DOT no AT spam DOT yahoo DOT ca> wrote:
> I sent your code to a friend in the US who has Borland's C/C++
> compiler.
Which one, and how did he run it? Borland has made about a dozen
versions of C/C++ compilers in their time, supporting various target
platforms
> He compiled it with minor changes, zipped the executable and sent it
> to me.
Sorry, but I'll have to ask you leave the decision whether those
changes were minor or major to me. IOW: I want to see that modified
source. So please post the actual source here, and the BCC version
and command line used to build it.
> but it can indeed beep! Don't know what to think anymore --
> maybe I found a little bug in GCC?
Unlikely to the point of not being worth consideration. That program is
way too simple for GCC to have a chance at miscompiling it.
No, this really must be a platform difference issue.
For the record: I did this on a laptop running XP home SP2, using
DJGPP. And with this minor modification, OpenWatcom produces beeps,
too:
#ifdef __DJGPP__
#include <pc.h>
#endif
#include <dos.h>
int main() {
sound(1000);
delay(1000);
nosound();
return 0;
}
wcl -l=dos -bt=dos beep.c
wcl386 -l=dos4g -bt=dos beep.c
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -