[fpc-pascal]Yet another bug in Win32 CRT unit

Jonas Maebe jonas at zeus.rug.ac.be
Tue Mar 5 08:22:59 CET 2002


On Mon, 4 Mar 2002, Rich Pasco wrote:

> > that code will need to be different for win9X/Me
> > and for winNT/2000/XP....
>
> The binary output of Borland Pascal works on all these OS's
> without modification--through the PC speaker.

Well, the binary output of the Dos (go32v2) FPC version will also work
under WinNT etc. However, that's because Windows includes a Dos
compatibility/emulation layer. From a win32 program, it's not possible to
write directly to the PC speaker ports like under Dos, so you either have
to use win32 api calls (and it seems there aren't any which allow you to
specify the tone/duration), or you have to write a VxD (since that one
runs with kernel privileges and as such it should be able to access the
hardware directly which in) which in turn can be called from FPC programs.


Jonas





More information about the fpc-pascal mailing list