]> git.sur5r.net Git - cc65/blob - libsrc/atari/chline.s
Normalized style.
[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         popa, _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     popa            ; Get y
21         jsr     _gotoxy         ; Call this one, will pop params
22         pla                     ; Restore the length
23
24 _chline:
25         cmp     #0              ; Is the length zero?
26         beq     L9              ; Jump if done
27         sta     tmp1
28 L1:     lda     #CHRCODE        ; Horizontal line, screen code
29         jsr     cputdirect      ; Direct output
30         dec     tmp1
31         bne     L1
32 L9:     jmp     setcursor