]> git.sur5r.net Git - cc65/blob - libsrc/apple2enh/cvline.s
New code from Oliver Schmidt
[cc65] / libsrc / apple2enh / 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
8         .export         _cvlinexy, _cvline, cvlinedirect
9         .import         popa, _gotoxy, putchar, newline
10         .importzp       tmp1
11
12 _cvlinexy:
13         pha                     ; Save the length
14         jsr     popa            ; Get y
15         jsr     _gotoxy         ; Call this one, will pop params
16         pla                     ; Restore the length and run into _cvline
17
18 _cvline:
19         ldx     #'|' | $80      ; Vertical line, screen code
20
21 cvlinedirect:
22         cmp     #$00            ; Is the length zero?
23         beq     done            ; Jump if done
24         sta     tmp1
25 :       txa                     ; Screen code
26         jsr     putchar         ; Write, no cursor advance
27         jsr     newline         ; Advance cursor to next line
28         dec     tmp1
29         bne     :-
30 done:   rts