FastTimer(Speed)
Sets the speed of the 8253 timer chip.
The 8253 timer chip is the driving force behind the ExtSound, Noise, and Pause functions. These functions rely on a certain period of time to last. This period of time is known as a clock tick. When you first start-up your computer the timer chip is set at 18.2 clock ticks per second. The FastTimer function allows you to change the speed to a rate greater than that. The reason for this is to increase the performance of the functions previously mentioned. The ExtSound function is a good example. You can use the ExtSound function to produce notes to make music. There is a limiting factor in that at a rate of 18.2 clock ticks per second notes that last 1/19th or less their normal time cannot be produced. GW-BASIC sets the timer chip to run at 4 times its normal rate when it uses the PLAY statement. This allows it to make notes up to 1/64th their normal time. The 'FastTimer' function allows you to run the timer chip up to 256 times its normal rate. This gives you almost unlimited flexibility in writing programs that make sounds or noises to last exactly as long as you want. Another area where this function can be useful is in the use of the Pause function. A more precise time than 1/18th of a second can be used if you need it. I recommend that you use values of 8 or less if you are going to use this function only for sounds or noises and set it to rates greater than that for only short periods of time in the use of the Pause function. This is because running the 8253 timer faster than its normal setting will cause your computer to run slower. The higher the rate setting the slower your computer will run.
An extremely important thing to remember about using this function is that you MUST use the ResetTimer function before you end your program. Failure to do so can result in anything from your current time of day being wrong to a locked up computer system. Avoid using this function if you are using the debugging facilities of one of the compilers. As soon as a break point is reached the program is ended for all practical purposes. The main thing to remember is the ResetTimer timer function must be executed before control is passed back to the operating system or the compiler you are working with.
Parameters
Speed is a number 2 - 256:
This is the number of times greater you want the 8253 timer chip to run. A setting of 4 will make it run 4 times faster than before. This will make clock ticks occur 72.8 times a second.