adding clrscr.s
This commit is contained in:
parent
4f1d007fb4
commit
1497330cc0
3 changed files with 36 additions and 0 deletions
|
@ -133,6 +133,9 @@ XPING = $9D
|
||||||
; Page $200
|
; Page $200
|
||||||
SCRX := $220
|
SCRX := $220
|
||||||
SCRY := $224
|
SCRY := $224
|
||||||
|
ADSCRL := $218
|
||||||
|
ADSCRH := $21C
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; Page $500
|
; Page $500
|
||||||
|
|
31
libsrc/telestrat/clrscr.s
Normal file
31
libsrc/telestrat/clrscr.s
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
.export _clrscr
|
||||||
|
|
||||||
|
.importzp sp
|
||||||
|
|
||||||
|
.include "telestrat.inc"
|
||||||
|
|
||||||
|
.proc _clrscr
|
||||||
|
lda #<SCREEN
|
||||||
|
ldy #>SCREEN
|
||||||
|
sta RES
|
||||||
|
sty RES+1
|
||||||
|
|
||||||
|
ldy #<(SCREEN+SCREEN_XSIZE*SCREEN_YSIZE)
|
||||||
|
ldx #>(SCREEN+SCREEN_XSIZE*SCREEN_YSIZE)
|
||||||
|
lda #' '
|
||||||
|
BRK_TELEMON XFILLM
|
||||||
|
|
||||||
|
|
||||||
|
; reset prompt position
|
||||||
|
lda #<(SCREEN+40)
|
||||||
|
sta ADSCRL
|
||||||
|
lda #>(SCREEN+40)
|
||||||
|
sta ADSCRH
|
||||||
|
|
||||||
|
; reset display position
|
||||||
|
lda #$01
|
||||||
|
sta SCRY
|
||||||
|
lda #$02
|
||||||
|
sta SCRX
|
||||||
|
rts
|
||||||
|
.endproc
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
|
|
||||||
.proc _gotoxy
|
.proc _gotoxy
|
||||||
|
; This function move only cursor for display, it does not move the prompt position
|
||||||
|
; in telemon, there is position for prompt, and another for the cursor
|
||||||
sta SCRY
|
sta SCRY
|
||||||
jsr popa
|
jsr popa
|
||||||
sta SCRX
|
sta SCRX
|
||||||
|
|
Loading…
Add table
Reference in a new issue