> ld a,$11011111 ; check for [LN] press > out (1),a ; this set's the mask for witch row on the keyboard you want to check for keys in. take a look in any tutorial covering direct input. There you can se witch keys are in witch rows. //Olle