aboutsummaryrefslogtreecommitdiff
path: root/timed_getch.s
blob: 86752905fd0ef30de3964cb9b43e70b0c0997536 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

 .export _timed_getch, _set_jiffy_timer
 .import _cgetc

_set_jiffy_timer:
 sei
 sta 540
 stx 541
 cli
 rts

_timed_getch:
 jsr _set_jiffy_timer
wait4key:
 lda 540
 ora 541
 beq done
 ldx 764
 inx
 beq wait4key
 jmp _cgetc

done:
 lda #$ff ; return -1
 tax
 rts