mirror of
https://github.com/A2osX/A2osX.git
synced 2024-07-14 04:29:02 +00:00
Kernel version 0.8 : Fixed a nasty memory leak in CreateProcessYA area
This commit is contained in:
parent
6e45564298
commit
af54e1e393
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
@ -68,10 +68,11 @@ CS.INIT >SYSCALL GetArgC
|
|||||||
>SYSCALL GetArgA
|
>SYSCALL GetArgA
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
>SYSCALL NewPStrYA
|
>SYSCALL ExpandPStrYA
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
txa
|
txa
|
||||||
|
|
||||||
ldy #hBinName
|
ldy #hBinName
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
clc
|
clc
|
||||||
|
@ -50,10 +50,6 @@ CS.RUN lda #0
|
|||||||
ldy #hPASSWORD
|
ldy #hPASSWORD
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
|
|
||||||
lda #13
|
|
||||||
>SYSCALL COutA
|
|
||||||
bcs .9
|
|
||||||
|
|
||||||
>LDYA L.MSG.LOGIN
|
>LDYA L.MSG.LOGIN
|
||||||
>SYSCALL PrintFYA
|
>SYSCALL PrintFYA
|
||||||
bcs .9
|
bcs .9
|
||||||
@ -65,12 +61,10 @@ CS.RUN lda #0
|
|||||||
jsr INPUT.LINEIN
|
jsr INPUT.LINEIN
|
||||||
bcc .1
|
bcc .1
|
||||||
|
|
||||||
lda #13
|
|
||||||
>SYSCALL COutA
|
|
||||||
bcs .9
|
|
||||||
|
|
||||||
>LDYA L.MSG.PASSWORD
|
>LDYA L.MSG.PASSWORD
|
||||||
>SYSCALL PrintFYA
|
>SYSCALL PrintFYA
|
||||||
|
bcs .9
|
||||||
|
|
||||||
lda #'*'
|
lda #'*'
|
||||||
jsr INPUT.RESET
|
jsr INPUT.RESET
|
||||||
|
|
||||||
@ -83,14 +77,22 @@ CS.RUN lda #0
|
|||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>LDYA L.SHELL
|
>LDYA L.SHELL
|
||||||
|
>SYSCALL ExpandPStrYA
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
stx .3+1
|
||||||
>SYSCALL ExecProcessNewEnvYA
|
>SYSCALL ExecProcessNewEnvYA
|
||||||
|
|
||||||
bcs .9
|
php
|
||||||
|
pha
|
||||||
|
.3 lda #$ff Self Modified
|
||||||
|
>SYSCALL FreeMemA
|
||||||
|
pla
|
||||||
|
plp
|
||||||
|
rts
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
rts
|
.9 rts
|
||||||
.9 sec
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.DOEVENT ldy #S.EVT.hDEV
|
CS.DOEVENT ldy #S.EVT.hDEV
|
||||||
lda (pEvent),y
|
lda (pEvent),y
|
||||||
@ -196,8 +198,8 @@ INPUT.LINEIN ldy #INPUT.Status
|
|||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.END
|
CS.END
|
||||||
MSG.LOGIN >CSTR "login:"
|
MSG.LOGIN >CSTR "\nlogin:"
|
||||||
MSG.PASSWORD >CSTR "password:"
|
MSG.PASSWORD >CSTR "\npassword:"
|
||||||
SHELL >PSTR "${A2OSX}SBIN/SHELL"
|
SHELL >PSTR "${A2OSX}SBIN/SHELL"
|
||||||
.DUMMY
|
.DUMMY
|
||||||
.OR 0
|
.OR 0
|
||||||
|
@ -61,8 +61,12 @@ Kernel.Init3 jsr K.DevMgrInit
|
|||||||
>SYSCALL PrintFYA
|
>SYSCALL PrintFYA
|
||||||
|
|
||||||
>LDYAI STARTUP.CMDLINE
|
>LDYAI STARTUP.CMDLINE
|
||||||
|
>SYSCALL ExpandPStrYA
|
||||||
|
phx Save Expanded CMDLINE for discard
|
||||||
>SYSCALL CreateProcessYA
|
>SYSCALL CreateProcessYA
|
||||||
bcs .9
|
bcs .9
|
||||||
|
pla
|
||||||
|
>SYSCALL FreeMemA ...discard...
|
||||||
|
|
||||||
>LDYAI MSG.Init3.OK
|
>LDYAI MSG.Init3.OK
|
||||||
>SYSCALL PrintFYA
|
>SYSCALL PrintFYA
|
||||||
@ -78,7 +82,7 @@ Kernel.Init3 jsr K.DevMgrInit
|
|||||||
.9 >PUSHA
|
.9 >PUSHA
|
||||||
>LDYAI MSG.StartupErr
|
>LDYAI MSG.StartupErr
|
||||||
>SYSCALL PrintFYA
|
>SYSCALL PrintFYA
|
||||||
bra *
|
bra * No need to discard Expanded CMDLINE
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* K.DevMgrInit
|
* K.DevMgrInit
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -25,40 +25,27 @@ K.CreateProcessNewEnvYA
|
|||||||
K.CreateProcessYA
|
K.CreateProcessYA
|
||||||
ldx #0
|
ldx #0
|
||||||
stx K.CreateProcess.Flags
|
stx K.CreateProcess.Flags
|
||||||
|
|
||||||
jsr K.ExpandPStrYA
|
|
||||||
bcs .99
|
|
||||||
|
|
||||||
stx K.CreateProcess.hCmdLine
|
|
||||||
>STYA K.CreateProcess.CmdLine
|
>STYA K.CreateProcess.CmdLine
|
||||||
|
|
||||||
jsr PS.CreateChild
|
jsr PS.CreateChild
|
||||||
bcs .98
|
bcs .9
|
||||||
|
|
||||||
sta K.CreateProcess.CPSID
|
sta K.CreateProcess.CPSID
|
||||||
|
|
||||||
jsr PS.Init
|
jsr PS.Init
|
||||||
bcs .97
|
bcc .8
|
||||||
|
|
||||||
lda K.CreateProcess.CPSID
|
pha save error code
|
||||||
clc
|
|
||||||
rts
|
|
||||||
|
|
||||||
.97 pha save error code
|
|
||||||
lda K.CreateProcess.CPSID
|
lda K.CreateProcess.CPSID
|
||||||
jsr PS.FreeA
|
jsr PS.FreeA
|
||||||
pla get back error code
|
pla get back error code
|
||||||
|
sec
|
||||||
.98 pha
|
|
||||||
lda K.CreateProcess.hCmdLine
|
|
||||||
jsr K.FreeMemA
|
|
||||||
pla
|
|
||||||
|
|
||||||
.99 sec
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
.8 lda K.CreateProcess.CPSID
|
||||||
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
K.CreateProcess.Flags .BS 1
|
K.CreateProcess.Flags .BS 1
|
||||||
K.CreateProcess.hCmdLine .BS 1
|
|
||||||
K.CreateProcess.CmdLine .BS 2
|
K.CreateProcess.CmdLine .BS 2
|
||||||
K.CreateProcess.CPSID .BS 1
|
K.CreateProcess.CPSID .BS 1
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user