mirror of
https://github.com/cc65/cc65.git
synced 2024-10-31 04:04:49 +00:00
c4fc55d877
git-svn-id: svn://svn.cc65.org/cc65/trunk@2065 b7a2c559-68d2-44c3-8de9-860c34a00d81
47 lines
839 B
ArmAsm
47 lines
839 B
ArmAsm
|
|
;
|
|
; Maciej 'YTM/Elysium' Witkowiak
|
|
;
|
|
; 27.10.2001, 23.12.2002
|
|
|
|
; void clrscr (void);
|
|
|
|
.export _clrscr
|
|
|
|
.include "../inc/jumptab.inc"
|
|
.include "../inc/geossym.inc"
|
|
.include "../inc/const.inc"
|
|
|
|
.import fixcursor
|
|
.importzp cursor_c, cursor_r
|
|
|
|
_clrscr:
|
|
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
|
|
lda #199
|
|
sta r2H
|
|
lda graphMode
|
|
bpl L40
|
|
lda #>639 ; 80 columns
|
|
ldx #<639
|
|
bne L99
|
|
L40: lda #>319 ; 40 columns
|
|
ldx #<319
|
|
L99: sta r4H
|
|
stx r4L
|
|
jsr Rectangle
|
|
pla
|
|
jmp SetPattern ; restore pattern
|