[Coco] technical assembler question

Darren A. darccml at hotmail.com
Thu May 17 20:11:19 EDT 2007


>From: Arthur Flexser
>Subject: Re: [Coco] technical assembler question
>Date: Thu, 17 May 2007 19:33:39 -0400 (EDT)
>
>If I were doing this, I'd check the keyboard PIA directly, and forget about
>using POLCAT.  Much more efficient.  I don't have any notes handy, but the 
>code
>is something like:
>
>LDA #(value that depends on break key's row in keyboard matrix)
>STA $FF02
>LDA $FF03
>ANDA #(value that depends on break key's column in keyboard matrix)
>BEQ someplace (break key is being held down)
>
>Perhaps someone here can supply the necessary row and column values, and 
>tell me
>if I've mixed up $FF03 and $FF02 or some such.  (It's been a long time!) 
>This is
>an excellent method for efficiently checking whether a particular key is 
>down,
>and even works with the shift key, which POLCAT can't be used to detect the
>status of when it is the only key being held down.
>
>Art
>
--

I think this will do the trick:

     LDD    #$FBFF
     STA    $FF02    ; Strobe column 3
     LDA    $FF00    ; Read rows
     STB    $FF02    ; Strobe none
     BITA   #$40     ; Test row 7
     BEQ    DOBRK    ; Branch if Break down

Darren

_________________________________________________________________
Like the way Microsoft Office Outlook works? You’ll love Windows Live 
Hotmail. 
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507




More information about the Coco mailing list