[A83] Re: value when no key pressed


[Prev][Next][Index][Thread]

[A83] Re: value when no key pressed




When you use CP, A is never changed. The processor subtracts the operand
from A but the result wont be stored in A, only the flags are set. It is not
true that the value is 0 when no key is pressed. A value of 0 means that all
keys in the selected column are pressed. If you want to check all keys you
have to check all columns. Port 1 returns a bit 1 when a key is not pressed
and a bit 0 when it is pressed. so %00000000 is all keys, %11111111 is none,
and %11011011 means 2 keys are pressed.

Bye,
Cheiz



References: