1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00
cc65/libsrc/telestrat/clrscr.s

45 lines
941 B
ArmAsm
Raw Normal View History

;
; jede jede@oric.org 2017-02-25
2019-02-05 23:27:52 +01:00
;
2017-02-25 22:10:13 +01:00
.export _clrscr
2019-07-21 10:57:17 +02:00
.import OLD_CHARCOLOR, OLD_BGCOLOR
2019-07-17 21:48:53 +02:00
2017-02-25 22:10:13 +01:00
.include "telestrat.inc"
.proc _clrscr
2017-10-16 17:28:00 +02:00
; Switch to text mode
2019-02-05 23:27:52 +01:00
BRK_TELEMON(XTEXT)
2017-10-16 17:28:00 +02:00
2019-07-06 10:16:57 +02:00
lda #<SCREEN ; Get position screen
2017-02-25 22:23:46 +01:00
ldy #>SCREEN
2017-02-25 22:10:13 +01:00
sta RES
sty RES+1
ldy #<(SCREEN+SCREEN_XSIZE*SCREEN_YSIZE)
ldx #>(SCREEN+SCREEN_XSIZE*SCREEN_YSIZE)
lda #' '
2019-07-06 10:16:57 +02:00
BRK_TELEMON XFILLM ; Calls XFILLM : it fills A value from RES address and size of X and Y value
2019-02-05 23:27:52 +01:00
2017-02-25 22:23:46 +01:00
; reset prompt position
2017-02-25 22:10:13 +01:00
lda #<(SCREEN+40)
sta ADSCRL
lda #>(SCREEN+40)
sta ADSCRH
2019-02-05 23:27:52 +01:00
2017-02-25 22:23:46 +01:00
; reset display position
2019-07-10 21:44:07 +02:00
ldx #$01
stx SCRY
dex
stx SCRX
2019-07-17 21:48:53 +02:00
2019-07-21 18:38:17 +02:00
; At this step X is equal to $00
2019-07-21 10:56:32 +02:00
dex
2019-07-21 18:38:17 +02:00
; At this step X is equal to $FF
stx OLD_BGCOLOR
stx OLD_CHARCOLOR
2019-07-06 10:16:57 +02:00
2017-02-25 22:10:13 +01:00
rts
2019-02-05 23:27:52 +01:00
.endproc