From cb61ec98061b8d9980153919e46bed2a3c481738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Mon, 4 Jan 2016 23:15:29 +0100 Subject: [PATCH] Fixed The Editor scrolling issue. Getty now try to disable local echo in telnet terminal --- BIN/EDIT.S.BUF.txt | 4 ++-- BIN/EDIT.S.SCRN.txt | 47 ++++++++++++++++++++++++++++----------------- BIN/EDIT.S.txt | 36 ++++++++++++++++++---------------- SBIN/GETTY.S.txt | 2 +- 4 files changed, 51 insertions(+), 38 deletions(-) diff --git a/BIN/EDIT.S.BUF.txt b/BIN/EDIT.S.BUF.txt index e2405732..312b4327 100644 --- a/BIN/EDIT.S.BUF.txt +++ b/BIN/EDIT.S.BUF.txt @@ -26,7 +26,7 @@ BUF.CheckSelected .9 sec rts *-------------------------------------- -BUF.InsertA sta TmpChar +BUF.InsertA sta TmpByte jsr BUF.ComputeCOffset cpy #255 bne .10 @@ -65,7 +65,7 @@ BUF.InsertA sta TmpChar inc BufPtr+1 bra .1 -.2 lda TmpChar +.2 lda TmpByte sta (BufPtr),y inc BufPtr bne .3 diff --git a/BIN/EDIT.S.SCRN.txt b/BIN/EDIT.S.SCRN.txt index dbf3e268..021f9856 100644 --- a/BIN/EDIT.S.SCRN.txt +++ b/BIN/EDIT.S.SCRN.txt @@ -8,7 +8,6 @@ AUTO 6 InitScreen ldy #ScreenH lda (pData),y dec - dec >PUSHA >LDYA L.SEQ.INIT >SYSCALL SYS.PSTRoutYA @@ -68,28 +67,33 @@ UpdateMain ldy #ScreenY sta TmpIndex+1 lda #0 + sta TmpByte + + ldy #ScreenH + lda (pData),y + dec + dec sta TmpCount .1 >LDAX TmpIndex jsr BUF.GetLineAX Y = line length bcs .5 - lda TmpCount + lda TmpByte jsr UpdateLineAtALenY bcs .9 -.3 inc TmpIndex +.3 inc TmpByte + inc TmpIndex bne .4 inc TmpIndex+1 -.4 inc TmpCount - lda TmpCount - cmp #22 +.4 dec TmpCount bne .1 jmp GotoCurXCurY .5 ldx #0 - ldy TmpCount + ldy TmpByte jsr GotoXY bcs .9 @@ -97,9 +101,8 @@ UpdateMain ldy #ScreenY >SYSCALL SYS.PSTROutYA bcs .9 - inc TmpCount - lda TmpCount - cmp #22 + inc TmpByte + dec TmpCount bne .5 jmp GotoCurXCurY @@ -229,7 +232,6 @@ UpdateStatusBar ldy #PromptMode ldy #ScreenH lda (pData),y - dec >PUSHA >LDYA L.MSG.STATUSBAR >SYSCALL SYS.PSTRoutYA @@ -279,14 +281,16 @@ UpdateViewPort lda #$ff stz bNotRepaint bra .1 -.2 ldy #ScreenX +.2 clc + ldy #ScreenX lda (pData),y - clc - adc #79 + + ldy #ScreenW + adc (pData),y + dec ldy #FileX cmp (pData),y bcs .3 out of right border ? - ldy #ScreenX lda (pData),y inc @@ -323,15 +327,22 @@ UpdateViewPort lda #$ff .4 clc ldy #ScreenY lda (pData),y - adc #21 + ldy #ScreenH + adc (pData),y pha - iny + ldy #ScreenY+1 lda (pData),y adc #0 tax pla + sec - ldy #FileY + sbc #3 + bcs .41 + dex + sec + +.41 ldy #FileY sbc (pData),y txa iny diff --git a/BIN/EDIT.S.txt b/BIN/EDIT.S.txt index 8ce06164..9e1a5b22 100644 --- a/BIN/EDIT.S.txt +++ b/BIN/EDIT.S.txt @@ -312,59 +312,61 @@ CS.DOEVENT.Esc ldy #bEscMode clc rts -.3 stz TmpChar +.3 stz TmpByte + + ldy #EscBuffer+1 - ldy #EscBuffer .4 lda (pData),y cmp #';' beq .5 and #$0f pha - lda TmpChar + lda TmpByte asl asl clc - adc TmpChar + adc TmpByte asl - sta TmpChar + sta TmpByte pla clc - adc TmpChar - sta TmpChar + adc TmpByte + sta TmpByte iny bra .4 .5 phy - lda TmpChar + lda TmpByte ldy #ScreenH sta (pData),y ply - stz TmpChar + stz TmpByte + + iny - ldy #EscBuffer .6 lda (pData),y cmp #'R' beq .7 and #$0f pha - lda TmpChar + lda TmpByte asl asl clc - adc TmpChar + adc TmpByte asl - sta TmpChar + sta TmpByte pla clc - adc TmpChar - sta TmpChar + adc TmpByte + sta TmpByte iny bra .6 -.7 lda TmpChar +.7 lda TmpByte ldy #ScreenW sta (pData),y @@ -452,7 +454,7 @@ MSG.HELP >PSTRING "Commands:" EscChars >PSTRING "DBAC" EscAscii .HS 04080A0B15 hFile .BS 1 -TmpChar .BS 1 +TmpByte .BS 1 TmpLen .BS 2 TmpCount .BS 2 TmpIndex .BS 2 diff --git a/SBIN/GETTY.S.txt b/SBIN/GETTY.S.txt index 37333d82..0f5476d2 100644 --- a/SBIN/GETTY.S.txt +++ b/SBIN/GETTY.S.txt @@ -132,7 +132,7 @@ CS.QUIT ldy #hBinName *-------------------------------------- CS.END MSG.USAGE >PSTRING "GETTY " -MSG.GREETINGS >PSTRING "A2osX-GeTTY on Dev=" +MSG.GREETINGS >PSTRING "\e[12h\nA2osX-GeTTY on Dev=" hDEVNAME .BS 1 *-------------------------------------- .DUMMY