]> git.sur5r.net Git - cc65/blob - libsrc/c64/soft80_cvline.s
added some more comments and -headers
[cc65] / libsrc / c64 / soft80_cvline.s
1 ;
2 ; Groepaz/Hitmen, 12.10.2015
3 ;
4 ; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
5 ; void cvline (unsigned char length);
6 ;
7
8         .export         soft80_cvline, soft80_cvlinexy
9         .import         popa, _gotoxy, soft80_putchar, soft80_newline
10         .importzp       tmp1
11
12         .include        "c64.inc"
13         .include        "soft80.inc"
14
15 soft80_cvlinexy:
16         pha                     ; Save the length
17         jsr     popa            ; Get y
18         jsr     _gotoxy         ; Call this one, will pop params
19         pla                     ; Restore the length and run into soft80_cvlinexy
20
21 soft80_cvline:
22         cmp     #0              ; Is the length zero?
23         beq     L9              ; Jump if done
24         sta     tmp1
25 L1:     lda     #CH_VLINE       ; Vertical bar, petscii code
26         jsr     soft80_putchar  ; Write, no cursor advance
27         jsr     soft80_newline  ; Advance cursor to next line
28         dec     tmp1
29         bne     L1
30 L9:     rts
31
32
33