aboutsummaryrefslogtreecommitdiff
path: root/conio/cgetc.s
blob: d1ae705f7cd6abe9008a8cb501452d4e4566cf1e (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
27
28
29
30
31
;
; Christian Groessler, November-2002
;
; get a char from the keyboard
; char cgetc(void)
;

        .include "atari.inc"
        .export _cgetc
        .import KEYBDV_handler
        .import cursor,mul40

_cgetc:
        lda     #12
        sta     ICAX1Z          ; fix problems with direct call to KEYBDV
.ifdef __ATARIXL__
        jsr     KEYBDV_handler
.else
        jsr     @1
.endif
        ldx     #0
        rts

.ifndef __ATARIXL__
@1:     lda     KEYBDV+5
        pha
        lda     KEYBDV+4
        pha
        rts
.endif