]> git.sur5r.net Git - cc65/blob - libsrc/pce/clrscr.s
Fixed and improved some pce comments.
[cc65] / libsrc / pce / clrscr.s
1 ;
2 ; Clear (erase) the screen.
3 ;
4 ; Support the full 128- x 64-tile background.
5 ;
6
7         .export         _clrscr
8
9         .import         plot
10
11         .include        "pce.inc"
12         .include        "extzp.inc"
13
14 _clrscr:
15         st0     #VDC_MAWR
16         st1     #<$0000
17         st2     #>$0000
18
19         st0     #VDC_VWR
20         ldy     #$40
21 rowloop:
22         ldx     #$80
23 colloop:
24         lda     #' '            ; low byte of char. index
25         sta     VDC_DATA_LO
26         lda     #$02            ; background color, high nybble of char. index
27         sta     VDC_DATA_HI
28
29         dex
30         bne     colloop
31         dey
32         bne     rowloop
33
34 ; Go to the home position.
35
36         stz     CURS_X
37         stz     CURS_Y
38         jmp     plot
39
40 ;-------------------------------------------------------------------------------
41 ; force the init constructor to be imported
42
43                 .import initconio
44 conio_init      = initconio