16
Casio Calculators / Re: Prizm Useful Routines -- post here!
« on: November 28, 2011, 07:36:04 am »
IsKeyDown equivalent
It allow to detect multiple pressed keys simultaneous.
Code: [Select]
int keydown(int basic_keycode)
{
const unsigned short* keyboard_register = (unsigned short*)0xA44B0000;
int row, col, word, bit;
row = basic_keycode%10;
col = basic_keycode/10-1;
word = row>>1;
bit = col + 8*(row&1);
return (0 != (keyboard_register[word] & 1<<bit));
}
Expect a Basic keycode (27=right, 38=left) or 10 to test the AC/ON key.It allow to detect multiple pressed keys simultaneous.