]> git.sur5r.net Git - cc65/commitdiff
Color RAM initialization was missing
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 21 Sep 2001 12:55:27 +0000 (12:55 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 21 Sep 2001 12:55:27 +0000 (12:55 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@959 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/cbm510/clrscr.s

index a2bb4e2dbe7ba655641bcbf0d6b1d8e079a36283..206833cc141711e44d76918470aa7c98968001ee 100644 (file)
        lda     #0
        sta     CURS_X
        sta     CURS_Y
-               jsr     plot            ; Set cursor to top left corner
+               jsr     plot            ; Set cursor to top left corner
 
-       lda     #$20            ; Screencode for blank
-       ldx     #$00
-       ldy     #$00
+               ldx     #$00            ; Count
        jsr     clearpage
        jsr     clearpage
        jsr     clearpage
-       ldx     #<(40*25)
-       jsr     clearpage       ; Clear remainder of last page
-       jmp     plot            ; Set screen pointer again
+               ldx     #<(40*25)       ; Count
+       jsr     clearpage       ; Clear remainder of last page
+       jmp     plot            ; Set screen pointer again
 
 .endproc
 
 
 .proc  clearpage
+                               
+       txa
+       pha                     ; Save count
 
+       lda     #$20            ; Screencode for blank
+       ldy     #$00
 @L1:   sta     (SCREEN_PTR),y
        iny
        dex
        bne     @L1
        inc     SCREEN_PTR+1
+
+       pla
+       tax                     ; Reload count
+       lda     IndReg
+       pha
+       lda     #$0F
+       sta     IndReg          ; Switch to the system bank
+       lda     CHARCOLOR       ; Load color
+       ldy     #$00
+@L2:   sta     (CRAM_PTR),y
+       iny
+       dex
+       bne     @L2
+       inc     CRAM_PTR+1
+       pla
+       sta     IndReg          ; Restore the old indirect bank
        rts
 
 .endproc