]> git.sur5r.net Git - cc65/blob - libsrc/atari/cvline.s
atari5200: conio now uses just four colors altogether
[cc65] / libsrc / atari / cvline.s
1 ;
2 ; Ullrich von Bassewitz, 08.08.1998
3 ;
4 ; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
5 ; void cvline (unsigned char length);
6 ;
7         .include "atari.inc"
8         
9         .export         _cvlinexy, _cvline
10         .import         gotoxy, putchar, setcursor
11         .importzp       tmp1
12
13 CHRCODE =       $7C             ; Vertical bar
14
15 _cvlinexy:
16         pha                     ; Save the length
17         jsr     gotoxy          ; Call this one, will pop params
18         pla                     ; Restore the length and run into _cvline
19
20 _cvline:
21         cmp     #0              ; Is the length zero?
22         beq     L9              ; Jump if done
23         sta     tmp1
24 L1:     lda     COLCRS
25         pha
26         lda     #CHRCODE        ; Vertical bar
27         jsr     putchar         ; Write, no cursor advance
28         pla
29         sta     COLCRS
30         inc     ROWCRS
31         dec     tmp1
32         bne     L1
33 L9:     jmp     setcursor