1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-06 15:06:07 +00:00
cc65/libsrc/telestrat/clrscr.s
2019-07-21 14:11:51 -04:00

45 lines
941 B
ArmAsm

;
; jede jede@oric.org 2017-02-25
;
.export _clrscr
.import OLD_CHARCOLOR, OLD_BGCOLOR
.include "telestrat.inc"
.proc _clrscr
; Switch to text mode
BRK_TELEMON(XTEXT)
lda #<SCREEN ; Get position screen
ldy #>SCREEN
sta RES
sty RES+1
ldy #<(SCREEN+SCREEN_XSIZE*SCREEN_YSIZE)
ldx #>(SCREEN+SCREEN_XSIZE*SCREEN_YSIZE)
lda #' '
BRK_TELEMON XFILLM ; Calls XFILLM : it fills A value from RES address and size of X and Y value
; reset prompt position
lda #<(SCREEN+40)
sta ADSCRL
lda #>(SCREEN+40)
sta ADSCRH
; reset display position
ldx #$01
stx SCRY
dex
stx SCRX
; At this step X is equal to $00
dex
; At this step X is equal to $FF
stx OLD_BGCOLOR
stx OLD_CHARCOLOR
rts
.endproc