Kernel 0.9.1 : Code reorganization & move to CSTR : SHELL, history & command editing

This commit is contained in:
Rémy GIBERT 2017-09-27 08:14:13 +02:00
parent f1a0c7f011
commit 7a753cfbea
4 changed files with 28 additions and 10 deletions

Binary file not shown.

Binary file not shown.

View File

@ -66,13 +66,14 @@ DRV.CS.START .DA STATUS
.DA CLOSE
.DA READ
.DA WRITE
L.STAT .DA STAT
L.DEVSTAT .DA DEVSTAT
*--------------------------------------
J.CtrlChars .DA ENQ 5
.DA BS 8
.DA LF 10
.DA CLRSCR 12
.DA CROUT 13
.DA FS 21
.DA ESC 27
*--------------------------------------
J.EscCodes .DA Scroll.Dn M
@ -86,7 +87,7 @@ J.EscSequences .DA Esc.DispAttr m
.DA Esc.Home H
.DA 0 end of relocation
*--------------------------------------
STATUS >LDYA L.STAT
STATUS >LDYA L.DEVSTAT
clc
rts
*--------------------------------------
@ -193,7 +194,7 @@ WRITE bit bEscMode
ldy CV
jsr SetCharAtXY
*--------------------------------------
FSOUT ldx CH
FS ldx CH
cpx #79
beq .8
@ -833,8 +834,8 @@ KeyRemappedRGHT .HS 1B5B4300 esc[C
TelnetOpt .DA #IAC,#DO,#TELOPT.ECHO
.DA #0
*--------------------------------------
CtrlChars.Cnt .EQ 6
CtrlChars .HS 05080A0C0D1B
CtrlChars.Cnt .EQ 7
CtrlChars .HS 05080A0C0D151B
bIACMode .BS 1
bEscMode .BS 1
bEscModeCSI .BS 1
@ -844,7 +845,7 @@ EscSeqParamTmp .BS 2
EscSeqParamCnt .BS 1
EscSeqParam .BS 4
*--------------------------------------
STAT .DA #S.DEVSTAT.S.WRITE+S.DEVSTAT.S.READ
DEVSTAT .DA #S.DEVSTAT.S.WRITE+S.DEVSTAT.S.READ
.DA #0,#0,#0
>PSTR "ANSI 80c Console"
.DA #S.DEVSTAT.T.CHAR

View File

@ -160,6 +160,9 @@ CS.RUN >LDA.G bReadMode READ Command ?
>LDA.G bCmdBufExec Something to execute ?
bpl .1
>LDA.G CmdBuflen
beq .10 Empty line
jsr CMD.Parse
>LDA.G CmdBuflen
@ -370,15 +373,19 @@ CS.CHARIN tax Save Char
* ora #0
* bne .3 ...until ending 0
txa
>LDA.G CmdBufPtr Insert char at Ptr
tay
txa
sta (ZPCMDBuf),y
>INC.G CmdBufPtr
>CMP.G CmdBuflen
bne .4
.4 >LDA.G bSecureRead
bne .8
@ -396,7 +403,7 @@ CS.CHARIN.CTRL
* >LDYA L.MSG.HEXBYTE
* >SYSCALL PrintF.YA
* plx
cpx #13 CR
bne .10
@ -488,14 +495,24 @@ CmdLine.CLR ldy #0
*--------------------------------------
CmdLine.BS >LDA.G CmdBufPtr
beq .9
dec
sta (pData),y
lda #8
>SYSCALL PutChar.A
>SYSCALL PutChar.A
.9 rts
*--------------------------------------
CmdLine.NAK rts
CmdLine.NAK >LDA.G CmdBufPtr
>CMP.G CmdBuflen
beq .9
inc
>STA.G CmdBufPtr
lda #21
>SYSCALL PutChar.A
.9 rts
*--------------------------------------
CmdLine.DEL >LDA.G CmdBuflen
beq .9