Keyboard Input At Warp 9

This one can be extremely usefull for coding fast action games, and the likes. It's less suitable
for normal input operations, since it's just *too* fast ;)


It takes some effort to analize the returned data, but it's extremely usefull. The input is as fast as
it gets and there are absolutely *NO* delays between repeating, or different keys. Since it won't
empty the keyboard buffer, it's still advisable to do this yourself once in a while. (Otherwise you'll
get that irritating beeping) You can drain it with:




Back







Convert Bin/Oct/Hex to Dec

With Bin$, Oct$ and Hex$ it's possible to translate 'normal', decimal numbers into other
systems. Although there isn't a standard function to do the oposite, it's not that difficult.
The following statements will do convert Bin/Oct/Hex to Dec.


For instance: If Hexstring$="FFFFFF" the function would return 5.

Idea by

Back










Vertical Retrace

To prevent the screen to flicker while playing animations, or drawing graphics on the screen,
you can check for the vertical sync. This way, Graphics aren't drawn 'half', since the beam is
somewhere in the middle of the screen, and the image won't flicker. It can also be used to
make sure that a program runs with the same speed at faster computers as well. After all,
the interval between the screenupdates haven't changed on faster systems.




Back










High Resolution Timer

The ordinary TIMER returns the amount of seconds that have passed since midnight, 1/18 of a
second precise. Sometimes you need a more detailed timer. This high-resolution timer supplies
you with 2^24 (6) ticks an hour - 4660 ticks a second, instead of the ordinary 18 ones.



Posted on Usenet by


Back










Pentium FDIV bug

Okay, okay. It's a bit outdated already, but perhaps some people still want to check
whether or not they've got a faulty pentium processor. For those precious few:




Back










COM-port address

It's not difficult to retrieve the baseaddress of COM-ports.
Sometimes, it can be usefull to know these addresses. One of the possibilities is to retrieve
data from the mouse, without the need to have a mousedriver loaded in memory.



Back










Trapping Control-Alt-Del

Trapping ctrl-alt-del can be very usefull sometimes. There are several rountines around, but
very few of those actually seem to work. This one works for me.

This routine jumps to another part of the program, labeled NoBoot. This part of the program
will be executed, instead of the usual warm reset.

Source: PowerBASIC FAQ v0.65, http://www.snafu.de/~pbsound/


Back