]> git.sur5r.net Git - cc65/blob - libsrc/creativision/cclear.s
507c072bd41b66c5826042670475132bd25409b5
[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:     
22     lda         #$20    ; Space
23     jsr         cputdirect
24     dec         tmp1
25     bne         L1
26     
27 L2:     rts
28
29