diff --git a/asminc/telestrat.inc b/asminc/telestrat.inc index 2c3502ba8..8a51e1c32 100644 --- a/asminc/telestrat.inc +++ b/asminc/telestrat.inc @@ -107,6 +107,7 @@ XWR0 = $10 XWSTR0 = $14 XTEXT = $19 XHIRES = $1A +XFILLM = $1C XMINMA = $1F XFREAD = $27 ; only in TELEMON 3.0 XOPEN = $30 ; only in TELEMON 3.0 @@ -128,6 +129,13 @@ XINK = $93 XEXPLO = $9C XPING = $9D +; --------------------------------------------------------------------------- +; Page $200 +SCRX := $220 +SCRY := $224 +ADSCRL := $218 +ADSCRH := $21C + ; --------------------------------------------------------------------------- ; Page $500 diff --git a/doc/telestrat.sgml b/doc/telestrat.sgml index 9032156ee..fda4dee86 100644 --- a/doc/telestrat.sgml +++ b/doc/telestrat.sgml @@ -141,7 +141,7 @@ Telestrat manages also mouse, but it had been no handled yet in this version. Telestrat has a RS232 port, but it's not used -</descrip>< +</descrip> <sect>Limitations<label id="limitations"><p> diff --git a/libsrc/telestrat/clrscr.s b/libsrc/telestrat/clrscr.s new file mode 100644 index 000000000..f2b8fafc1 --- /dev/null +++ b/libsrc/telestrat/clrscr.s @@ -0,0 +1,35 @@ +; +; jede jede@oric.org 2017-02-25 +; + + .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 #$00 + sta SCRX + rts +.endproc diff --git a/libsrc/telestrat/gotox.s b/libsrc/telestrat/gotox.s new file mode 100644 index 000000000..d6af0e4dd --- /dev/null +++ b/libsrc/telestrat/gotox.s @@ -0,0 +1,16 @@ +; +; jede jede@oric.org 2017-02-25 +; + .export _gotox + + .import popa + + .importzp sp + + .include "telestrat.inc" + + +.proc _gotox + sta SCRX + rts +.endproc diff --git a/libsrc/telestrat/gotoxy.s b/libsrc/telestrat/gotoxy.s new file mode 100644 index 000000000..e0c8154e3 --- /dev/null +++ b/libsrc/telestrat/gotoxy.s @@ -0,0 +1,19 @@ +; +; jede jede@oric.org 2017-02-25 +; + .export _gotoxy + + .import popa + + .importzp sp + + .include "telestrat.inc" + +.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 + jsr popa + sta SCRX + rts +.endproc diff --git a/libsrc/telestrat/gotoy.s b/libsrc/telestrat/gotoy.s new file mode 100644 index 000000000..ed7101c80 --- /dev/null +++ b/libsrc/telestrat/gotoy.s @@ -0,0 +1,13 @@ +; +; jede jede@oric.org 2017-02-25 +; + .export _gotoy + + .importzp sp + + .include "telestrat.inc" + +.proc _gotoy + sta SCRY + rts +.endproc diff --git a/libsrc/telestrat/wherex.s b/libsrc/telestrat/wherex.s new file mode 100644 index 000000000..0dd5139e1 --- /dev/null +++ b/libsrc/telestrat/wherex.s @@ -0,0 +1,14 @@ +; +; jede jede@oric.org 2017-02-25 +; + .export _wherex + + .importzp sp + + .include "telestrat.inc" + +.proc _wherex + ldx #$00 + lda SCRX + rts +.endproc diff --git a/libsrc/telestrat/wherey.s b/libsrc/telestrat/wherey.s new file mode 100644 index 000000000..4958f10cf --- /dev/null +++ b/libsrc/telestrat/wherey.s @@ -0,0 +1,14 @@ +; +; jede jede@oric.org 2017-02-25 +; + .export _wherey + + .importzp sp + + .include "telestrat.inc" + +.proc _wherey + ldx #$00 + lda SCRY + rts +.endproc