Checks if there is at least one key pressed.
call cpct_isAnyKeyPressed_asm
<u8> | false (0, no single key is pressed) or true (>0, at least one key is pressed). Take into account that true is not 1, but any non-0 number. Return value is placed in registers A and L (same value for both) |
Checks if at least one key from the keyboard is pressed. It does it looking at the cpct_keyboardStatusBuffer, which is an 80-bit array holding the pressed / not pressed status of each of the 80 keys in the CPC keyboard. If at least one key is pressed, one of the 80-bits representing the keys must be set to 0 (which means that key is pressed right now).
The cpct_keyboardStatusBuffer is just an array in memory that must be updated with current key status. To do this, cpct_scanKeyboard routines must be used before calling this function.
A, B, HL
13 bytes
Case | microSecs (us) | CPU Cycles ------------------------------------------- Any | 83 | 332 -------------------------------------------
10-bytes (80-bits) array containing pressed / not pressed status of all the keys / buttons the Amstrad CPC can manage (up to 80).
extern u8 cpct_keyboardStatusBuffer[10]