mirror of
https://github.com/A2osX/A2osX.git
synced 2024-09-09 00:54:29 +00:00
Kernel 0.9.2
This commit is contained in:
parent
046fe81b53
commit
d1a6f92adb
Binary file not shown.
Binary file not shown.
@ -36,7 +36,8 @@ Cmd.Parse >STZ.G CMD.bCmd
|
|||||||
phx save expanded string
|
phx save expanded string
|
||||||
pha
|
pha
|
||||||
>PUSHW ZPCMDBuf
|
>PUSHW ZPCMDBuf
|
||||||
pla
|
pla Y,A = expanded string
|
||||||
|
|
||||||
>SYSCALL Args2ArgV
|
>SYSCALL Args2ArgV
|
||||||
plx
|
plx
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
@ -73,6 +74,7 @@ Cmd.Parse >STZ.G CMD.bCmd
|
|||||||
|
|
||||||
.2 jsr CMD.CheckCmd
|
.2 jsr CMD.CheckCmd
|
||||||
bcc .7 success, skip token, already added by CheckCmd
|
bcc .7 success, skip token, already added by CheckCmd
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.6 jsr CMD.AddTokenToArgV
|
.6 jsr CMD.AddTokenToArgV
|
||||||
@ -125,12 +127,12 @@ Cmd.CheckCmd ldy #$ff
|
|||||||
|
|
||||||
>LDYA L.ENV.PATH push ENVNAME=PATH for search
|
>LDYA L.ENV.PATH push ENVNAME=PATH for search
|
||||||
>SYSCALL GetEnv get value for ENV=PATH
|
>SYSCALL GetEnv get value for ENV=PATH
|
||||||
bcs Cmd.CheckCmd.90
|
bcs .5 no PATH, try workdir
|
||||||
|
|
||||||
jsr Cmd.SearchExt
|
jsr Cmd.SearchExt
|
||||||
bcc .6 found in PATH, go check Type
|
bcc .6 found in PATH, go check Type
|
||||||
|
|
||||||
ldy #S.PS.hPREFIX not found, try in CD
|
.5 ldy #S.PS.hPREFIX not found, try in CD
|
||||||
lda (pPs),y
|
lda (pPs),y
|
||||||
>SYSCALL GetMemPtr
|
>SYSCALL GetMemPtr
|
||||||
jsr Cmd.SearchExt
|
jsr Cmd.SearchExt
|
||||||
@ -202,15 +204,16 @@ Cmd.SearchExt pha
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Cmd.Exec lda (ZPArgVBuf)
|
Cmd.Exec lda (ZPArgVBuf)
|
||||||
cmp #'/'
|
cmp #'/'
|
||||||
bne .8
|
beq .1
|
||||||
|
|
||||||
>PUSHB.G CMD.PSFlags
|
>LDA.G CMD.bCmd
|
||||||
>LDYA ZPArgVBuf
|
|
||||||
>SYSCALL exec
|
|
||||||
|
|
||||||
.8 >LDA.G CMD.bCmd
|
|
||||||
tax
|
tax
|
||||||
jmp (J.CMD.INT,x)
|
jmp (J.CMD.INT,x)
|
||||||
|
|
||||||
|
.1 >PUSHB.G CMD.PSFlags
|
||||||
|
>LDYA ZPArgVBuf
|
||||||
|
>SYSCALL exec
|
||||||
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* STARTPROC : intcmd = 0
|
* STARTPROC : intcmd = 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -196,13 +196,14 @@ CS.RUN >LDA.G bReadMode READ Command ?
|
|||||||
>LDA.G bCmdBufExec Something to execute ?
|
>LDA.G bCmdBufExec Something to execute ?
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
|
jsr HIS.Add
|
||||||
|
|
||||||
jsr CMD.Parse
|
jsr CMD.Parse
|
||||||
|
bcs .2
|
||||||
|
|
||||||
lda (ZPArgVBuf)
|
lda (ZPArgVBuf)
|
||||||
beq .10 Empty line
|
beq .10 Empty line
|
||||||
|
|
||||||
jsr HIS.Add
|
|
||||||
|
|
||||||
jsr CMD.Exec
|
jsr CMD.Exec
|
||||||
bcs .2
|
bcs .2
|
||||||
|
|
||||||
@ -284,6 +285,7 @@ CS.RUN.BATCH >SYSCALL GetChar
|
|||||||
bpl .8 Empty line....nothing to do....
|
bpl .8 Empty line....nothing to do....
|
||||||
|
|
||||||
jsr CMD.Parse
|
jsr CMD.Parse
|
||||||
|
bcs .8
|
||||||
|
|
||||||
lda (ZPArgVBuf)
|
lda (ZPArgVBuf)
|
||||||
beq .8
|
beq .8
|
||||||
|
@ -12,7 +12,9 @@ AUTO 4,1
|
|||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
ARG.bInQuote .BS 1
|
ARG.bInQuote .BS 1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.Args2ArgV jsr MEM.SPtr1PPtr2
|
K.Args2ArgV >DEBUG
|
||||||
|
|
||||||
|
jsr MEM.SPtr1PPtr2
|
||||||
|
|
||||||
ldx #0 Arg Count
|
ldx #0 Arg Count
|
||||||
|
|
||||||
@ -20,6 +22,7 @@ K.Args2ArgV jsr MEM.SPtr1PPtr2
|
|||||||
|
|
||||||
.1 jsr ARG.GetCharPtr1
|
.1 jsr ARG.GetCharPtr1
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
cmp #C.SPACE
|
cmp #C.SPACE
|
||||||
beq .1 skip leading spaces
|
beq .1 skip leading spaces
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ CORE.Run stz CORE.PSIndex
|
|||||||
|
|
||||||
.8 inc CORE.PSIndex
|
.8 inc CORE.PSIndex
|
||||||
ldx CORE.PSIndex
|
ldx CORE.PSIndex
|
||||||
cpx #K.PS.MAX
|
cpx CORE.PSCount
|
||||||
bne .1
|
bne .1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CORE.Events jsr CORE.GetEvents
|
CORE.Events jsr CORE.GetEvents
|
||||||
@ -272,7 +272,7 @@ CORE.Dispatch stz CORE.PSIndex
|
|||||||
|
|
||||||
.5 inc CORE.PSIndex
|
.5 inc CORE.PSIndex
|
||||||
ldx CORE.PSIndex
|
ldx CORE.PSIndex
|
||||||
cpx #K.PS.MAX
|
cpx CORE.PSCount
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
.9 sec
|
.9 sec
|
||||||
@ -318,7 +318,7 @@ CORE.PSFree.A sta .1+1 Save PS ID
|
|||||||
.2 cmp PS.Table.PID,x
|
.2 cmp PS.Table.PID,x
|
||||||
beq .3
|
beq .3
|
||||||
inx
|
inx
|
||||||
cpx #K.PS.MAX
|
cpx CORE.PSCount
|
||||||
bne .2
|
bne .2
|
||||||
beq *
|
beq *
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ CORE.GetPS ldy #0
|
|||||||
.1 cmp PS.Table.PID,y
|
.1 cmp PS.Table.PID,y
|
||||||
beq CORE.GetPSByID.8
|
beq CORE.GetPSByID.8
|
||||||
iny
|
iny
|
||||||
cpy #K.PS.MAX
|
cpy CORE.PSCount
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
.9 lda #E.NSP
|
.9 lda #E.NSP
|
||||||
@ -544,6 +544,7 @@ CORE.InKernelStats .BS 1
|
|||||||
CORE.EvtIndex .BS 1
|
CORE.EvtIndex .BS 1
|
||||||
CORE.EvtCount .BS 1
|
CORE.EvtCount .BS 1
|
||||||
CORE.PSIndex .BS 1
|
CORE.PSIndex .BS 1
|
||||||
|
CORE.PSCount .DA #0
|
||||||
CORE.LastPSID .DA #0
|
CORE.LastPSID .DA #0
|
||||||
CORE.S.PS0 .BS S.PS.hStdErr+1
|
CORE.S.PS0 .BS S.PS.hStdErr+1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -56,14 +56,21 @@ K.Exec >STYA PS.Args
|
|||||||
* we cannot use ZPPtrs1 & 2
|
* we cannot use ZPPtrs1 & 2
|
||||||
* because of calling K.NewStr.YA & PS.Dup
|
* because of calling K.NewStr.YA & PS.Dup
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PS.CreateChild ldx #0
|
PS.CreateChild ldx CORE.PSCount
|
||||||
|
beq .3
|
||||||
|
|
||||||
|
ldx #0
|
||||||
|
|
||||||
.1 lda PS.Table.PID,x
|
.1 lda PS.Table.PID,x
|
||||||
beq .4 Found an empty slot
|
beq .4 Found an empty slot
|
||||||
|
|
||||||
inx
|
inx
|
||||||
cpx #K.PS.MAX
|
cpx CORE.PSCount
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
|
cpx #K.PS.MAX
|
||||||
|
bne .3
|
||||||
|
|
||||||
lda #E.OOH
|
lda #E.OOH
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
@ -71,6 +78,8 @@ PS.CreateChild ldx #0
|
|||||||
.99 plx
|
.99 plx
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
.3 inc CORE.PSCount
|
||||||
|
|
||||||
.4 inc CORE.LastPSID Get a PSID not already running
|
.4 inc CORE.LastPSID Get a PSID not already running
|
||||||
beq .4 not = 0
|
beq .4 not = 0
|
||||||
lda CORE.LastPSID
|
lda CORE.LastPSID
|
||||||
|
Loading…
Reference in New Issue
Block a user