]> git.sur5r.net Git - cc65/blob - libsrc/atari/cvline.s
Move Atari-specific PIA reg vals to atari.h
[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 .ifdef __ATARI5200__
14 CHRCODE =       1               ; exclamation mark
15 .else
16 CHRCODE =       $7C             ; Vertical bar
17 .endif
18
19 _cvlinexy:
20         pha                     ; Save the length
21         jsr     gotoxy          ; Call this one, will pop params
22         pla                     ; Restore the length and run into _cvline
23
24 _cvline:
25         cmp     #0              ; Is the length zero?
26         beq     L9              ; Jump if done
27         sta     tmp1
28 L1:     lda     COLCRS
29         pha
30         lda     #CHRCODE        ; Vertical bar
31         jsr     putchar         ; Write, no cursor advance
32         pla
33         sta     COLCRS
34         inc     ROWCRS
35         dec     tmp1
36         bne     L1
37 L9:     jmp     setcursor