tuxfan
Technomancer
vasanth_12345 said:coldn't undestand it tuxfan "int far *capstat" far is a variable right.Couldnt uderstand his properly "state = *capstat & 64" what does the state function do.Further "0x417" denotes the ram value right then the keyboards buffer rests in the ram and not in the keyboard right.
int far *capstat creats a far integer pointer variable
state is also an integer variable only and not any specific function.
0x417 is the address in the memory that stores the current status of caps, num, insert, etc. Its just one (or two) byte. Compare the functions that I have posted. They are almost same except the state = *capstat & 64 statement. One has 64, other has 32, another one has 16, etc. So one byte, different bits store these values.
Keyboard buffer is different. Keyboard buffer stores the keypresses till the OS can handle them. At times what happens is that an application is busy in process A and an impatient user keeps pressing some keys or the other.
That could create unexpected processing to start with the application after that long process A is over. So I also have a function called clearkeybuff() 8)
Code:
void clrkeybuff()
{
int istherech = 1, dummy;
while ( istherech != 0 )
{
istherech = bioskey(1);
if ( istherech != 0 )
dummy = bioskey(0);
}
}
Which other key do you want to access like this? Is it necessary to access any one of them like this? Just thinkvasanth_12345 said:pls correct me if i am wrong further all the keys can be accessed like this or what.Pls help