The only place anything runs at processor speed is inside the processor, so at the VERY best only small parts of your program will ever run at that speed.
How are you doing the timing?, I've been writing a hardware interfacing program for many years (WinPicProg) - it took me a LONG time to find a Windows API that will give me (mostly) 1mS accuracy.
If you've got an accurate way I'll happily 'steal' it! :lol:
But it only works in DOS, you can't do that under Windows - also it only gives 1mS resolution, giving your program a maximum output frequency of only 500Hz - somewhat different to the UHF radio frequencies you've been claiming?.
it can output up the highest freq possible from the port.
i does run on windows and even linux i have windows xp
and that is the hardest to ouput somthing to a port.
But you've got a minimum 1mS delay per half cycle, so the maximum possible frequency is only 500Hz - how do you expect to get more than that with the piece of code you posted?.
As far as I'm aware the Sleep() command ONLY accepts integers, with 1 (obviously) being the minimum. All the compilers I've ever seen (or heard of) don't allow floating point numbers for functions like that.
Also, as you mentioned Windows, presumably you're running in a DOS box?, this will make a mess of your 1mS timing anyway.
forgot how hard it was to beat nigel to the punch :lol:
on a sidenote: I just noticed you're offering complete songs on a normal webpage :? ... I hope you realize what you're doing , and how easely 'they' can track you down :?
iv been doin c++ for 2 years
im sorry i made a mistake that code i gave you i wrote without copy and pasting
danielsgames.co.uk is going to change anyway i have never got round to it