; void clrscr (void);\r
;\r
.export _clrscr\r
+ .import plot\r
+ .importzp CURS_X, CURS_Y\r
.include "c1p.inc"\r
\r
; Adapted from the Challenger Character Graphics\r
BANKS = VIDEORAMSIZE / $100\r
\r
_clrscr:\r
- lda #$20 ;' '\r
- ldy #BANKS\r
- ldx #$00\r
+ lda #$20 ;' '\r
+ ldy #BANKS\r
+ ldx #$00\r
staloc:\r
- sta SCRNBASE,X\r
+ sta SCRNBASE,X\r
inx\r
- bne staloc\r
- inc staloc+2\r
+ bne staloc\r
+ inc staloc+2\r
dey\r
- bne staloc\r
- lda #>(SCRNBASE) ; load high byte\r
- sta staloc+2 ; restore base address\r
- rts\r
+ bne staloc\r
+ lda #>(SCRNBASE); load high byte\r
+ sta staloc+2 ; restore base address\r
+\r
+ lda #$00 ; cursor in upper left corner\r
+ sta CURS_X\r
+ sta CURS_Y\r
+ jmp plot ; Set the cursor position\r