Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-05-22 17:46:20 +02:00
parent a11505cb72
commit 3e0f2e5bb1
5 changed files with 60 additions and 54 deletions

Binary file not shown.

View File

@ -126,18 +126,22 @@ CS.RUN.DUMP >SYSCALL GetMemPtr
>PUSHA CPU% >PUSHA CPU%
ldy #S.PS.PPID ldy #S.PS.CPID
lda (ZPPSPtr),y lda (ZPPSPtr),y
>PUSHA >PUSHA
iny S.PS.PID dey S.PS.PID
lda (ZPPSPtr),y
>PUSHA
dey S.PS.CPID
lda (ZPPSPtr),y lda (ZPPSPtr),y
>PUSHA >PUSHA
lda PS.Table.hPS,x lda PS.Table.hPS,x
>PUSHA >PUSHA
>PUSHBI 7 >PUSHBI 8
>LDYA L.MSG1 >LDYA L.MSG1
>SYSCALL printf >SYSCALL printf
bcs .9 bcs .9
@ -208,8 +212,8 @@ CS.QUIT clc
rts rts
*-------------------------------------- *--------------------------------------
CS.END CS.END
MSG0 .AZ "\e[7lhPS ID PID CPU\% Flags UID Command Line\r\n" MSG0 .AZ "\e[7lhPS pPID PID cPID CPU\% Flags UID Command Line\r\n"
MSG1 .AZ "%3d %3d %3d %3d\% %s %3d" MSG1 .AZ "%3d %3d %3d %3d %3d\% %s %3d"
MSG2 .AZ " %s" MSG2 .AZ " %s"
MSG3 .AZ "\r\n" MSG3 .AZ "\r\n"
MSG.FLAGS .AS "IRQDHSEN" MSG.FLAGS .AS "IRQDHSEN"

View File

@ -1041,6 +1041,10 @@ PwdMgrInit >LDYAI MSG.PWD
>STYA pSession >STYA pSession
stx S.Table.hSession stx S.Table.hSession
lda #1
ldy #S.PS.hSID
sta (pPS),y
ldy #PwdMgr.ROOT.Size-1 ldy #PwdMgr.ROOT.Size-1
.2 lda PwdMgr.ROOT,y .2 lda PwdMgr.ROOT,y

View File

@ -7,7 +7,6 @@ AUTO 4,1
PS.Flags .BS 1 PS.Flags .BS 1
PS.ArgV .BS 2 PS.ArgV .BS 2
PS.ArgSize .BS 2 PS.ArgSize .BS 2
PS.hMem .BS 1
PS.NewPSPtr .BS 2 PS.NewPSPtr .BS 2
.ED .ED
*/-------------------------------------- */--------------------------------------
@ -128,23 +127,37 @@ PS.CreateChild ldx #0
bcs .99 bcs .99
>STYA PS.NewPSPtr >STYA PS.NewPSPtr
stx PS.hMem
txa txa
plx plx
sta PS.Table.hPS,x sta PS.Table.hPS,x
jsr PS.SetMemOwner Set Ownership jsr PS.SetMemOwner Set Ownership
ldy #S.PS.PID
lda CORE.LastPSID lda CORE.LastPSID
ldy #S.PS.PID
sta (PS.NewPSPtr),y
lda #S.PS.F.NOHUP
bit PS.Flags
beq .5
lda PS.Table.hPS Select PS0
jsr K.GetMemPtr
bra .6
.5 >LDYA pPs
.6 >STYA ZPPtr1
ldy #S.PS.PID
lda (ZPPtr1),y
dey #S.PS.PPID
sta (PS.NewPSPtr),y sta (PS.NewPSPtr),y
ldy #S.PS.hPREFIX copy hPREFIX... ldy #S.PS.hPREFIX copy hPREFIX...
lda (pPs),y lda (ZPPtr1),y
jsr K.GetMemPtr jsr K.GetMemPtr
ldx #SYS.StrDup jsr K.StrDup
jsr K.SYSCALL2.BANK
bcs .9 bcs .9
jsr PS.SetMemOwner Set Ownership jsr PS.SetMemOwner Set Ownership
@ -163,61 +176,43 @@ PS.CreateChild ldx #0
dey dey
sta (PS.NewPSPtr),y sta (PS.NewPSPtr),y
lda #S.PS.F.NOHUP
bit PS.Flags
bne .80
ldy #S.PS.hStdIn ldy #S.PS.hStdIn
.81 lda (pPs),y .7 lda (ZPPtr1),y
sta (PS.NewPSPtr),y sta (PS.NewPSPtr),y
iny iny
cpy #S.PS.hStdErr+1 cpy #S.PS.hStdErr+1
bne .81 bne .7
ldy #S.PS.hSID ldy #S.PS.hSID
lda (pPs),y lda (ZPPtr1),y
sta (PS.NewPSPtr),y
ldy #S.PS.PID
lda (pPs),y
bra .5
.80 lda #1 /DEV/CONSOLE
ldy #S.PS.hStdIn
.83 sta (PS.NewPSPtr),y
iny
cpy #S.PS.hStdErr+1
bne .83
dec SID = PPID = 0, KERNEL
ldy #S.PS.hSID
sta (PS.NewPSPtr),y
.5 ldy #S.PS.PPID
sta (PS.NewPSPtr),y sta (PS.NewPSPtr),y
lda #S.PS.F.HOLD lda #S.PS.F.HOLD
bit PS.Flags bit PS.Flags
beq .82 beq .8
ora (pPs) ora (ZPPtr1)
sta (pPs) HOLD parent PS sta (ZPPtr1) HOLD parent PS
.82 lda #S.PS.F.INIT
ora (PS.NewPSPtr)
sta (PS.NewPSPtr) Make this PS Init....
ldy #S.PS.CPID
lda CORE.LastPSID lda CORE.LastPSID
sta (pPs),y ldy #S.PS.CPID
sta (ZPPtr1),y
.8 lda #S.PS.F.INIT
ora (PS.NewPSPtr)
sta (PS.NewPSPtr) Make this PS Init....
clc Exit with A=PSID lda CORE.LastPSID Exit with A=PSID
.9 rts clc
rts
.9 pha
lda CORE.LastPSID
jsr CORE.PSFree
pla
sec
rts
*-------------------------------------- *--------------------------------------
PS.Load ldy #$ff PS.Load ldy #$ff
@ -240,7 +235,7 @@ PS.Load ldy #$ff
bcc .6 bcc .6
ldy #S.PS.hPREFIX ldy #S.PS.hPREFIX
lda (pPS),y lda (PS.NewPSPtr),y
jsr K.GetMemPtr jsr K.GetMemPtr
>STYA ENV.SearchPath >STYA ENV.SearchPath
>LDYA PS.ArgV >LDYA PS.ArgV

View File

@ -464,11 +464,11 @@ PrintF.B jsr PrintF.GetByte
bcs PrintF.BB.RTS bcs PrintF.BB.RTS
PrintF.B.1 ldx #8 PrintF.B.1 ldx #8
.1 asl .1 asl
tay tay
lda #'0'/2 lda #'0'/2
ror rol
jsr PrintF.COut jsr PrintF.COut
bcs .9 bcs .9
@ -885,6 +885,9 @@ K.FGetS jsr PFT.CheckNodeA
jsr IO.READ.I jsr IO.READ.I
bcc .2 another char... bcc .2 another char...
cmp #MLI.E.EOF
beq .8
tay tay
bpl .9 I/O error bpl .9 I/O error