Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-05-29 17:21:14 +02:00
parent 44ca710187
commit 267d70f474
8 changed files with 267 additions and 217 deletions

99
.Docs/TERM..md Normal file
View File

@ -0,0 +1,99 @@
| Esc Sequence | Description | DEC Code | A2osX TERM |
|--------------|-------------|----------|------------|
|Esc[20h |Set new line mode|LMN|OK|
|Esc[?1h |Set cursor key to application|DECCKM||
|Esc[?3h |Set number of columns to 132|DECCOLM||
|Esc[?4h |Set smooth scrolling|DECSCLM||
|Esc[?5h |Set reverse video on screen|DECSCNM|OK|
|Esc[?6h |Set origin to relative|DECOM||
|Esc[?7h |Set auto-wrap mode|DECAWM|OK|
|Esc[?8h |Set auto-repeat mode|DECARM||
|Esc[?9h |Set interlacing mode|DECINLM||
|||||
|Esc[20l |Set line feed mode|LMN|OK|
|Esc[?1l |Set cursor key to cursor|DECCKM||
|Esc[?2l |Set VT52 (versus ANSI) DECANM||
|Esc[?3l |Set number of columns to 80|DECCOLM
|Esc[?4l |Set jump scrolling| DECSCLM
|Esc[?5l |Set normal video on screen| DECSCNM |OK|
|Esc[?6l |Set origin to absolute| DECOM
|Esc[?7l |Reset auto-wrap mode| DECAWM |OK|
|Esc[?8l |Reset auto-repeat mode| DECARM
|Esc[?9l |Reset interlacing mode| DECINLM
|||||
|Esc= |Set alternate keypad mode| DECKPAM
|Esc> |Set numeric keypad mode| DECKPNM
|||||
|Esc(A |Set United Kingdom G0 character set| setukg0 |OK|
|Esc)A |Set United Kingdom G1 character set| setukg1 |OK|
|Esc(B |Set United States G0 character set| setusg0 |OK|
|Esc)B |Set United States G1 character set| setusg1 |OK|
|Esc(0 |Set G0 special chars. & line set| setspecg0 |OK|
|Esc)0 |Set G1 special chars. & line set| setspecg1 |OK|
|Esc(1 |Set G0 alternate character ROM| setaltg0 |OK|
|Esc)1 |Set G1 alternate character ROM| setaltg1 |OK|
|Esc(2 |Set G0 alt char ROM and spec. graphics| setaltspecg0 |OK|
|Esc)2 |Set G1 alt char ROM and spec. graphics| setaltspecg1 |OK|
|||||
|EscN |Set single shift 2| SS2
|EscO |Set single shift 3| SS3
|||||
|Esc[m |Turn off character attributes| SGR0 |OK|
|Esc[0m |Turn off character attributes| SGR0 |OK|
|Esc[1m |Turn bold mode on| SGR1
|Esc[2m |Turn low intensity mode on| SGR2
|Esc[4m |Turn underline mode on| SGR4
|Esc[5m |Turn blinking mode on| SGR5
|Esc[7m |Turn reverse video on| SGR7 |OK|
|Esc[8m |Turn invisible text mode on| SGR8
|||||
|Esc[Line;Liner |Set top and bottom lines of a window| DECSTBM |OK|
|||||
|Esc[ValueA |Move cursor up n lines| CUU
|Esc[ValueB |Move cursor down n lines| CUD
|Esc[ValueC |Move cursor right n lines| CUF
|Esc[ValueD |Move cursor left n lines| CUB
|Esc[H |Move cursor to upper left corner| cursorhome
|Esc[;H |Move cursor to upper left corner| cursorhome
|Esc[Line;ColumnH |Move cursor to screen location v,h| CUP |OK|
|Esc[f |Move cursor to upper left corner| hvhome
|Esc[;f |Move cursor to upper left corner| hvhome
|Esc[Line;Columnf |Move cursor to screen location v,h| CUP
|EscD |Move/scroll window up one line| IND
|EscM |Move/scroll window down one line| RI
|EscE |Move to next line| NEL
|Esc7 |Save cursor position and attributes| DECSC
|Esc8 |Restore cursor position and attributes| DECSC
|||||
|EscH |Set a tab at the current column| HTS
|Esc[g |Clear a tab at the current column| TBC
|Esc[0g |Clear a tab at the current column| TBC
|Esc[3g |Clear all tabs| TBC
|||||
|Esc#3 |Double-height letters, top half| DECDHL
|Esc#4 |Double-height letters, bottom half| DECDHL
|Esc#5 |Single width, single height letters| DECSWL
|Esc#6 |Double width, single height letters| DECDWL
|||||
|Esc[K |Clear line from cursor right| EL0 |OK|
|Esc[0K |Clear line from cursor right| EL0 |OK|
|Esc[1K |Clear line from cursor left | EL1 |OK|
|Esc[2K |Clear entire line| EL2 |OK|
|||||
|Esc[J |Clear screen from cursor down| ED0 |OK|
|Esc[0J |Clear screen from cursor down | ED0 |OK|
|Esc[1J |Clear screen from cursor up | ED1 |OK|
|Esc[2J |Clear entire screen | ED2 |OK|
|||||
|Esc5n |Device status report | DSR
|Esc0n |Response: terminal is OK | DSR
|Esc3n |Response: terminal is not OK | DSR
|||||
|Esc6n |Get cursor position | DSR |OK|
|EscLine;ColumnR |Response: cursor is at v,h | CPR |OK|
|||||
|Esc[c |Identify what terminal type | DA
|Esc[0c |Identify what terminal type (another)| DA
|Esc[?1;Value0c |Response: terminal type code n | DA
|||||
|Escc |Reset terminal to initial state| RIS |OK|

Binary file not shown.

View File

@ -88,30 +88,13 @@ BUF.InsertA sta TmpByte
*-------------------------------------- *--------------------------------------
BUF.DelSel jsr BUF.GetSelLen BUF.DelSel jsr BUF.GetSelLen
bcs .8 bcs .8
>STYA SelLen
.10 jsr BUF.ComputeCOffset lda BufLen
>LDA.G SelStart
cmp BUF.COffset
iny
lda (pData),y
sbc BUF.COffset+1
bcs .11
>DECW.G FileY
>STZ.G FileX
bra .10
.11 lda BufLen
sec sec
sbc SelLen sbc SelLen
pha tay
lda BufLen+1 lda BufLen+1
sbc SelLen+1 sbc SelLen+1
ply
iny iny
bne .1 bne .1
@ -183,12 +166,12 @@ BUF.DelCharAtCursor
BUF.SelToClipboard BUF.SelToClipboard
jsr BUF.GetSelLen jsr BUF.GetSelLen
bcs .8 bcs .8
>STYA SelLen
>LDA.G hClipBoard >LDA.G hClipBoard
beq .1 beq .1
>SYSCALL FreeMem >SYSCALL FreeMem
>STZ.G hClipBoard
.1 >LDYA SelLen .1 >LDYA SelLen
>SYSCALL GetMem >SYSCALL GetMem
@ -214,13 +197,13 @@ BUF.SelToClipboard
sta BufPtr+1 sta BufPtr+1
lda SelLen lda SelLen
ldy #ClipBoardLen+1 ldy #ClipBoardLen
sta (pData),y sta (pData),y
eor #$ff eor #$ff
tax tax
iny iny
lda SelLen lda SelLen+1
sta (pData),y sta (pData),y
eor #$ff eor #$ff
pha pha
@ -229,9 +212,10 @@ BUF.SelToClipboard
.2 inx .2 inx
bne .3 bne .3
pla pla
inc inc
beq .7 beq .8
pha pha
@ -244,8 +228,6 @@ BUF.SelToClipboard
inc ClipboardPtr+1 inc ClipboardPtr+1
bra .2 bra .2
.7 jsr BUF.ResetSel
.8 clc .8 clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
@ -458,7 +440,7 @@ BUF.GetNewYA phy
>SYSCALL GetMemPtr >SYSCALL GetMemPtr
>STYA BufPtrBackup >STYA BufPtrBackup
>STZ.G hBuffer
pla pla
ply ply
>SYSCALL GetMem >SYSCALL GetMem
@ -470,63 +452,64 @@ BUF.GetNewYA phy
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
BUF.ResetSel ldy #SelStart BUF.ResetSel lda #$ff
ldy #SelStart
lda #0 sta (pData),y
.1 sta (pData),y
iny iny
cpy #SelEnd+2 sta (pData),y
bne .1
iny #SelEnd
inc
sta (pData),y
iny
sta (pData),y
rts rts
*-------------------------------------- *--------------------------------------
BUF.CheckSelected BUF.CheckSelected
ldy #SelStart
lda BUF.COffset lda BUF.COffset
ldy #SelStart
cmp (pData),y cmp (pData),y
iny
lda BUF.COffset+1 lda BUF.COffset+1
iny
sbc (pData),y sbc (pData),y
bcc .9 bcc .9 CC:COffset < SelStart
iny #SelEnd iny #SelEnd
lda (pData),y
lda BUF.COffset clc
cmp (pData),y sbc BUF.COffset
iny iny
lda (pData),y
lda BUF.COffset+1 sbc BUF.COffset+1
sbc (pData),y * CC:SelEnd < COffset
.9 lda #0
.9 ror $80 = selected ror $80 = selected
rts rts
*-------------------------------------- *--------------------------------------
* Out : CC if ok, YA=SelLen
*--------------------------------------
BUF.GetSelLen ldy #SelEnd BUF.GetSelLen ldy #SelEnd
lda (pData),y lda (pData),y
sec sec
ldy #SelStart ldy #SelStart
sbc (pData),y sbc (pData),y
sta SelLen
tax tax
ldy #SelEnd+1 ldy #SelEnd+1
lda (pData),y lda (pData),y
sec
ldy #SelStart+1 ldy #SelStart+1
sbc (pData),y sbc (pData),y
sta SelLen+1
bcc .9 bcc .9
phx
ply
bne .8 bne .8
tax txa
beq .9 beq .9
.8 clc .8 clc

View File

@ -48,7 +48,7 @@ Prompt.Editor cmp #C.DEL
tax tax
jmp (J.CTRL,x) jmp (J.CTRL,x)
.9 jmp Ctrl.Q .9 rts
*-------------------------------------- *--------------------------------------
Ctrl.DEL jsr BUF.ComputeCOffset Ctrl.DEL jsr BUF.ComputeCOffset
@ -66,6 +66,7 @@ Ctrl.DEL jsr BUF.ComputeCOffset
*-------------------------------------- *--------------------------------------
Ctrl.Invalid Ctrl.Invalid
clc clc
Ctrl.Invalid.RTS
rts rts
*-------------------------------------- *--------------------------------------
Ctrl.A lda #PromptModeHelp Ctrl.A lda #PromptModeHelp
@ -87,7 +88,7 @@ Ctrl.A lda #PromptModeHelp
>PUSHBI 2 >PUSHBI 2
>LDYA L.MSG.HELPLINE >LDYA L.MSG.HELPLINE
>SYSCALL printf >SYSCALL printf
bcs .9 bcs Ctrl.Invalid.RTS
inc .1+1 inc .1+1
@ -99,10 +100,7 @@ Ctrl.A lda #PromptModeHelp
inc ZPPTR1+1 inc ZPPTR1+1
bra .1 bra .1
.8 jsr SCRN.UpdateStatusBar .8 jmp SCRN.UpdateStatusBar
bcs .9
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.B jsr BUF.ComputeCOffset Ctrl.B jsr BUF.ComputeCOffset
lda BUF.COffset lda BUF.COffset
@ -111,16 +109,9 @@ Ctrl.B jsr BUF.ComputeCOffset
lda BUF.COffset+1 lda BUF.COffset+1
iny iny
sta (pData),y sta (pData),y
jsr SCRN.UpdateMain jmp SCRN.UpdateMain
bcs .9
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.C jsr BUF.SelToClipboard Ctrl.C jmp BUF.SelToClipboard
bcs .9
.8 clc
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.E jsr BUF.ComputeCOffset Ctrl.E jsr BUF.ComputeCOffset
lda BUF.COffset lda BUF.COffset
@ -129,29 +120,22 @@ Ctrl.E jsr BUF.ComputeCOffset
lda BUF.COffset+1 lda BUF.COffset+1
iny iny
sta (pData),y sta (pData),y
jsr SCRN.UpdateMain jmp SCRN.UpdateMain
bcs .9
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.F lda #PromptModeFind Ctrl.F lda #PromptModeFind
>STA.G PromptMode >STA.G PromptMode
jsr SCRN.UpdateStatusBar jmp SCRN.UpdateStatusBar
bcs .9
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.G ldy #FileX Ctrl.G ldy #FileX
lda (pData),y lda (pData),y
beq .8 beq .8
lda #0 lda #0
sta (pData),y sta (pData),y
jsr SCRN.UpdateViewPort jmp SCRN.UpdateViewPort
bcs .9
.8 clc .8 clc
rts rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.BS ldy #FileX Ctrl.BS ldy #FileX
lda (pData),y lda (pData),y
@ -189,13 +173,10 @@ Ctrl.BS ldy #FileX
sbc #0 sbc #0
sta (pData),y sta (pData),y
.3 jsr SCRN.UpdateViewPort .3 jmp SCRN.UpdateViewPort
bcs .9
.8 clc .8 clc
rts rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.TAB Ctrl.TAB
clc clc
@ -228,12 +209,10 @@ Ctrl.LF ldy #FileY+1
inc inc
sta (pData),y sta (pData),y
.3 jsr SCRN.UpdateViewPort .3 jmp SCRN.UpdateViewPort
bcs .9
.8 clc .8 clc
rts rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.VT ldy #FileY+1 Ctrl.VT ldy #FileY+1
lda (pData),y lda (pData),y
@ -266,11 +245,10 @@ Ctrl.VT ldy #FileY+1
sbc #0 sbc #0
sta (pData),y sta (pData),y
jsr SCRN.UpdateViewPort jmp SCRN.UpdateViewPort
bcs .9
.8 clc .8 clc
rts rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.L jsr BUF.GetLine Ctrl.L jsr BUF.GetLine
bcs .8 bcs .8
@ -278,11 +256,10 @@ Ctrl.L jsr BUF.GetLine
tya Y = line length tya Y = line length
ldy #FileX ldy #FileX
sta (pData),y sta (pData),y
jsr SCRN.UpdateViewPort jmp SCRN.UpdateViewPort
bcs .9
.8 clc .8 clc
rts rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.CR lda #C.CR Ctrl.CR lda #C.CR
jsr BUF.InsertA jsr BUF.InsertA
@ -291,12 +268,9 @@ Ctrl.CR lda #C.CR
ldy #FileX ldy #FileX
lda #0 lda #0
sta (pData),y sta (pData),y
jsr SCRN.UpdateMain jmp SCRN.UpdateMain
bcs .9
clc .9 rts
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.N Ctrl.N
clc clc
@ -326,10 +300,7 @@ Ctrl.O ldy #FileY+1
ldy #FileX ldy #FileX
sta (pData),y sta (pData),y
jsr SCRN.UpdateViewPort jmp SCRN.UpdateViewPort
bcs .9
rts
.9 jmp Ctrl.Q
.8 pla .8 pla
jmp Ctrl.T jmp Ctrl.T
@ -365,10 +336,7 @@ Ctrl.P ldy #FileY+1
pla pla
sta (pData),y sta (pData),y
jsr SCRN.UpdateViewPort jmp SCRN.UpdateViewPort
bcs .9
rts
.9 jmp Ctrl.Q
.8 pla .8 pla
pla pla
@ -382,11 +350,7 @@ Ctrl.Q lda #$FF
Ctrl.R lda #PromptModeReplace Ctrl.R lda #PromptModeReplace
>STA.G PromptMode >STA.G PromptMode
jsr SCRN.UpdateStatusBar jmp SCRN.UpdateStatusBar
bcs .9
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.S lda #PromptModeSave Ctrl.S lda #PromptModeSave
>STA.G PromptMode >STA.G PromptMode
@ -409,19 +373,12 @@ Ctrl.S lda #PromptModeSave
.2 >STA.G PromptBufPtr .2 >STA.G PromptBufPtr
jsr SCRN.UpdateStatusBar jmp SCRN.UpdateStatusBar
bcs .9
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.T >STZ.G FileX Ctrl.T >STZ.G FileX
>STZW.G FileY >STZW.G FileY
jsr SCRN.UpdateViewPort jmp SCRN.UpdateViewPort
bcs .9
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.FS jsr BUF.GetLine Ctrl.FS jsr BUF.GetLine
bcs .8 bcs .8
@ -461,21 +418,18 @@ Ctrl.FS jsr BUF.GetLine
lda #0 lda #0
sta (pData),y sta (pData),y
.3 jsr SCRN.UpdateViewPort .3 jmp SCRN.UpdateViewPort
bcs .9
.8 clc .8 clc
rts rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.V jsr BUF.InsertClipboard Ctrl.V jsr BUF.InsertClipboard
bcs .9 bcs .9
jsr SCRN.UpdateMain jsr SCRN.UpdateMain
bcs .9 bcs .9
jsr SCRN.UpdateStatusBar jmp SCRN.UpdateStatusBar
bcs .9
rts .9 rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.W jsr BUF.ComputeCOffset Y=line len Ctrl.W jsr BUF.ComputeCOffset Y=line len
phy phy
@ -487,8 +441,17 @@ Ctrl.W jsr BUF.ComputeCOffset Y=line len
iny iny
sta (pData),y sta (pData),y
pla ply
sec +1 for CR clc
lda (BufPtr),y
bne .1
tya
beq .8 previoyus line\CR\0
iny
.1 tya
adc BUF.LOffset adc BUF.LOffset
ldy #SelEnd ldy #SelEnd
@ -498,19 +461,20 @@ Ctrl.W jsr BUF.ComputeCOffset Y=line len
iny iny
sta (pData),y sta (pData),y
bra Ctrl.D bra Ctrl.D
.8 rts
*-------------------------------------- *--------------------------------------
Ctrl.X jsr BUF.SelToClipboard Ctrl.X jsr BUF.SelToClipboard
bcs Ctrl.X.RTS bcs Ctrl.X.RTS
Ctrl.D jsr BUF.DelSel Ctrl.D jsr BUF.DelSel
bcs .9 bcs Ctrl.X.RTS
jsr SCRN.UpdateMain
bcs .9
jmp SCRN.UpdateStatusBar
bcs .9
rts
.9 jmp Ctrl.Q jsr SCRN.CursorAdjust
jsr SCRN.UpdateMain
bcs Ctrl.X.RTS
jmp SCRN.UpdateStatusBar
Ctrl.X.RTS rts Ctrl.X.RTS rts
*-------------------------------------- *--------------------------------------
@ -545,10 +509,7 @@ Ctrl.Y ldy #FileY+1
tya Y = line length tya Y = line length
>STA.G FileX >STA.G FileX
jsr SCRN.UpdateViewPort jmp SCRN.UpdateViewPort
bcs .9
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Ctrl.Z jsr BUF.ComputeCOffset Ctrl.Z jsr BUF.ComputeCOffset
@ -581,20 +542,16 @@ Prompt.Help >STZ.G PromptMode
jsr SCRN.UpdateMain jsr SCRN.UpdateMain
bcs .9 bcs .9
jsr SCRN.UpdateStatusBar jmp SCRN.UpdateStatusBar
bcs .9
rts
.9 jmp Ctrl.Q .9 rts
*-------------------------------------- *--------------------------------------
Prompt.Find cmp #3 Prompt.Find cmp #3
bne .1 bne .1
>STZ.G PromptMode >STZ.G PromptMode
jsr SCRN.UpdateStatusBar jmp SCRN.UpdateStatusBar
bcs .9
rts
.1 cmp #13 .1 cmp #13
bne .2 bne .2
@ -602,8 +559,7 @@ Prompt.Find cmp #3
.2 .2
clc clc
rts .9 rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
Prompt.Replace cmp #3 Prompt.Replace cmp #3
bne .1 bne .1
@ -621,8 +577,8 @@ Prompt.Replace cmp #3
clc clc
rts
.9 jmp Ctrl.Q .9 rts
*-------------------------------------- *--------------------------------------
Prompt.Save cmp #3 Ctrl-C Prompt.Save cmp #3 Ctrl-C
bne .1 bne .1
@ -694,11 +650,9 @@ Prompt.Save cmp #3 Ctrl-C
.81 jsr SCRN.UpdateTopBar .81 jsr SCRN.UpdateTopBar
bcs .9 bcs .9
.80 jsr SCRN.UpdateStatusBar .80 jmp SCRN.UpdateStatusBar
bcs .9
rts
.9 jmp Ctrl.Q .9 rts
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/EDIT.S.CTRL SAVE USR/SRC/BIN/EDIT.S.CTRL

View File

@ -2,7 +2,7 @@ NEW
AUTO 3,1 AUTO 3,1
.LIST OFF .LIST OFF
*-------------------------------------- *--------------------------------------
SCRN.Init >LDYAI 256+5+5+1 potentially NORM,INV & \0 SCRN.Init >LDYAI 510+5+5+4+1 potentially 255*\\ NORM,INV,CEOL & \0
>SYSCALL Getmem >SYSCALL Getmem
bcs .9 bcs .9
>STYA LineBufPtr >STYA LineBufPtr
@ -17,10 +17,6 @@ SCRN.Init >LDYAI 256+5+5+1 potentially NORM,INV & \0
>SYSCALL printf >SYSCALL printf
bcs .9 bcs .9
lda #12
>SYSCALL PutChar
bcs .9
lda #0 lda #0
ldy #FileX ldy #FileX
@ -184,8 +180,12 @@ SCRN.UpdateLineAtALenY
.5 lda (BufPtr) .5 lda (BufPtr)
jsr SCRN.ToLineBuf jsr SCRN.ToLineBuf
cmp #'\'
bne .51
inc BufPtr jsr SCRN.ToLineBuf
.51 inc BufPtr
bne .6 bne .6
inc BufPtr+1 inc BufPtr+1
@ -200,32 +200,37 @@ SCRN.UpdateLineAtALenY
bpl .80 bpl .80
jsr SCRN.ToggleSel jsr SCRN.ToggleSel
.80 lda #0 .80 ldy #0
sta (ZPPTR1)
.81 lda SEQ.CEOL,y
beq .82
jsr SCRN.ToLineBuf
iny
bra .81
.82 sta (ZPPTR1)
>PUSHBI 0 >PUSHBI 0
>LDYA LineBufPtr >LDYA LineBufPtr
>SYSCALL printf >SYSCALL printf
bcs .9 .9 rts
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
SCRN.ToggleSel ldy #0 SCRN.ToggleSel ldy #0
lda bSelected lda bSelected
eor #$ff
sta bSelected
bpl .1 bpl .1
ldy #6 ldy #6
.1 eor #$ff .1 lda SEQ.NORM,y
sta bSelected
.2 lda SEQ.NORM,y
beq .8 beq .8
jsr SCRN.ToLineBuf jsr SCRN.ToLineBuf
iny iny
bra .2 bra .1
.8 rts .8 rts
*-------------------------------------- *--------------------------------------
@ -283,8 +288,8 @@ SCRN.UpdateStatusBar
bcs .9 bcs .9
jmp SCRN.GotoCurXCurY jmp SCRN.GotoCurXCurY
.9 jmp Ctrl.Q .9 rts
*--------------------------------------
.2 eor #PromptModeHelp .2 eor #PromptModeHelp
beq .3 beq .3
>PUSHW pData >PUSHW pData
@ -317,9 +322,19 @@ SCRN.UpdateStatusBarErrA
>PUSHBI 1 >PUSHBI 1
>LDYA L.MSG.STATUSBAR.E >LDYA L.MSG.STATUSBAR.E
>SYSCALL printf >SYSCALL printf
bcs .9
rts rts
.9 jmp Ctrl.Q *--------------------------------------
SCRN.CursorAdjust
.1 jsr BUF.ComputeCOffset
bcc .8
>DECW.G FileY
>STZ.G FileX
bra .1
.8 rts
*-------------------------------------- *--------------------------------------
SCRN.ClearEOLA pha SCRN.ClearEOLA pha
@ -394,9 +409,7 @@ GotoXY txa
>PUSHBI 2 >PUSHBI 2
>LDYA L.MSG.GOTOXY >LDYA L.MSG.GOTOXY
>SYSCALL printf >SYSCALL printf
bcs .9 GotoXY.RTS rts
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
SCRN.UpdateViewPort SCRN.UpdateViewPort
lda #$ff lda #$ff
@ -457,8 +470,7 @@ SCRN.UpdateViewPort
bit bNotRepaint bit bNotRepaint
bpl .3 bpl .3
jsr SCRN.scrollDn ...and move content one line down jsr SCRN.scrollDn ...and move content one line down
bcc .3 bcs GotoXY.RTS
jmp Ctrl.Q
.4 ldy #ScreenY+1 .4 ldy #ScreenY+1
lda (pData),y lda (pData),y
@ -521,10 +533,8 @@ SCRN.UpdateViewPort
.6 jsr SCRN.UpdateStatusBar .6 jsr SCRN.UpdateStatusBar
bcs .9 bcs .9
jsr SCRN.GotoCurXCurY jmp SCRN.GotoCurXCurY
bcs .9 .9 rts
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
SCRN.scrollUp ldy #CurX SCRN.scrollUp ldy #CurX
lda (pData),y lda (pData),y
@ -556,10 +566,9 @@ SCRN.scrollUp ldy #CurX
ldy #ViewPortHm1 ldy #ViewPortHm1
lda (pData),y lda (pData),y
jsr SCRN.UpdateLineAtALenY jmp SCRN.UpdateLineAtALenY
bcs .9
rts .9 rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
SCRN.scrollDn ldy #CurX SCRN.scrollDn ldy #CurX
lda (pData),y lda (pData),y
@ -585,10 +594,8 @@ SCRN.scrollDn ldy #CurX
bcs .9 bcs .9
lda #0 lda #0
jsr SCRN.UpdateLineAtALenY jmp SCRN.UpdateLineAtALenY
bcs .9 .9 rts
rts
.9 jmp Ctrl.Q
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/BIN/EDIT.S.SCRN SAVE USR/SRC/BIN/EDIT.S.SCRN

View File

@ -167,15 +167,18 @@ CS.RUN.LOOP >SYSCALL GetChar
bcs CS.RUN.RTS I/O error bcs CS.RUN.RTS I/O error
jsr CharIn jsr CharIn
bcs .9
>LDA.G bCancel >LDA.G bCancel
bpl CS.RUN.LOOP bpl CS.RUN.LOOP
lda #0
.9 pha
>PUSHBI 0 >PUSHBI 0
>LDYA L.SEQ.RESET >LDYA L.SEQ.RESET
>SYSCALL printf >SYSCALL printf
pla
lda #0
sec sec
CS.RUN.RTS rts CS.RUN.RTS rts
*-------------------------------------- *--------------------------------------
@ -199,6 +202,7 @@ CS.QUIT ldy #hLineBuffer
.8 lda (pData),y .8 lda (pData),y
beq .9 beq .9
>SYSCALL FreeMem >SYSCALL FreeMem
clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CharIn tax CharIn tax
@ -400,9 +404,9 @@ LoadFile >PUSHWI 0 Aux type
bra .1 bra .1
.8 sta (BufPtr) .8 sta (BufPtr)
clc clc
.9 rts
.9 jmp BUF.ResetSel
*-------------------------------------- *--------------------------------------
SaveFile >PUSHWI 0 Aux type SaveFile >PUSHWI 0 Aux type
>PUSHBI S.FI.T.TXT >PUSHBI S.FI.T.TXT
@ -446,7 +450,7 @@ SaveFile >PUSHWI 0 Aux type
*-------------------------------------- *--------------------------------------
CS.END CS.END
SEQ.DETECT .AZ "Querying terminal capabilities...\e[999;999H\e[6n" SEQ.DETECT .AZ "Querying terminal capabilities...\e[999;999H\e[6n"
SEQ.INIT .AZ "\ec\e[7h\e[2;%dr" \e[?6h SEQ.INIT .AZ "\ec\e[?7l\e[2;%dr"
SEQ.RESET .AZ "\ec" SEQ.RESET .AZ "\ec"
SEQ.SCROLLUP .AZ "\e[%d;%dH\eD" SEQ.SCROLLUP .AZ "\e[%d;%dH\eD"
SEQ.SCROLLDN .AZ "\e[%d;%dH\eM" SEQ.SCROLLDN .AZ "\e[%d;%dH\eM"
@ -455,11 +459,11 @@ SEQ.INV .AZ "\e[7m"
SEQ.CEOL .AZ "\e[K" SEQ.CEOL .AZ "\e[K"
MSG.TOPBAR .AZ "\e[1;1HA2osX Edit:%s\e[0m" MSG.TOPBAR .AZ "\e[1;1HA2osX Edit:%s\e[0m"
MSG.STATUSBAR .AZ "Press Ctrl-A For Help Length:%5D,Col:%3d,Line:%5D" MSG.STATUSBAR .AZ "Press Ctrl-A For Help Length:%5D,Col:%3d,Line:%5D"
MSG.STATUSBAR.H .AZ "Press any key to exit this screen:\e[0m" MSG.STATUSBAR.H .AZ "Press any key to exit this screen:"
MSG.STATUSBAR.F .AZ "Find:%s\e[0m" MSG.STATUSBAR.F .AZ "Find:%s"
MSG.STATUSBAR.R .AZ "Replace:%s\e[0m" MSG.STATUSBAR.R .AZ "Replace:%s"
MSG.STATUSBAR.S .AZ "Save:%s\e[0m" MSG.STATUSBAR.S .AZ "Save:%s"
MSG.STATUSBAR.E .AZ "Error:%h\e[0m" MSG.STATUSBAR.E .AZ "Error:%h"
MSG.GOTOXY .AZ "\e[%d;%dH" MSG.GOTOXY .AZ "\e[%d;%dH"
MSG.HELPLINE .AZ "%S\e[K" MSG.HELPLINE .AZ "%S\e[K"
MSG.HELP >PSTR "All commands: (* = Not yet implemented)" MSG.HELP >PSTR "All commands: (* = Not yet implemented)"

View File

@ -359,8 +359,10 @@ DRV.TERM.COUT lda (ZPBufPtr)
DRV.TERM.COUT.FS DRV.TERM.COUT.FS
ldy #S.DCB.TTY.CH ldy #S.DCB.TTY.CH
lda (ZPDCBPtr),y lda (ZPDCBPtr),y
cmp #79 inc
bne .1 sta (ZPDCBPtr),y
cmp #80
bne DRV.TERM.COUT.FS.8
ldy #S.DCB.TTY.bLINEWRAP ldy #S.DCB.TTY.bLINEWRAP
lda (ZPDCBPtr),y lda (ZPDCBPtr),y
@ -372,9 +374,6 @@ DRV.TERM.COUT.FS
jmp DRV.TERM.COUT.LF.1 jmp DRV.TERM.COUT.LF.1
.1 inc
sta (ZPDCBPtr),y
DRV.TERM.COUT.FS.8 DRV.TERM.COUT.FS.8
clc clc
rts rts
@ -1047,7 +1046,7 @@ CLREOL ldy #S.DCB.TTY.CH
tay Start tay Start
ldx #80 End ldx #80 End
CLR stx .3+1 Save End CLR stx .1+1 Save End
phy phy
ldy #S.DCB.TTY.CV ldy #S.DCB.TTY.CV
@ -1056,17 +1055,19 @@ CLR stx .3+1 Save End
ply ply
.1 phy .1 cpy #$ff Self Modified
beq .8
phy
lda #" " lda #" "
jsr SetCharAtYX X unmodified jsr SetCharAtYX X unmodified
ply ply
iny iny
.3 cpy #$ff Self Modified bra .1
bne .1
clc .8 clc
rts rts
*-------------------------------------- *--------------------------------------
SCROLL.DN ldy #S.DCB.TTY.SCROLLBOT SCROLL.DN ldy #S.DCB.TTY.SCROLLBOT

View File

@ -174,6 +174,8 @@ SetCharAtCurPos pha
lda (ZPDCBPtr),y lda (ZPDCBPtr),y
tay tay
pla pla
cpy #80
bcs SetCharAtYX.8
*-------------------------------------- *--------------------------------------
SetCharAtYX cmp #$40 SetCharAtYX cmp #$40
bcc .1 bcc .1