]> git.sur5r.net Git - cc65/blob - libsrc/osic1p/cvline.s
7a393bdc8250d18ab2c1b3d0df0b127f2308d5a8
[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         gotoxy, putchar, newline
12         .importzp       tmp1
13
14 _cvlinexy:
15         pha                     ; Save the length
16         jsr     gotoxy          ; Call this one, will pop params
17         pla                     ; Restore the length and run into _cvline
18
19 _cvline:
20         cmp     #0              ; Is the length zero?
21         beq     L9              ; Jump if done
22         sta     tmp1
23 L1:     lda     #$95            ; Vertical bar
24         jsr     putchar         ; Write, no cursor advance
25         jsr     newline         ; Advance cursor to next line
26         dec     tmp1
27         bne     L1
28 L9:     rts