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

View File

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

View File

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

View File

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