Well, a delay loop is simply a loop that does nothing for a fixed large number of repetitions, such as
[tt]for(x=0; x <= 1000000; x++);[/tt]
However, there are two problems with this. First, the delay is dependent on the speed of the processor; the faster the CPU, the shorter the delay would be. You would need to calibrate the delay timings to the speed of the system beforehand, so that on a machine that was twice as fast, it would use twice as many repetitions. In a multitasking system, you would also have to take system loading into consideration.
Second, this sort of delay loop falls into the category of 'busy waiting', in which the CPU is running a taks but not performing any actual work. Again, this presents problems in multitasking systems, as cycles which could be applied to other task get wasted doing nothing.
A far better solution is to use the system delay() or wait() function. Offhand, I can't recall what that would be under Windows, so I will leave it to others to provide.