]> git.sur5r.net Git - cc65/blob - libsrc/creativision/cclear.s
Merge remote-tracking branch 'upstream/master' into something_to_pull2
[cc65] / libsrc / creativision / cclear.s
1 ;*
2 ;* void cclearxy (unsigned char x, unsigned char y, unsigned char length);
3 ;* void cclear (unsigned char length);
4 ;*
5
6         .export     _cclearxy, _cclear
7         .import     popa, _gotoxy, cputdirect
8         .importzp   tmp1
9
10 _cclearxy:
11         pha             ; Save length
12         jsr     popa    ; get Y
13         jsr     _gotoxy
14         pla
15
16 _cclear:
17         cmp     #0      ; Zero length?
18         beq     L2
19         sta     tmp1
20
21 L1:     lda     #$20    ; Space
22         jsr     cputdirect
23         dec     tmp1
24         bne     L1
25
26 L2:     rts