[Coco] Detecting Shift key.

Johann Klasek johann+coco at klasek.at
Fri Sep 22 08:36:42 EDT 2017


On Fri, Sep 22, 2017 at 12:06:04PM +0200, Tormod Volden wrote:
> On Fri, Sep 22, 2017 at 2:39 AM, Steven Wallis  wrote:
[..]
> This will work on all machines to detect shift:

How about to debouce? Could this be done like this?
Added the "wait for shift" line in case one waits until
the shift key is pressed ...
Would these modifications of any value?

> 
>          ldb   #$7F         ; pull down row containing shift
>          stb   $FF02
wait
>          ldb   $FF00
           cmpb  $FF00
           bne wait         ; debounce
>          comb
>          andb  #$40       ; check column containing shift
           beq   wait       ; wait for shift

>          bne   gocmdl          ; return if shift key pressed

Johann



More information about the Coco mailing list