]> git.sur5r.net Git - cc65/blob - libsrc/telestrat/cgetc.s
remove TABs
[cc65] / libsrc / telestrat / cgetc.s
1 ;
2 ; jede jede@oric.org 2017-10-01
3 ;
4     .export    _cgetc
5
6     .import    cursor
7
8     .include   "telestrat.inc"
9
10 .proc _cgetc
11         ; this routine could be quicker if we wrote in page 2 variables,
12         ; but it's better to use telemon routine in that case, because telemon can manage 4 I/O
13         ldx     cursor       ; if cursor equal to 0, then switch off cursor
14         beq     switchoff_cursor
15
16         ldx     #$00         ; x is the first screen
17         BRK_TELEMON(XCSSCR)  ; display cursor
18         jmp     loop         ; could be replaced by a bne/beq but 'jmp' is cleaner than a bne/beq which could expect some matters
19
20 switchoff_cursor:
21         ; at this step X is equal to $00, X must be set, because it's the id of the screen (telestrat can handle 4 virtuals screen)
22         BRK_TELEMON(XCOSCR)  ; switch off cursor
23
24 loop:
25         BRK_TELEMON XRD0     ; waits until key is pressed
26         bcs     loop
27         rts
28 .endproc