[Coco] RGBDOS, HDBDOS, and key repeat

Robert Gault robert.gault at att.net
Fri Feb 12 20:14:40 EST 2016


Barry,

Here is a second approach to repeat keys. I wrote this to be used on demand with 
my Ken-Ton SCSI hard drive system with an RGBDOS ROM. The program is just 
LOADMed as needed.

KEYBUF EQU $152
MASK EQU $3F EVERY KEY EXCEPT ENTER, CLEAR, BREAK
RATE1 EQU 30 TICKS UNTIL REPEAT STARTS
RATE2 EQU 3  TICKS AT WHICH KEYS REPEAT

  ORG $014A
KCLEAR FCB 0
KHOLD FCB 0

  ORG $8D14
KREP LDX #KEYBUF
A@ LDA ,X+
  ANDA #MASK
  CMPA #MASK WAS A KEY HELD DOWN?
  BNE B@
  CMPX #$015A
  BNE A@
  INC >KCLEAR
  LDA >KCLEAR
  CMPA #$06
  BCS X@
  CLR >KCLEAR
  CLR >KHOLD
B@ INC >KHOLD
  LDA >KHOLD
  CMPA #RATE1
  BNE X@
  SUBA #RATE2
  STA >KHOLD
  LDX #KEYBUF
C@ LDA ,X
  ORA #MASK
  STA ,X+
  CMPX #$015A
  BNE C@
X@ JMP >$8955 RETURN FROM INTERRUPT

  ORG $D8CD
  JMP >KREP

  END


More information about the Coco mailing list