]> git.sur5r.net Git - cc65/blob - libsrc/apple2/cvline.s
Made Apple II CONIO more flexible.
[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
9         .import         gotoxy, putchar, newline
10
11         .include        "zeropage.inc"
12
13 _cvlinexy:
14         pha                     ; Save the length
15         jsr     gotoxy          ; Call this one, will pop params
16         pla                     ; Restore the length and run into _cvline
17
18 _cvline:
19         .ifdef  __APPLE2ENH__
20         ldx     #$5F            ; Left vertical line MouseText character
21         .else
22         ldx     #'!' | $80      ; Exclamation mark, screen code
23         .endif
24
25         stx     tmp1
26         cmp     #$00            ; Is the length zero?
27         beq     done            ; Jump if done
28         sta     tmp2
29 :       lda     tmp1            ; Screen code
30         jsr     putchar         ; Write, no cursor advance
31         jsr     newline         ; Advance cursor to next line
32         dec     tmp2
33         bne     :-
34 done:   rts