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