]> git.sur5r.net Git - cc65/blob - libsrc/atari/cclear.s
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / libsrc / atari / cclear.s
1 ;
2 ; Ullrich von Bassewitz, 08.08.1998
3 ;
4 ; void cclearxy (unsigned char x, unsigned char y, unsigned char length);
5 ; void cclear (unsigned char length);
6 ;
7
8         .export         _cclearxy, _cclear
9         .import         popa, _gotoxy, cputdirect
10         .importzp       tmp1
11
12 _cclearxy:
13         pha                     ; Save the length
14         jsr     popa            ; Get y
15         jsr     _gotoxy         ; Call this one, will pop params
16         pla                     ; Restore the length and run into _cclear
17
18 _cclear:
19         cmp     #0              ; Is the length zero?
20         beq     L9              ; Jump if done
21         sta     tmp1                                 
22 .ifdef DIRECT_SCREEN
23 L1:     lda     #0              ; Blank - screen code
24 .else
25 L1:     lda     #$20            ; Blank
26 .endif
27         jsr     cputdirect      ; Direct output
28         dec     tmp1
29         bne     L1
30 L9:     rts
31
32
33
34