]> git.sur5r.net Git - cc65/blob - libsrc/pce/clrscr.s
Add sample linker configurations for Atari binary output in C.
[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         VREG    VDC_MAWR, $0000
16         st0     #VDC_VWR
17
18         ldy     #$40
19 rowloop:
20         ldx     #$80
21 colloop:
22         st1     #' '            ; low byte of char. index
23         st2     #$02            ; background color, high nybble of char. index
24         dex
25         bne     colloop
26         dey
27         bne     rowloop
28
29 ; Go to the home position.
30
31         stz     CURS_X
32         stz     CURS_Y
33         jmp     plot
34
35 ;-------------------------------------------------------------------------------
36 ; force the init constructor to be imported
37
38                 .import initconio
39 conio_init      = initconio