]> git.sur5r.net Git - cc65/blob - libsrc/cbm610/clrscr.s
Code review changes and build fix.
[cc65] / libsrc / cbm610 / clrscr.s
1 ;
2 ; Ullrich von Bassewitz, 22.09.1998
3 ;
4 ; void clrscr (void);
5 ;
6
7         .export         _clrscr
8         .import         plot
9         .import         CURS_X: zp, CURS_Y: zp, CharPtr: zp
10
11         .include        "cbm610.inc"
12
13 .proc   _clrscr
14
15         lda     #0
16         sta     CURS_X
17         sta     CURS_Y
18         jsr     plot            ; Set cursor to top left corner
19
20         lda     IndReg
21         pha
22         lda     #$0F
23         sta     IndReg          ; Switch to the system bank
24
25         ldx     #8
26         ldy     #$00
27         lda     #$20            ; Screencode for blank
28 L1:     sta     (CharPtr),y
29         iny
30         bne     L1
31         inc     CharPtr+1
32         dex
33         bne     L1
34
35         pla
36         sta     IndReg          ; Restore old indirect segment
37
38         jmp     plot            ; Set screen pointer again
39
40 .endproc
41
42
43