]> git.sur5r.net Git - cc65/commitdiff
Merge pull request #390 from jedeoric/master
authorOliver Schmidt <ol.sc@web.de>
Tue, 28 Feb 2017 11:34:18 +0000 (12:34 +0100)
committerGitHub <noreply@github.com>
Tue, 28 Feb 2017 11:34:18 +0000 (12:34 +0100)
Adding some conio's function

asminc/telestrat.inc
doc/telestrat.sgml
libsrc/telestrat/clrscr.s [new file with mode: 0644]
libsrc/telestrat/gotox.s [new file with mode: 0644]
libsrc/telestrat/gotoxy.s [new file with mode: 0644]
libsrc/telestrat/gotoy.s [new file with mode: 0644]
libsrc/telestrat/wherex.s [new file with mode: 0644]
libsrc/telestrat/wherey.s [new file with mode: 0644]

index 2c3502ba8821a0f769cdcabd93ecfb61d25fe983..8a51e1c32a3894a97a31ff2c9dd0fe6753e9ec99 100644 (file)
@@ -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
index 9032156eeb5375f4fc32123819f4f2c9b367da82..fda4dee86731da4e2fd7812d05ee575b8af4d7aa 100644 (file)
@@ -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 (file)
index 0000000..f2b8faf
--- /dev/null
@@ -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 (file)
index 0000000..d6af0e4
--- /dev/null
@@ -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 (file)
index 0000000..e0c8154
--- /dev/null
@@ -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 (file)
index 0000000..ed7101c
--- /dev/null
@@ -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 (file)
index 0000000..0dd5139
--- /dev/null
@@ -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 (file)
index 0000000..4958f10
--- /dev/null
@@ -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