]> git.sur5r.net Git - cc65/blobdiff - libsrc/pce/clrscr.s
Fixed and improved some pce comments.
[cc65] / libsrc / pce / clrscr.s
index e3f40bb8b78e11ae602c08f6428ac8765eca453b..907a78899b73fe46a91fe00a5034e52f0ea6567f 100644 (file)
@@ -1,11 +1,17 @@
+;
+; Clear (erase) the screen.
+;
+; Support the full 128- x 64-tile background.
+;
+
+        .export         _clrscr
+
+        .import         plot
 
         .include        "pce.inc"
         .include        "extzp.inc"
 
-        .import plot
-        .export _clrscr
 _clrscr:
-
         st0     #VDC_MAWR
         st1     #<$0000
         st2     #>$0000
@@ -15,10 +21,10 @@ _clrscr:
 rowloop:
         ldx     #$80
 colloop:
-        lda     #' '
-        sta     a:VDC_DATA_LO
-        lda     #$02
-        sta     a:VDC_DATA_HI
+        lda     #' '            ; low byte of char. index
+        sta     VDC_DATA_LO
+        lda     #$02            ; background color, high nybble of char. index
+        sta     VDC_DATA_HI
 
         dex
         bne     colloop