mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
Kernel 0.93+
This commit is contained in:
parent
b11392b149
commit
683ebaf9cd
Binary file not shown.
@ -89,22 +89,22 @@ K.ArgV tax save requested arg#
|
||||
lda (pPs),y
|
||||
jsr K.GetMemPtr
|
||||
|
||||
>STYA ZPPtr1
|
||||
>STYA ZPPtr2 Use Ptr2, called from ExpandStr
|
||||
|
||||
.1 lda (ZPPtr1) end of ARGV[] ?
|
||||
.1 lda (ZPPtr2) end of ARGV[] ?
|
||||
|
||||
beq .9 yes, not found....
|
||||
|
||||
dex
|
||||
bmi .7
|
||||
|
||||
.3 jsr SHARED.GetCharPtr1 skip str
|
||||
.3 jsr SHARED.GetCharPtr2 skip str
|
||||
bne .3
|
||||
|
||||
jsr SHARED.NextCharPtr1 skip \0
|
||||
jsr SHARED.NextCharPtr2 skip \0
|
||||
bra .1
|
||||
|
||||
.7 >LDYA ZPPtr1
|
||||
.7 >LDYA ZPPtr2
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
|
@ -26,23 +26,22 @@ K.ExpandStr stz ENV.hMem Reset Intermediate string...
|
||||
stz ENV.bExp No var found yet
|
||||
stz ENV.bNoExp Reset no expand flag
|
||||
|
||||
.10
|
||||
.11 jsr SHARED.GetCharPtr1 End of CSTR?
|
||||
.10 jsr SHARED.GetCharPtr1 End of CSTR?
|
||||
beq .80
|
||||
|
||||
cmp #'''
|
||||
.11 cmp #'''
|
||||
bne .21
|
||||
|
||||
lda ENV.bNoExp
|
||||
eor #$ff
|
||||
sta ENV.bNoExp toggle flag
|
||||
bra .11
|
||||
bra .10
|
||||
|
||||
.21 bit ENV.bNoExp
|
||||
bpl .23
|
||||
|
||||
.22 jsr ENV.AddAToBuf
|
||||
bra .11
|
||||
bra .10
|
||||
|
||||
.23 cmp #'$' no, found one ?
|
||||
bne .22 no, store...
|
||||
@ -50,14 +49,14 @@ K.ExpandStr stz ENV.hMem Reset Intermediate string...
|
||||
ror ENV.bExp Toggle Expanded flag
|
||||
|
||||
lda (ZPPtr1)
|
||||
bne .3
|
||||
bne .30
|
||||
|
||||
lda #'$' End of string, output $
|
||||
bra .22
|
||||
|
||||
.3 stz ENV.VarEndChar
|
||||
.30 stz ENV.VarEndChar
|
||||
|
||||
cmp #'{' "${VAR]""?
|
||||
cmp #'{' "${VAR]"?
|
||||
bne .31
|
||||
|
||||
dec ENV.VarEndChar "}" expected
|
||||
@ -71,10 +70,10 @@ K.ExpandStr stz ENV.hMem Reset Intermediate string...
|
||||
and #$0f
|
||||
|
||||
jsr K.ArgV
|
||||
bcs .10 Arg# is undefined, do not append anything
|
||||
bcs .35 Arg# is undefined, do not append anything
|
||||
|
||||
jsr ENV.AddYAToBuf
|
||||
bra .10
|
||||
jsr ENV.AddYAToBuf
|
||||
bra .35
|
||||
|
||||
.32 ldx #ENV.SysVars.Cnt-1
|
||||
|
||||
@ -84,31 +83,36 @@ K.ExpandStr stz ENV.hMem Reset Intermediate string...
|
||||
bpl .33
|
||||
bra .40
|
||||
|
||||
.34 txa
|
||||
bne .35
|
||||
|
||||
jsr ENV.SysVarsAllArgs
|
||||
bra .10
|
||||
.34 jsr ENV.SysVar
|
||||
|
||||
.35 ldy ENV.SysVars.PS-1,x
|
||||
lda (pPS),y
|
||||
jsr ENV.SysVarsNum
|
||||
.35 jsr SHARED.NextCharPtr1 skip $x
|
||||
bra .10
|
||||
|
||||
.40 jsr ENV.ExpandStrVar
|
||||
bra .70
|
||||
bcc .70
|
||||
|
||||
.50 jsr ENV.FindVarP1
|
||||
bcs .10
|
||||
bcs .70
|
||||
|
||||
jsr SHARED.AddYToPtr1
|
||||
jsr ENV.NextEnvP3
|
||||
jsr ENV.AddP3ToBuf
|
||||
|
||||
.70 ldy #$ff
|
||||
|
||||
.71 iny
|
||||
lda (ZPPtr1),y
|
||||
beq .72
|
||||
|
||||
.70 lda ENV.VarEndChar
|
||||
jsr SHARED.IsIDValid
|
||||
bcc .71
|
||||
|
||||
.72 jsr SHARED.AddYToPtr1
|
||||
|
||||
lda ENV.VarEndChar
|
||||
beq .10
|
||||
jsr SHARED.GetCharPtr1 skip "}"
|
||||
jmp .10
|
||||
|
||||
jsr SHARED.NextCharPtr1 skip "}"
|
||||
.73 jmp .10
|
||||
|
||||
.80 lda ENV.hMem working from our temp string ?
|
||||
beq .81 no...
|
||||
@ -126,8 +130,6 @@ K.ExpandStr stz ENV.hMem Reset Intermediate string...
|
||||
bit ENV.bExp SELF MODIFIED Did we expand something ?
|
||||
bpl K.FileSearch.RTS No, exit with Y,A from STRDUP
|
||||
jmp .1 Yes, start over with hPStr
|
||||
.99 >DEBUG
|
||||
rts
|
||||
*/--------------------------------------
|
||||
* # FileSearch
|
||||
* Search a file in the provided PATH list
|
||||
@ -446,6 +448,12 @@ ENV.SysVarsAllArgs
|
||||
jsr ENV.AddAToBuf
|
||||
bra .2
|
||||
*--------------------------------------
|
||||
ENV.SysVar txa
|
||||
beq ENV.SysVarsAllArgs
|
||||
|
||||
ldy ENV.SysVars.PS-1,x
|
||||
lda (pPS),y
|
||||
*--------------------------------------
|
||||
ENV.SysVarsNum jsr MATH.A2STR10NP
|
||||
|
||||
ldy #0
|
||||
@ -492,8 +500,6 @@ ENV.ExpandStrVar
|
||||
.3 lda (ZPPtr3),y
|
||||
bne .4
|
||||
|
||||
jsr SHARED.AddYToPtr1
|
||||
|
||||
jmp (ENV.StrVarsJmp,x)
|
||||
|
||||
.4 inx
|
||||
|
Loading…
Reference in New Issue
Block a user