2017-08-30 16:37:31 +02:00
|
|
|
;
|
|
|
|
; unsigned char __fastcall__ kbrepeat (unsigned char mode);
|
2017-09-05 03:40:34 -04:00
|
|
|
;
|
|
|
|
; 2017-06-16, Groepaz
|
|
|
|
; 2017-09-05, Greg King
|
2017-08-30 16:37:31 +02:00
|
|
|
;
|
2016-02-28 22:13:05 +01:00
|
|
|
|
2017-09-05 03:40:34 -04:00
|
|
|
.export _kbrepeat
|
2016-02-28 22:13:05 +01:00
|
|
|
|
2017-06-17 02:37:34 +02:00
|
|
|
.include "pet.inc"
|
2016-02-28 22:13:05 +01:00
|
|
|
|
|
|
|
_kbrepeat:
|
2017-09-05 03:40:34 -04:00
|
|
|
ldx #>$0000
|
|
|
|
ldy SCR_LINELEN
|
|
|
|
cpy #40 + 1
|
|
|
|
bcc L1 ; branch if screen is 40 columns wide
|
|
|
|
|
|
|
|
ldy KBDREPEAT80 ; get old value
|
|
|
|
sta KBDREPEAT80 ; store new value
|
|
|
|
tya ; return old value
|
|
|
|
rts
|
|
|
|
|
|
|
|
L1: tay
|
|
|
|
lda KBDREPEAT40B ; get REPEAT-key flag (used by some editor ROMs)
|
|
|
|
lsr a ; move bit 0 into bit 7
|
|
|
|
ror a
|
|
|
|
ora KBDREPEAT40 ; combine with old key-REPEAT flags
|
|
|
|
sty KBDREPEAT40
|
2016-02-28 22:13:05 +01:00
|
|
|
rts
|