]> git.sur5r.net Git - cc65/blob - libsrc/cbm610/clrscr.s
New condes module
[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
10         .include        "zeropage.inc"
11
12 .proc   _clrscr
13
14         lda     #0
15         sta     CURS_X
16         sta     CURS_Y
17         jsr     plot            ; Set cursor to top left corner
18
19         lda     IndReg
20         pha
21         lda     #$0F
22         sta     IndReg          ; Switch to the system bank
23
24         ldx     #8
25         ldy     #$00
26         lda     #$20            ; Screencode for blank
27 L1:     sta     (CharPtr),y
28         iny
29         bne     L1
30         inc     CharPtr+1
31         dex
32         bne     L1
33
34         pla
35         sta     IndReg          ; Restore old indirect segment
36
37         jmp     plot            ; Set screen pointer again
38
39 .endproc
40
41
42