mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-08 04:29:37 +00:00
Kernel 0.9.1 : Code reorganization & move to CSTR (SHELL)
This commit is contained in:
parent
07fb258787
commit
4d2aab3e63
Binary file not shown.
Binary file not shown.
@ -5,17 +5,24 @@ INC 1
|
||||
AUTO 6
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
* Remove extra SPACE & comment
|
||||
CMD.Init >LDYAI CmdLine.MAX+1
|
||||
>SYSCALL GetMem.YA
|
||||
bcs .9
|
||||
txa
|
||||
>SETG.A hCmdBuf
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
Cmd.Normalize >LDYA ZPBufBase
|
||||
* ZPCMDBuf : Remove extra SPACE & comment
|
||||
*--------------------------------------
|
||||
Cmd.Parse >LDYA ZPCMDBuf
|
||||
>STYA ZPPtr1
|
||||
|
||||
lda (ZPBufBase) empty line...quit
|
||||
lda (ZPCMDBuf) empty line...quit
|
||||
beq .9
|
||||
|
||||
ldy #0
|
||||
|
||||
.1 jsr Cmd.Normalize.Next
|
||||
.1 jsr Cmd.Parse.NextC
|
||||
beq .8 no more char, exit
|
||||
|
||||
cmp #' ' skip leading spaces
|
||||
@ -24,19 +31,19 @@ Cmd.Normalize >LDYA ZPBufBase
|
||||
cmp #'#' Comment ?
|
||||
beq .8 ignore remaining chars
|
||||
|
||||
.3 sta (ZPBufBase),y add char to buffer
|
||||
.3 sta (ZPCMDBuf),y add char to buffer
|
||||
iny
|
||||
|
||||
jsr Cmd.Normalize.Next
|
||||
jsr Cmd.Parse.NextC
|
||||
beq .8
|
||||
|
||||
cmp #' '
|
||||
bne .3
|
||||
|
||||
sta (ZPBufBase),y add One SPACE to buffer
|
||||
sta (ZPCMDBuf),y add One SPACE to buffer
|
||||
iny
|
||||
|
||||
.5 jsr Cmd.Normalize.Next
|
||||
.5 jsr Cmd.Parse.NextC
|
||||
beq .8
|
||||
|
||||
cmp #' '
|
||||
@ -44,12 +51,11 @@ Cmd.Normalize >LDYA ZPBufBase
|
||||
bne .3 no more space, add next word...
|
||||
|
||||
.8 lda #0
|
||||
sta (ZPBufBase),y
|
||||
sta (ZPCMDBuf),y
|
||||
|
||||
.9 rts
|
||||
|
||||
Cmd.Normalize.Next
|
||||
lda (ZPPtr1)
|
||||
Cmd.Parse.NextC lda (ZPPtr1)
|
||||
beq .8
|
||||
|
||||
inc ZPPtr1
|
||||
@ -57,51 +63,56 @@ Cmd.Normalize.Next
|
||||
inc ZPPtr1+1 never Z
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
* Y,A -> Command line (formatted & not empty)
|
||||
* ZPCMDBuf-> Command line (formatted & not empty)
|
||||
*--------------------------------------
|
||||
Cmd.ExecYA stz bStartProc
|
||||
Cmd.Exec stz bStartProc
|
||||
>LDYA ZPCMDBuf
|
||||
|
||||
Cmd.ExecYA >SYSCALL ExpandStr.YA
|
||||
>STYA ZPPtr1 Ptr to CMD
|
||||
|
||||
txa
|
||||
>SETG.A CMD.hCmdLine
|
||||
|
||||
Cmd.ExecYA.1 >SYSCALL ExpandStr.YA
|
||||
>STYA ZPPtr1
|
||||
>STYA ZPPtr2
|
||||
stx Cmd.ExecYA.Exit.1+1
|
||||
|
||||
ldy #0 CMD len
|
||||
ldy #$ff CMD Len
|
||||
|
||||
lda (ZPPtr2)
|
||||
tax ARGS len=Total Len
|
||||
|
||||
.1 inc ZPPtr2 Next Cmd Char
|
||||
bne .2
|
||||
inc ZPPtr2+1
|
||||
|
||||
.2 lda (ZPPtr2)
|
||||
.1 iny
|
||||
lda (ZPPtr1),y Get CMD char...
|
||||
beq .2
|
||||
|
||||
cmp #" " we reached blank between CMD ARGS
|
||||
beq .3
|
||||
|
||||
iny CMD+1
|
||||
dex Total=0
|
||||
bne .1
|
||||
|
||||
.3 tya
|
||||
sta (ZPPtr1) Cut CMD
|
||||
txa
|
||||
sta (ZPPtr2) Cut ARGS
|
||||
.2 phy Y=CMD len
|
||||
|
||||
>LDYA L.INTCMDS
|
||||
>STYA ZPPtr3
|
||||
>STYA ZPPtr2
|
||||
|
||||
ldx #0
|
||||
|
||||
.4 lda (ZPPtr3)
|
||||
beq Cmd.Exec.EXT Ending 0, must be an external Cmd....
|
||||
.3 lda (ZPPtr2)
|
||||
beq Cmd.Exec.EXT Array Ending 0, must be an external Cmd....
|
||||
|
||||
cmp (ZPPtr1) Same Len ?
|
||||
bne .8
|
||||
pla get back CMD len
|
||||
pha
|
||||
|
||||
tay
|
||||
cmp (ZPPtr2) Same Len ?
|
||||
beq .5
|
||||
|
||||
.5 lda (ZPPtr1),y
|
||||
.4 inx
|
||||
inx
|
||||
|
||||
lda ZPPtr2
|
||||
sec
|
||||
adc (ZPPtr2)
|
||||
sta ZPPtr2
|
||||
bcc .3
|
||||
inc ZPPtr2+1
|
||||
bra .3
|
||||
|
||||
.5 tay
|
||||
dey
|
||||
lda (ZPPtr1),y
|
||||
|
||||
cmp #'a' To Uppercase
|
||||
bcc .6
|
||||
@ -109,36 +120,37 @@ Cmd.ExecYA.1 >SYSCALL ExpandStr.YA
|
||||
bcs .6
|
||||
eor #$20
|
||||
|
||||
.6 cmp (ZPPtr3),y
|
||||
bne .8
|
||||
.6 iny
|
||||
cmp (ZPPtr2),y
|
||||
bne .4
|
||||
dey
|
||||
bne .6
|
||||
dey
|
||||
bne .5
|
||||
|
||||
ply get back Cmd Len
|
||||
lda (ZPPtr1),y
|
||||
beq .7 ARGS = ""
|
||||
iny skip " "
|
||||
.7 tya
|
||||
clc
|
||||
adc ZPPtr1
|
||||
sta ZPPtr2
|
||||
lda #0
|
||||
adc ZPPtr1+1
|
||||
sta ZPPtr2+1 ZPPtr2->ARGS
|
||||
|
||||
jsr Cmd.Exec.INT Found an internal Cmd...
|
||||
|
||||
bcs .7
|
||||
bcs .9
|
||||
|
||||
lda #0
|
||||
|
||||
.7 ldy #S.PS.RC
|
||||
.9 ldy #S.PS.RC
|
||||
sta (pPS),y
|
||||
bra Cmd.ExecYA.Exit
|
||||
|
||||
.8 inx
|
||||
inx
|
||||
|
||||
lda ZPPtr3
|
||||
sec
|
||||
adc (ZPPtr3)
|
||||
sta ZPPtr3
|
||||
bcc .4
|
||||
inc ZPPtr3+1
|
||||
bra .4
|
||||
*--------------------------------------
|
||||
Cmd.ExecYA.Exit php
|
||||
pha
|
||||
Cmd.ExecYA.Exit.1
|
||||
lda #$ff
|
||||
Cmd.Exec.Done php
|
||||
pha
|
||||
>GETG.A CMD.hCmdLine
|
||||
>SYSCALL FreeMem.A
|
||||
pla
|
||||
plp
|
||||
@ -146,8 +158,9 @@ Cmd.ExecYA.Exit.1
|
||||
*--------------------------------------
|
||||
Cmd.Exec.INT jmp (J.INTCMDS,x)
|
||||
*--------------------------------------
|
||||
Cmd.Exec.EXT ldy #1
|
||||
lda (ZPPtr1),y
|
||||
Cmd.Exec.EXT pla Discard CMD len
|
||||
|
||||
lda (ZPPtr1)
|
||||
cmp #'/' Command line is already full path, no search
|
||||
bne .10
|
||||
jmp .3
|
||||
@ -201,7 +214,7 @@ Cmd.Exec.EXT ldy #1
|
||||
|
||||
.9 lda #SYSMGR.ERRSYN
|
||||
sec
|
||||
.99 jmp Cmd.ExecYA.Exit
|
||||
.99 jmp Cmd.Exec.Done
|
||||
*--------------------------------------
|
||||
* TXT : Launch "/PATH/SHELL /PATH/CMD ARGS"
|
||||
*--------------------------------------
|
||||
@ -241,10 +254,10 @@ Cmd.Exec.EXT.BIN
|
||||
bmi .2 startproc
|
||||
|
||||
>SYSCALL ExecProcessNewEnvYA
|
||||
jmp Cmd.ExecYA.Exit
|
||||
jmp Cmd.Exec.Done
|
||||
|
||||
.2 >SYSCALL CreateProcessYA
|
||||
jmp Cmd.ExecYA.Exit
|
||||
jmp Cmd.Exec.Done
|
||||
*--------------------------------------
|
||||
* Internal Commands
|
||||
*--------------------------------------
|
||||
@ -374,7 +387,7 @@ Cmd.Exec.STARTPROC
|
||||
ror bStartProc
|
||||
|
||||
>LDYA L.ARGS
|
||||
jmp Cmd.ExecYA.1
|
||||
jmp Cmd.ExecYA
|
||||
*--------------------------------------
|
||||
Cmd.Exec.SET lda ARGS
|
||||
bne Cmd.Exec.SETVAR
|
||||
@ -505,12 +518,11 @@ Cmd.Exec.READ lda ARGS
|
||||
beq .9
|
||||
|
||||
lda #0
|
||||
ldy #bSecureRead
|
||||
sta (pData),y
|
||||
>SETG.A bSecureRead
|
||||
|
||||
lda pData
|
||||
clc
|
||||
adc #VarBuffer
|
||||
adc #CMD.VarName
|
||||
sta ZPPTR1
|
||||
lda pData+1
|
||||
adc #0
|
||||
@ -534,9 +546,8 @@ Cmd.Exec.READ lda ARGS
|
||||
cmp #'S'
|
||||
bne .2
|
||||
|
||||
ldy #bSecureRead
|
||||
lda #$80
|
||||
sta (pData),y
|
||||
>SETG.A bSecureRead
|
||||
bra .1
|
||||
|
||||
.2 cmp #'P'
|
||||
@ -612,15 +623,13 @@ Cmd.Exec.SLEEP lda ARGS
|
||||
rts
|
||||
.9 jmp Cmd.Exec.ERRSYN
|
||||
*--------------------------------------
|
||||
Cmd.Exec.PAUSE ldy #bPause
|
||||
lda #$80
|
||||
sta (pData),y
|
||||
Cmd.Exec.PAUSE lda #$FF
|
||||
>SETG.A bPause
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
Cmd.Exec.EXIT ldy #bEXIT
|
||||
lda #$FF
|
||||
sta (pData),y
|
||||
Cmd.Exec.EXIT lda #$FF
|
||||
>SETG.A bExit
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -12,7 +12,24 @@ CSH.TYPE.INT .EQ 2
|
||||
CSH.TYPE.LONG .EQ 3
|
||||
CSH.TYPE.FLOAT .EQ 4
|
||||
*--------------------------------------
|
||||
CSH.Init >LDYAI 256
|
||||
CSH.Init >PUSHWI 0 Aux type
|
||||
>PUSHBI 4 S.FILEINFO.TYPE.TXT
|
||||
>PUSHBI SYS.FOpen.R
|
||||
|
||||
lda #1
|
||||
>SYSCALL GetArg.A
|
||||
>PUSHYA
|
||||
>SYSCALL LoadFile
|
||||
bcs .9
|
||||
>SETG.YA CSH.BufLen
|
||||
|
||||
txa
|
||||
>SETG.A CSH.hBuf
|
||||
|
||||
lda #$FF
|
||||
>SETG.A bExitOnEOF
|
||||
|
||||
>LDYAI 256
|
||||
>SYSCALL GetMem0.YA
|
||||
bcs .9
|
||||
txa
|
||||
@ -123,11 +140,11 @@ CSH.Run jsr CSH.GetBuf
|
||||
.5
|
||||
|
||||
|
||||
jsr CSH.RestorePtr Restore ptr to get full cmd line to execute
|
||||
jsr CSH.RestorePtr Restore ptr to get full cmd line to execute
|
||||
|
||||
>GETG.A hCmdBuf Get the buffer
|
||||
>SYSCALL GetMemPtr.A
|
||||
|
||||
>STYA ZPCMDBuf
|
||||
|
||||
jsr CSH.GetCharNB
|
||||
|
||||
@ -135,8 +152,8 @@ CSH.Run jsr CSH.GetBuf
|
||||
|
||||
.6 cmp #13
|
||||
beq .7
|
||||
sta (ZPCMDBuf),y
|
||||
iny
|
||||
sta (pData),y
|
||||
cpy #CmdLine.MAX
|
||||
beq .8
|
||||
|
||||
@ -146,14 +163,18 @@ CSH.Run jsr CSH.GetBuf
|
||||
|
||||
.7 jsr CSH.GetNextCharNB Skip CR
|
||||
|
||||
.8 tya
|
||||
sta (pData)
|
||||
.8 lda #0
|
||||
sta (ZPCMDBuf),y
|
||||
tya
|
||||
>SETG.A CmdBuflen
|
||||
lda #$ff
|
||||
>SETG.A bCmdBufexec
|
||||
|
||||
ldy #bEcho
|
||||
lda (pData),y
|
||||
beq .80
|
||||
|
||||
>PUSHW pData
|
||||
>PUSHW ZPCMDBuf
|
||||
>LDYA L.MSG.ECHO
|
||||
>SYSCALL PrintF.YA
|
||||
|
||||
@ -185,29 +206,29 @@ CSH.Quit ldy #CSH.hBuf
|
||||
CSH.GetBuf ldy #CSH.hBuf
|
||||
lda (pData),y
|
||||
>SYSCALL GetMemPtr.A
|
||||
>STYA ZPBufBase
|
||||
>STYA ZPCSHBufBase
|
||||
|
||||
ldy #CSH.BufLen
|
||||
lda (pData),y
|
||||
clc
|
||||
adc ZPBufBase
|
||||
adc ZPCSHBufBase
|
||||
sta CSH.GetChar.LO+1
|
||||
|
||||
iny
|
||||
lda (pData),y
|
||||
adc ZPBufBase+1
|
||||
adc ZPCSHBufBase+1
|
||||
sta CSH.GetChar.HI+1
|
||||
|
||||
CSH.SetBufPtr ldy #CSH.BufPtr
|
||||
lda (pData),y
|
||||
clc
|
||||
adc ZPBufBase
|
||||
sta ZPBufPtr
|
||||
adc ZPCSHBufBase
|
||||
sta ZPCSHBufPtr
|
||||
|
||||
iny
|
||||
lda (pData),y
|
||||
adc ZPBufBase+1
|
||||
sta ZPBufPtr+1
|
||||
adc ZPCSHBufBase+1
|
||||
sta ZPCSHBufPtr+1
|
||||
rts
|
||||
*--------------------------------------
|
||||
CSH.GetPtrs ldy #CSH.hSymbols
|
||||
@ -242,14 +263,14 @@ CSH.RestorePtr phy
|
||||
lda CSH.BufPtrSave
|
||||
sta (pData),y
|
||||
clc
|
||||
adc ZPBufBase
|
||||
sta ZPBufPtr
|
||||
adc ZPCSHBufBase
|
||||
sta ZPCSHBufPtr
|
||||
|
||||
iny
|
||||
lda CSH.BufPtrSave+1
|
||||
sta (pData),y
|
||||
adc ZPBufBase+1
|
||||
sta ZPBufPtr+1
|
||||
adc ZPCSHBufBase+1
|
||||
sta ZPCSHBufPtr+1
|
||||
ply
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -776,15 +797,15 @@ CSH.GetNextChar phy
|
||||
|
||||
.1 ply
|
||||
|
||||
inc ZPBufPtr
|
||||
inc ZPCSHBufPtr
|
||||
bne CSH.GetChar
|
||||
inc ZPBufPtr+1
|
||||
inc ZPCSHBufPtr+1
|
||||
*--------------------------------------
|
||||
CSH.GetChar lda ZPBufPtr
|
||||
CSH.GetChar lda ZPCSHBufPtr
|
||||
CSH.GetChar.LO eor #$ff Self Modified
|
||||
bne CSH.GetChar.8
|
||||
|
||||
lda ZPBufPtr+1
|
||||
lda ZPCSHBufPtr+1
|
||||
CSH.GetChar.HI eor #$ff Self Modified
|
||||
bne CSH.GetChar.8
|
||||
|
||||
@ -792,7 +813,7 @@ CSH.GetChar.HI eor #$ff Self Modified
|
||||
sec
|
||||
rts
|
||||
|
||||
CSH.GetChar.8 lda (ZPBufPtr)
|
||||
CSH.GetChar.8 lda (ZPCSHBufPtr)
|
||||
clc
|
||||
rts
|
||||
*---------------------------------------
|
||||
|
117
SBIN/SHELL.S.txt
117
SBIN/SHELL.S.txt
@ -16,9 +16,9 @@ UsrBuf256 .EQ $200
|
||||
*--------------------------------------
|
||||
ZPPTR1 .EQ ZPBIN
|
||||
ZPPTR2 .EQ ZPBIN+2
|
||||
ZPPTR3 .EQ ZPBIN+4
|
||||
ZPBufBase .EQ ZPBIN+6
|
||||
ZPBufPtr .EQ ZPBIN+8
|
||||
ZPCMDBuf .EQ ZPBIN+4
|
||||
ZPCSHBufBase .EQ ZPBIN+6
|
||||
ZPCSHBufPtr .EQ ZPBIN+8
|
||||
ZPCSHSymbols .EQ ZPBIN+10
|
||||
ZPCSHData .EQ ZPBIN+12
|
||||
ZPCSHStack .EQ ZPBIN+14
|
||||
@ -102,32 +102,17 @@ L.ERR.Messages .DA ERR.Messages
|
||||
*--------------------------------------
|
||||
CS.INIT jsr SetPWD
|
||||
|
||||
jsr CMD.Init
|
||||
bcs .9
|
||||
|
||||
lda (pPs)
|
||||
ora #S.PS.F.EVENT Now accept events
|
||||
sta (pPs)
|
||||
|
||||
|
||||
ldy #S.PS.ARGC
|
||||
lda (pPs),y
|
||||
|
||||
beq .1 no arg, continue starting interactive
|
||||
|
||||
>PUSHWI 0 Aux type
|
||||
>PUSHBI 4 S.FILEINFO.TYPE.TXT
|
||||
>PUSHBI SYS.FOpen.R
|
||||
|
||||
lda #1
|
||||
>SYSCALL GetArg.A
|
||||
>PUSHYA
|
||||
>SYSCALL LoadFile
|
||||
bcs .9
|
||||
>DEBUG
|
||||
>SETG.YA CSH.BufLen+1
|
||||
|
||||
txa
|
||||
>SETG.A CSH.hBuf
|
||||
|
||||
lda #$FF
|
||||
>SETG.A bExitOnEOF
|
||||
|
||||
jmp CSH.Init
|
||||
|
||||
@ -155,7 +140,9 @@ CS.RUN >GETG.A bReadMode READ Command ?
|
||||
>SYSCALL GetChar
|
||||
bcs .8
|
||||
|
||||
.13 jsr CheckSleep
|
||||
.13 >DEBUG
|
||||
|
||||
jsr CheckSleep
|
||||
bne .8
|
||||
|
||||
>GETG.A CSH.hBuf batch mode ?
|
||||
@ -167,10 +154,10 @@ CS.RUN >GETG.A bReadMode READ Command ?
|
||||
|
||||
.10 >GETG.A hCmdBuf Get the buffer
|
||||
>SYSCALL GetMemPtr.A
|
||||
>STYA ZPBufBase
|
||||
>STYA ZPCMDBuf
|
||||
|
||||
lda #0 reset it
|
||||
sta (ZPBufBase)
|
||||
sta (ZPCMDBuf)
|
||||
|
||||
>SETG.A bSecureRead Clear password mode
|
||||
|
||||
@ -186,21 +173,19 @@ CS.RUN >GETG.A bReadMode READ Command ?
|
||||
>GETG.A bCmdBufexec Something to execute ?
|
||||
bpl .1
|
||||
|
||||
jsr Cmd.Normalize
|
||||
jsr Cmd.Parse
|
||||
|
||||
>GETG.A CmdBuflen
|
||||
beq .12 Empty line
|
||||
|
||||
jsr HIS.Add
|
||||
|
||||
>LDYA ZPBufBase
|
||||
jsr Cmd.ExecYA
|
||||
jsr Cmd.Exec
|
||||
|
||||
ldy #S.PS.RC
|
||||
sta (pPs),y
|
||||
|
||||
ldy #bEXIT
|
||||
lda (pData),y
|
||||
>GETG.A bExit
|
||||
bne CS.RUN.EXIT
|
||||
|
||||
.8 clc
|
||||
@ -212,10 +197,10 @@ CS.RUN.EXIT.RTS rts
|
||||
*--------------------------------------
|
||||
CS.RUN.READ >GETG.A hCmdBuf Get the buffer
|
||||
>SYSCALL GetMemPtr.A
|
||||
>STYA ZPBufBase
|
||||
>STYA ZPCMDBuf
|
||||
|
||||
lda #0 reset it
|
||||
sta (ZPBufBase)
|
||||
sta (ZPCMDBuf)
|
||||
|
||||
.1 >SYSCALL Sleep
|
||||
>SYSCALL GetChar
|
||||
@ -226,9 +211,9 @@ CS.RUN.READ >GETG.A hCmdBuf Get the buffer
|
||||
>GETG.A bCmdBufexec
|
||||
bpl .1
|
||||
|
||||
>PUSHW ZPBufBase
|
||||
>PUSHW ZPCMDBuf
|
||||
|
||||
lda #VarBuffer
|
||||
lda #CMD.VarName
|
||||
clc
|
||||
adc pData
|
||||
tay
|
||||
@ -236,15 +221,6 @@ CS.RUN.READ >GETG.A hCmdBuf Get the buffer
|
||||
adc #0
|
||||
>PUSHYA
|
||||
>SYSCALL SetEnv
|
||||
php
|
||||
pha
|
||||
|
||||
ldy #VarBuffer
|
||||
lda #0
|
||||
sta (pData),y
|
||||
|
||||
pla
|
||||
plp
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.BATCH >DEBUG
|
||||
@ -252,15 +228,14 @@ CS.RUN.BATCH >DEBUG
|
||||
jsr CSH.Run
|
||||
bcs .9
|
||||
|
||||
lda (pData)
|
||||
beq .8 Empty line....nothing to do....
|
||||
>GETG.A bCmdBufexec
|
||||
bpl .8 Empty line....nothing to do....
|
||||
|
||||
jsr Cmd.Normalize
|
||||
lda (pData)
|
||||
jsr Cmd.Parse
|
||||
>GETG.A CmdBuflen
|
||||
beq .8
|
||||
|
||||
>LDYA pData
|
||||
jsr Cmd.ExecYA
|
||||
jsr Cmd.Exec
|
||||
|
||||
.8 ldy #S.PS.RC
|
||||
sta (pPs),y
|
||||
@ -355,7 +330,7 @@ CS.CHARIN tax Save Char
|
||||
* interactive mode
|
||||
.10 >GETG.A hCmdBuf
|
||||
>SYSCALL GetMemPtr.A
|
||||
>STYA ZPBufBase
|
||||
>STYA ZPCMDBuf
|
||||
|
||||
>GETG.A bEscMode
|
||||
beq .13
|
||||
@ -389,20 +364,20 @@ CS.CHARIN tax Save Char
|
||||
clc
|
||||
rts
|
||||
|
||||
.2 lda (pData) CmdBuffer
|
||||
.2 >GETG.A CmdBuflen
|
||||
|
||||
cmp #CmdLine.MAX
|
||||
beq .8
|
||||
|
||||
pha
|
||||
|
||||
inc
|
||||
sta (pData)
|
||||
tay
|
||||
txa
|
||||
sta (pData),y
|
||||
txa
|
||||
ply
|
||||
sta (ZPCMDBuf),y
|
||||
|
||||
tax
|
||||
ldy #bSecureRead
|
||||
lda (pData),y
|
||||
>GETG.A bSecureRead
|
||||
bne .8
|
||||
|
||||
txa
|
||||
@ -508,33 +483,38 @@ PrintPrompt >LDYA L.ENV.PS1
|
||||
plp
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CmdLine.CLR lda (pData)
|
||||
CmdLine.CLR ldy #0
|
||||
|
||||
.1 lda (ZPCMDBuf),y
|
||||
beq .9
|
||||
|
||||
tay
|
||||
lda #8
|
||||
|
||||
.1 sta (pData),y
|
||||
dey
|
||||
sta (pData),y
|
||||
iny
|
||||
bne .1
|
||||
|
||||
jsr CmdLine.SET
|
||||
|
||||
lda #0
|
||||
sta (pData)
|
||||
sta (ZPCMDBuf)
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CmdLine.DEL lda (pData)
|
||||
CmdLine.DEL >GETG.A CmdBuflen
|
||||
beq .9
|
||||
dec
|
||||
sta (pData),y
|
||||
|
||||
tay
|
||||
lda #0
|
||||
sta (pData),y
|
||||
|
||||
lda #8
|
||||
>SYSCALL PutChar.A
|
||||
lda (pData)
|
||||
dec
|
||||
sta (pData)
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CmdLine.SET >PUSHW pData
|
||||
CmdLine.SET >PUSHW ZPCMDBuf
|
||||
>LDYA L.MSG.PSTR
|
||||
>SYSCALL PrintF.YA
|
||||
rts
|
||||
@ -615,7 +595,8 @@ bSecureRead .BS 1
|
||||
|
||||
Sleep .BS 4
|
||||
|
||||
VarBuffer .BS 16
|
||||
CMD.hCmdLine .BS 1
|
||||
CMD.VarName .BS VarLen.MAX+1
|
||||
|
||||
HIS.hBuf .BS 1
|
||||
HIS.BufIndex .BS 1
|
||||
|
@ -103,7 +103,7 @@ CORE.ScreenSelect
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
SYS.CPULOADI .BS 1
|
||||
SYS.CPULOADC .AS "|/-\"
|
||||
SYS.CPULOADC .AS '\|/-'
|
||||
*--------------------------------------
|
||||
CORE.TskMgrRun >LDYAI TskMgr.Table+S.PS skip PS 0
|
||||
>STYA pPs
|
||||
|
Loading…
Reference in New Issue
Block a user