1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-18 00:29:02 +00:00
cc65/libsrc/geos-common/conio/clrscr.s
ol.sc 46f1085e2d Fixed several aspects of the GEOS CONIO implementation:
- cputc was drawing at the wrong position, therefore one line had to be removed as a workaround.
- chline, cvline were drawing one pixel to large lines.
- cclear was drawing an in both directions one pixel to big rect.
- the cursor was drawn at wrong times at wrong places in a wrong size.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5874 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-10-23 19:42:57 +00:00

50 lines
724 B
ArmAsm

;
; Maciej 'YTM/Elysium' Witkowiak
;
; 27.10.2001, 23.12.2002
; void clrscr (void);
.export _clrscr
.import fixcursor
.importzp cursor_c, cursor_r
.include "jumptab.inc"
.include "geossym.inc"
.include "const.inc"
_clrscr:
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
stx cursor_r
jsr fixcursor ; home cursor
.ifdef __GEOS_CBM__
lda #199
sta r2H
lda graphMode
bpl L40
lda #>639 ; 80 columns
ldx #<639
bne L99
L40: lda #>319 ; 40 columns
ldx #<319
L99:
.else
lda #191
sta r2H
lda #>559
ldx #<559
.endif
sta r4H
stx r4L
jsr Rectangle
pla
jmp SetPattern ; restore pattern