Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-09-10 08:28:08 +02:00
parent 3bfe0a6921
commit b11392b149

View File

@ -95,8 +95,8 @@ K.ExpandStr stz ENV.hMem Reset Intermediate string...
jsr ENV.SysVarsNum
bra .10
.40
.40 jsr ENV.ExpandStrVar
bra .70
.50 jsr ENV.FindVarP1
bcs .10
@ -426,50 +426,6 @@ K.UnsetEnv.I.9 rts
*--------------------------------------
* PRIVATE
*--------------------------------------
ENV.AddYAToBuf >STYA ZPPtr3
*--------------------------------------
ENV.AddP3ToBuf ldx ENV.BufLen
ldy #$ff
dex
.1 iny
inx
lda (ZPPtr3),y
sta K.Buf256,x
bne .1
stx ENV.BufLen
rts
*--------------------------------------
ENV.ExpandSysVar
>LDYAI ENV.StrVars
>STYA ZPPtr3
ldx #0
.4 ldy #$ff
.5 iny
lda (ZPPtr3),y
cmp (ZPPtr3),y
bne .7
tya
bne .7
jmp (ENV.StrVarsJmp,x)
.7 inx
inx
lda (ZPPtr3)
beq .9
jsr ENV.NextEnvP3A
bra .4
.9 sec
rts
*--------------------------------------
ENV.SysVarsAllArgs
lda #1
jsr K.ArgV
@ -510,6 +466,45 @@ ENV.SysVars .AS "*#?@$!"
ENV.SysVars.Cnt .EQ *-ENV.SysVars
ENV.SysVars.PS .DA #S.PS.ARGC,#S.PS.RC,#S.PS.PPID,#S.PS.PID,#S.PS.CPID
*--------------------------------------
ENV.ExpandStrVar
>LDYAI ENV.StrVars
>STYA ZPPtr3
ldx #0
.1 lda (ZPPtr3)
beq .9
ldy #$ff
.2 iny
lda (ZPPtr1),y
beq .3
jsr SHARED.IsIDValid
bcs .3
cmp (ZPPtr3),y
beq .2
bra .4
.3 lda (ZPPtr3),y
bne .4
jsr SHARED.AddYToPtr1
jmp (ENV.StrVarsJmp,x)
.4 inx
inx
jsr ENV.NextEnvP3
bra .1
.9 sec
rts
*--------------------------------------
ENV.StrVars .AZ "LOGNAME"
.AZ "GECOS"
.AZ "HOME"
@ -536,7 +531,7 @@ ENV.StrVarsUID ldy #S.SESSION.UID
.HS 2C
ENV.StrVarsGID ldy #S.SESSION.GID
lda (pSession),y
bra ENV.SysVarsNum
jmp ENV.SysVarsNum
ENV.StrVarsSession
lda pSession
clc
@ -660,6 +655,21 @@ ENV.NextEnvP4Y tya
inc ZPPtr4+1
.8 rts
*--------------------------------------
ENV.AddYAToBuf >STYA ZPPtr3
*--------------------------------------
ENV.AddP3ToBuf ldx ENV.BufLen
ldy #$ff
dex
.1 iny
inx
lda (ZPPtr3),y
sta K.Buf256,x
bne .1
stx ENV.BufLen
rts
*--------------------------------------
ENV.AddAToBuf ldx ENV.BufLen
sta K.Buf256,x
inc ENV.BufLen