]> git.sur5r.net Git - cc65/blob - libsrc/pce/cclear.s
Made the code that logs indirect-goto referals be a little more efficient.
[cc65] / libsrc / pce / 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         gotoxy, cputdirect
10         .importzp       tmp1
11
12 _cclearxy:
13         pha                     ; Save the length
14         jsr     gotoxy          ; Call this one, will pop params
15         pla                     ; Restore the length and run into _cclear
16
17 _cclear:
18         cmp     #0              ; Is the length zero?
19         beq     L9              ; Jump if done
20         sta     tmp1                                 
21 L1:     lda     #$20            ; Blank - screen code
22         jsr     cputdirect      ; Direct output
23         dec     tmp1
24         bne     L1
25 L9:     rts