[Coco] Detecting Shift key.

Tormod Volden lists.tormod at gmail.com
Fri Sep 22 06:06:04 EDT 2017


On Fri, Sep 22, 2017 at 2:39 AM, Steven Wallis  wrote:
>
> Notice that the 'columns' are swapped for the Tandy in comparison to the
> the Dragon - hence if a Tandy game running on a Dragon asks you to press
> the '1' key, you should press the 'Q' key!
>

The columns are shuffled around between the Dragon and the CoCo, but
the one row with shift/enter/clear/break remains the same.

This will work on all machines to detect shift:

         ldb   #$7F         ; pull down row containing shift
         stb   $FF02
         ldb   $FF00
         comb
         andb  #$40       ; check column containing shift
         bne   gocmdl          ; return if shift key pressed

Cheers,
Tormod


More information about the Coco mailing list