]> git.sur5r.net Git - cc65/blob - libsrc/atari/cvline.s
Merge remote-tracking branch 'upstream/master' into a5200
[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         popa, _gotoxy, putchar, setcursor
11         .importzp       tmp1
12
13 .ifndef __ATARI5200__
14 CHRCODE =       $7C             ; Vertical bar
15 .else
16 CHRCODE =       1               ; exclamation mark
17 .endif
18
19 _cvlinexy:
20         pha                     ; Save the length
21         jsr     popa            ; Get y
22         jsr     _gotoxy         ; Call this one, will pop params
23         pla                     ; Restore the length and run into _cvline
24
25 _cvline:
26         cmp     #0              ; Is the length zero?
27         beq     L9              ; Jump if done
28         sta     tmp1
29 L1:     lda     COLCRS
30         pha
31         lda     #CHRCODE        ; Vertical bar
32         jsr     putchar         ; Write, no cursor advance
33         pla
34         sta     COLCRS
35         inc     ROWCRS
36         dec     tmp1
37         bne     L1
38 L9:     jmp     setcursor