[Coco] technical assembler question

Arthur Flexser flexser at fiu.edu
Thu May 17 19:33:39 EDT 2007


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

On Thu, 17 May 2007, Bob Devries wrote:

> dear friends,
> 
> I'm doing some writing in assembler for RSDOS (DECB). I don't do this often, 
> you understand, so I've got a question:
> 
> When checking for a BREAK key, is it necessary yo do multiple reads of the 
> POLCAT routine to ensure the key is not missed? At the moment i have this 
> code:
> 
>  jsr [POLCAT]
>  beq dskcont ;no key pressed, continue
>  cmpa #BREAK ;that's #$03
>  bne dskcont ;on BREAK, fall through to exit routine
> 
> Should I loop through that a few times to be sure I don't miss it or will 
> that slow the programme down too much.
> 
> What do the "experts" do in this case?
> 
> --
> Regards, Bob Devries, Dalby, Queensland, Australia
> 
> Isaiah 50:4 The sovereign Lord has given me
> the capacity to be his spokesman,
> so that I know how to help the weary.
> 
> website: http://www.home.gil.com.au/~bdevasl
> my blog: http://bdevries.invigorated.org/
> 
> 
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
> 




More information about the Coco mailing list