Kernel 0.93++

This commit is contained in:
Rémy GIBERT 2020-01-27 16:09:00 +01:00
parent 272c301bc2
commit 5cbd146a65
3 changed files with 68 additions and 65 deletions

Binary file not shown.

View File

@ -82,13 +82,7 @@ SCRN.UpdateTopBarAsync
lda #C.CR lda #C.CR
jsr SCRN.ToLineBuf jsr SCRN.ToLineBuf
>LDA.G bUnSaved >LDA.G FileType
beq .2
lda #'!'
jsr SCRN.ToLineBuf
.2 >LDA.G FileType
tax tax
>PUSHW L.MSG.FILETYPES,x >PUSHW L.MSG.FILETYPES,x
@ -101,7 +95,13 @@ SCRN.UpdateTopBarAsync
jsr SCRN.LineBufSprintf jsr SCRN.LineBufSprintf
bcs .9 bcs .9
ldx #SEQ.CURRESTORE-SEQS >LDA.G bUnSaved
beq .2
lda #'!'
jsr SCRN.ToLineBuf
.2 ldx #SEQ.CURRESTORE-SEQS
jsr SCRN.SEQS.ToLineBuf jsr SCRN.SEQS.ToLineBuf
jmp SCRN.LineBufOut jmp SCRN.LineBufOut
@ -562,14 +562,6 @@ SCRN.LineBufInitBut
SCRN.LineBufInitEdit SCRN.LineBufInitEdit
phx phx
ldx #SEQ.EDIT-SEQS ldx #SEQ.EDIT-SEQS
bra SCRN.LineBufInit
SCRN.LineBufInitNorm
phx
ldx #SEQ.NORM-SEQS
bra SCRN.LineBufInit
SCRN.LineBufInitInv
phx
ldx #SEQ.INV-SEQS
SCRN.LineBufInit SCRN.LineBufInit
>LDYA.G LineBuf >LDYA.G LineBuf

View File

@ -259,42 +259,48 @@ CS.QUIT ldy #hLineBuf
CharIn tax CharIn tax
>LDA.G bEscMode >LDA.G bEscMode
bpl .1 Not in ESC mode
asl cpx #'[' \e[ ?
txa bne .11
bcc .1 Not in ESC mode
cmp #'[' lda (pData) #EscBufferPtr
beq .8 bne .19 buffer not empty...bad SEQ
lda (pData) #EscBuffer
inc
sta (pData)
cmp #32
bne .10
>DEBUG
>STZ.G bEscMode
clc clc
rts rts
.10 tay .11 lda (pData) #EscBufferPtr
cmp #16
bne .10
.19 >STZ.G bEscMode
clc
rts
.10 inc
sta (pData)
tay
txa txa
sta (pData),y sta (pData),y
cmp #64 cmp #64
bcc .8 bcc .8 not a letter...SEQ is incomplete
jsr CharIn.Esc jsr CharIn.Esc
bcs .8 Not translated, exit bcs .8 Not translated, exit
.HS B0 BCS
*--------------------------------------
.1 txa
.1 cmp #C.ESC cmp #C.ESC
bne .2 bne .2
lda #$ff lda #$ff
>STA.G bEscMode >STA.G bEscMode
inc inc
sta (pData) #EscBuffer sta (pData) #EscBufferPtr
.8 clc .8 clc
.9 rts .9 rts
@ -321,9 +327,17 @@ CharIn tax
*-------------------------------------- *--------------------------------------
CharIn.Esc >STZ.G bEscMode CharIn.Esc >STZ.G bEscMode
lda (pData) #EscBuffer lda (pData) #EscBufferPtr
tay tay
lda #0
sta (pData)
lda (pData),y lda (pData),y
cpy #1
bne .10
ldx #EscChars.Cnt-1 ldx #EscChars.Cnt-1
.1 cmp EscChars,x .1 cmp EscChars,x
@ -331,7 +345,10 @@ CharIn.Esc >STZ.G bEscMode
dex dex
bpl .1 bpl .1
cmp #'R' Response to cursor position query? sec
rts
.10 cmp #'R' Response to cursor position query?
beq .3 beq .3
sec sec
@ -340,29 +357,20 @@ CharIn.Esc >STZ.G bEscMode
.2 lda EscAscii,x .2 lda EscAscii,x
clc clc
rts rts
*--------------------------------------
* \e[xx;yyR
*--------------------------------------
.3 stz TmpByte .3 stz TmpByte
ldy #1 ldy #0
.4 lda (pData),y .4 iny
lda (pData),y
cmp #';' cmp #';'
beq .5 beq .5
and #$0f jsr CharIn.TmpByte10pA
pha
lda TmpByte
asl
asl
clc
adc TmpByte
asl
sta TmpByte
pla
clc
adc TmpByte
sta TmpByte
iny
bra .4 bra .4
.5 phy .5 phy
@ -382,12 +390,22 @@ CharIn.Esc >STZ.G bEscMode
ply ply
stz TmpByte stz TmpByte
iny .6 iny
.6 lda (pData),y lda (pData),y
cmp #'R' cmp #'R'
beq .7 beq .7
jsr CharIn.TmpByte10pA
bra .6
.7 lda TmpByte
>STA.G ScreenW
sec
rts
*--------------------------------------
CharIn.TmpByte10pA
and #$0f and #$0f
pha pha
lda TmpByte lda TmpByte
@ -401,13 +419,6 @@ CharIn.Esc >STZ.G bEscMode
clc clc
adc TmpByte adc TmpByte
sta TmpByte sta TmpByte
iny
bra .6
.7 lda TmpByte
>STA.G ScreenW
sec
rts rts
*-------------------------------------- *--------------------------------------
.INB USR/SRC/BIN/EDIT.S.BUF .INB USR/SRC/BIN/EDIT.S.BUF
@ -415,8 +426,8 @@ CharIn.Esc >STZ.G bEscMode
.INB USR/SRC/BIN/EDIT.S.DLG .INB USR/SRC/BIN/EDIT.S.DLG
.INB USR/SRC/BIN/EDIT.S.FILE .INB USR/SRC/BIN/EDIT.S.FILE
.INB USR/SRC/BIN/EDIT.S.SCRN .INB USR/SRC/BIN/EDIT.S.SCRN
CS.END
*-------------------------------------- *--------------------------------------
CS.END
SEQS .EQ * SEQS .EQ *
SEQ.BAR .AZ "\e[7m\e[37;40m" SEQ.BAR .AZ "\e[7m\e[37;40m"
SEQ.DLG .AS "\e[30;46m" SEQ.DLG .AS "\e[30;46m"
@ -600,7 +611,7 @@ DLG.FIND.LEN .EQ *-DLG.FIND
.DUMMY .DUMMY
.OR 0 .OR 0
DS.START DS.START
EscBuffer .BS 33 EscBuffer .BS 16
bEscMode .BS 1 bEscMode .BS 1
bExit .BS 1 bExit .BS 1