Hi,
isn't it possible to do some music with the pc-speakers like it was possible with the SOUND procedure in pascal? i mean, i'm sure that it is possible with dos assembly, but shouldn't it be possible with windows assembly, too, when i would use IN and OUT? you know, i couldn't find any documentation about that, don't you know anything about that?
nop
isn't it possible to do some music with the pc-speakers like it was possible with the SOUND procedure in pascal? i mean, i'm sure that it is possible with dos assembly, but shouldn't it be possible with windows assembly, too, when i would use IN and OUT? you know, i couldn't find any documentation about that, don't you know anything about that?
nop
you can use in/out to play some funky tunes on win9x ;)
shouldn't work with nt/2k..., though.
shouldn't work with nt/2k..., though.
Sounds like real cheap surround sound. :)Posted on 2001-12-11 17:51:11 by bitRAKE
Hi,
Here's a Speaker C example dll showing the disassembled _inp and _outp routines. You can tap into the dll and run it yourself. I d/l it ages ago and don't know where I found it.
Kayaker
Here's a Speaker C example dll showing the disassembled _inp and _outp routines. You can tap into the dll and run it yourself. I d/l it ages ago and don't know where I found it.
Kayaker
Dunno how to do it in 9x except those ugly in/out. On NT kernels you
might want to check out Kernel32!Beep, it can do a lot more on NT
than 9x.
might want to check out Kernel32!Beep, it can do a lot more on NT
than 9x.
ok, created some code, works well on win9x, have to try it out on NT, still. i attached the program.....
nop
nop
It didn`t worked here. I`m using WinNT 4 here at work.
Exception: privileged instruction (0xc0000096), Address: 0x00401050
I have no time to debug this now, but I think that you`re not allowed to use IN and OUT instructions directly on WinNT.
Exception: privileged instruction (0xc0000096), Address: 0x00401050
I have no time to debug this now, but I think that you`re not allowed to use IN and OUT instructions directly on WinNT.
INs and OUTs are not allowed in NT. However with winio + asmio you can use ports in NT/win2k too.. In the attachment you will find your example but using winio. It works in win2k and should work in win9x/ME too (iirc it may even be faster than using in & out).
Thomas
Thomas
hmm,
it seems that i always need the dll with the program, don't i? hmm, i don't like that, dunno why :rolleyes:
another possibility could be to check on which operating system the program is running, and in case of win nt, just call "Beep". does this function also work in win2k? it doesn't work on win9x.
"Windows 95:
The Beep function ignores the dwFreq and dwDuration parameters. On computers with a sound card, the function plays the default sound event. On computers without a sound card, the function plays the standard system beep."
nop
it seems that i always need the dll with the program, don't i? hmm, i don't like that, dunno why :rolleyes:
another possibility could be to check on which operating system the program is running, and in case of win nt, just call "Beep". does this function also work in win2k? it doesn't work on win9x.
"Windows 95:
The Beep function ignores the dwFreq and dwDuration parameters. On computers with a sound card, the function plays the default sound event. On computers without a sound card, the function plays the standard system beep."
nop
here's a very simple and small way to
check for NT(2K?????)
check for NT(2K?????)
mov ecx,cs
xor cl,cl
jecxz _winNT
That's a bad way though. GetWindowsVersion or GetWindowsVersionEx
(I believe) is much better. It might take more code, but it's guaranteed
to work...
(I believe) is much better. It might take more code, but it's guaranteed
to work...