.U% LDX #6 ; We want to clear the 6 key logger locations from ; KY1 to KY6, so set a counter in X LDA #0 ; Set A to 0, as this means "key not pressed" in the ; key logger at KL STA iconBarKeyPress ; Reset the key logger entry for the icon bar button ; choice .DKL3 STA KL,X ; Store 0 in the X-th byte of the key logger DEX ; Decrement the counter BPL DKL3 ; Loop back for the next key, until we have cleared from ; KL to KL+6 (i.e. KY1 through KY6) RTS ; Return from the subroutine
[X]
Label DKL3 is local to this routine
[X]
Variable iconBarKeyPress in workspace ZP
The button number of an icon bar button if an icon bar button has been chosen