]> git.sur5r.net Git - cc65/blob - libsrc/c1p/chline.s
Added chline and cvline implementation from CBM implementation.
[cc65] / libsrc / c1p / chline.s
1 ;
2 ; based on CBM implementation
3 ;
4 ; originally by:
5 ; Ullrich von Bassewitz, 08.08.1998
6 ;
7 ; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
8 ; void chline (unsigned char length);
9 ;
10
11         .export         _chlinexy, _chline
12         .import         popa, _gotoxy, cputdirect
13         .importzp       tmp1
14
15 _chlinexy:
16         pha                     ; Save the length
17         jsr     popa            ; Get y
18         jsr     _gotoxy         ; Call this one, will pop params
19         pla                     ; Restore the length
20
21 _chline:
22         cmp     #0              ; Is the length zero?
23         beq     L9              ; Jump if done
24         sta     tmp1
25 L1:     lda     #$94             ; Horizontal line, screen code
26         jsr     cputdirect      ; Direct output
27         dec     tmp1
28         bne     L1
29 L9:     rts