2001-10-27 17:13:22 +00:00
|
|
|
;
|
|
|
|
; Maciej 'YTM/Elysium' Witkowiak
|
|
|
|
;
|
2002-12-25 02:49:42 +00:00
|
|
|
; 27.10.2001, 23.12.2002
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
; void clrscr (void);
|
|
|
|
|
|
|
|
.export _clrscr
|
2012-02-08 15:23:45 +00:00
|
|
|
.import fixcursor
|
|
|
|
.importzp cursor_c, cursor_r
|
2001-10-27 17:13:22 +00:00
|
|
|
|
2012-01-31 20:49:58 +00:00
|
|
|
.include "jumptab.inc"
|
|
|
|
.include "geossym.inc"
|
|
|
|
.include "const.inc"
|
2001-10-27 17:13:22 +00:00
|
|
|
|
|
|
|
_clrscr:
|
2012-02-08 15:23:45 +00:00
|
|
|
lda #ST_WR_FORE | ST_WR_BACK
|
|
|
|
sta dispBufferOn
|
|
|
|
lda curPattern ; save current pattern
|
|
|
|
pha
|
|
|
|
lda #0 ; set pattern to clear
|
|
|
|
jsr SetPattern
|
|
|
|
ldx #0
|
|
|
|
stx r3L
|
|
|
|
stx r3H
|
|
|
|
stx r2L
|
|
|
|
stx cursor_c
|
|
|
|
inx
|
|
|
|
stx cursor_r
|
|
|
|
jsr fixcursor ; home cursor
|
2012-02-07 13:42:27 +00:00
|
|
|
.ifdef __GEOS_CBM__
|
2012-02-08 15:23:45 +00:00
|
|
|
lda #199
|
|
|
|
sta r2H
|
|
|
|
lda graphMode
|
|
|
|
bpl L40
|
|
|
|
lda #>639 ; 80 columns
|
|
|
|
ldx #<639
|
|
|
|
bne L99
|
|
|
|
L40: lda #>319 ; 40 columns
|
|
|
|
ldx #<319
|
2012-02-07 13:42:27 +00:00
|
|
|
L99:
|
|
|
|
.else
|
2012-02-08 15:23:45 +00:00
|
|
|
lda #191
|
|
|
|
sta r2H
|
|
|
|
lda #>559
|
|
|
|
ldx #<559
|
2012-02-07 13:42:27 +00:00
|
|
|
.endif
|
2012-02-08 15:23:45 +00:00
|
|
|
sta r4H
|
|
|
|
stx r4L
|
|
|
|
jsr Rectangle
|
|
|
|
pla
|
|
|
|
jmp SetPattern ; restore pattern
|