]> git.sur5r.net Git - cc65/blob - libsrc/apple2/cvline.s
fix merge fxxxup
[cc65] / libsrc / apple2 / cvline.s
1 ;
2 ; Ullrich von Bassewitz, 08.08.1998
3 ;
4 ; void __fastcall__ cvlinexy (unsigned char x, unsigned char y, unsigned char length);
5 ; void __fastcall__ cvline (unsigned char length);
6 ;
7
8         .export         _cvlinexy, _cvline, cvlinedirect
9         .import         popa, _gotoxy, putchar, newline
10
11         .include        "zeropage.inc"
12
13 _cvlinexy:
14         pha                     ; Save the length
15         jsr     popa            ; Get y
16         jsr     _gotoxy         ; Call this one, will pop params
17         pla                     ; Restore the length and run into _cvline
18
19 _cvline:
20         .ifdef  __APPLE2ENH__
21         ldx     #'|' | $80      ; Vertical line, screen code
22         .else
23         ldx     #'!' | $80      ; Vertical line, screen code
24         .endif
25
26 cvlinedirect:
27         cmp     #$00            ; Is the length zero?
28         beq     done            ; Jump if done
29         sta     tmp1
30 :       txa                     ; Screen code
31         jsr     putchar         ; Write, no cursor advance
32         jsr     newline         ; Advance cursor to next line
33         dec     tmp1
34         bne     :-
35 done:   rts