]> git.sur5r.net Git - cc65/blob - libsrc/atari/chline.s
atari: split color.s into bordercolor.s and bgcolor.s
[cc65] / libsrc / atari / chline.s
1 ;
2 ; Ullrich von Bassewitz, 08.08.1998
3 ;
4 ; void chlinexy (unsigned char x, unsigned char y, unsigned char length);
5 ; void chline (unsigned char length);
6 ;
7
8         .export         _chlinexy, _chline
9         .import         gotoxy, cputdirect, setcursor
10         .importzp       tmp1
11
12 .ifdef __ATARI5200__
13 CHRCODE =       14
14 .else
15 CHRCODE =       $12+64
16 .endif
17
18 _chlinexy:
19         pha                     ; Save the length
20         jsr     gotoxy          ; Call this one, will pop params
21         pla                     ; Restore the length
22
23 _chline:
24         cmp     #0              ; Is the length zero?
25         beq     L9              ; Jump if done
26         sta     tmp1
27 L1:     lda     #CHRCODE        ; Horizontal line, screen code
28         jsr     cputdirect      ; Direct output
29         dec     tmp1
30         bne     L1
31 L9:     jmp     setcursor