]> git.sur5r.net Git - cc65/blob - libsrc/atmos/cclear.s
Remove trailings spaces from CBM-related asm files
[cc65] / libsrc / atmos / cclear.s
1 ;
2 ; Ullrich von Bassewitz, 2003-04-13
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         setscrptr  
10         .import         rvs
11         .import         popax
12         .importzp       ptr2
13
14         .include        "atmos.inc"
15
16
17 _cclearxy:
18         pha                     ; Save the length
19         jsr     popax           ; Get X and Y
20         sta     CURS_Y          ; Store Y
21         stx     CURS_X          ; Store X
22         pla                     ; Restore the length and run into _cclear
23
24 _cclear:
25         tax                     ; Is the length zero?
26         beq     @L9             ; Jump if done
27         jsr     setscrptr       ; Set ptr2 to screen, won't use X
28         lda     #' '       
29         ora     rvs
30 @L1:    sta     (ptr2),y        ; Write one char
31         iny                     ; Next char
32         bne     @L2
33         inc     ptr2+1          ; Bump high byte of screen pointer
34 @L2:    dex
35         bne     @L1
36 @L9:    rts
37
38