1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc/telestrat/clrscr.s

48 lines
970 B
ArmAsm
Raw Normal View History

;
; jede jede@oric.org 2017-02-25
2019-02-05 22:27:52 +00:00
;
2017-02-25 21:10:13 +00:00
.export _clrscr
2019-02-05 22:27:52 +00:00
2019-07-06 08:16:57 +00:00
.import CHARCOLOR_CHANGE, CHARCOLOR, BGCOLOR, BGCOLOR_CHANGE
2017-02-25 21:10:13 +00:00
.include "telestrat.inc"
.proc _clrscr
2017-10-16 15:28:00 +00:00
; Switch to text mode
2019-02-05 22:27:52 +00:00
BRK_TELEMON(XTEXT)
2017-10-16 15:28:00 +00:00
2019-07-06 08:16:57 +00:00
lda #<SCREEN ; Get position screen
2017-02-25 21:23:46 +00:00
ldy #>SCREEN
2017-02-25 21:10:13 +00:00
sta RES
sty RES+1
ldy #<(SCREEN+SCREEN_XSIZE*SCREEN_YSIZE)
ldx #>(SCREEN+SCREEN_XSIZE*SCREEN_YSIZE)
lda #' '
2019-07-06 08:16:57 +00:00
BRK_TELEMON XFILLM ; Calls XFILLM : it fills A value from RES address and size of X and Y value
2019-02-05 22:27:52 +00:00
2017-02-25 21:23:46 +00:00
; reset prompt position
2017-02-25 21:10:13 +00:00
lda #<(SCREEN+40)
sta ADSCRL
lda #>(SCREEN+40)
sta ADSCRH
2019-02-05 22:27:52 +00:00
2017-02-25 21:23:46 +00:00
; reset display position
lda #$01
2017-02-25 21:10:13 +00:00
sta SCRY
lda #$00
2019-02-05 22:27:52 +00:00
sta SCRX
2019-07-06 08:16:57 +00:00
lda #$00
sta CHARCOLOR_CHANGE
sta BGCOLOR_CHANGE
lda #$07
sta CHARCOLOR
sta BGCOLOR
2017-02-25 21:10:13 +00:00
rts
2019-02-05 22:27:52 +00:00
.endproc