]> git.sur5r.net Git - cc65/blob - libsrc/osic1p/chline.s
atari5200.sgml: small fix for last change
[cc65] / libsrc / osic1p / 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         gotoxy, cputdirect
13         .importzp       tmp1
14
15 _chlinexy:
16         pha                     ; Save the length
17         jsr     gotoxy          ; Call this one, will pop params
18         pla                     ; Restore the length
19
20 _chline:
21         cmp     #0              ; Is the length zero?
22         beq     L9              ; Jump if done
23         sta     tmp1
24 L1:     lda     #$94            ; Horizontal line, screen code
25         jsr     cputdirect      ; Direct output
26         dec     tmp1
27         bne     L1
28 L9:     rts