]> git.sur5r.net Git - cc65/blob - libsrc/osic1p/cvline.s
Rename c1p target to osic1p
[cc65] / libsrc / osic1p / cvline.s
1 ;
2 ; based on CBM version
3 ; originally by:
4 ; Ullrich von Bassewitz, 08.08.1998
5 ;
6 ; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
7 ; void cvline (unsigned char length);
8 ;
9
10         .export         _cvlinexy, _cvline
11         .import         popa, _gotoxy, putchar, newline
12         .importzp       tmp1
13
14 _cvlinexy:
15         pha                     ; Save the length
16         jsr     popa            ; Get y
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     #$95             ; Vertical bar
25         jsr     putchar         ; Write, no cursor advance
26         jsr     newline         ; Advance cursor to next line
27         dec     tmp1
28         bne     L1
29 L9:     rts