]> git.sur5r.net Git - cc65/blob - libsrc/geos-common/conio/cgetc.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / geos-common / conio / cgetc.s
1 ;
2 ; Maciej 'YTM/Elysium' Witkowiak
3 ;
4 ; 27.10.2001
5 ; 06.03.2002
6
7 ; unsigned char cgetc (void);
8
9             .export _cgetc
10             .import cursor, _PromptOff
11             .importzp cursor_x, cursor_y
12
13             .include "jumptab.inc"
14             .include "geossym.inc"
15
16 _cgetc:
17 ; show cursor if needed
18         lda cursor
19         beq L0
20
21 ; prepare cursor
22         lda #7
23         jsr InitTextPrompt
24         lda cursor_x
25         ldx cursor_x+1
26         sta stringX
27         stx stringX+1
28         lda cursor_y
29         sta stringY
30         jsr PromptOn
31
32 L0:     jsr GetNextChar
33         tax
34         beq L0
35         pha
36         jsr _PromptOff
37         pla
38         ldx #0
39         rts