Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2020-01-17 08:31:00 +01:00
parent 236dc5517a
commit dc1d30d28d
5 changed files with 25 additions and 35 deletions

Binary file not shown.

View File

@ -242,8 +242,10 @@ CMD.SET.1
.99 jmp CMD.E.CSYN .99 jmp CMD.E.CSYN
CMD.SET.YA >PUSHYA CMD.SET.YA pha
>LDYA ZPVarNamePtr >PUSHW ZPVarNamePtr
pla
>PUSHYA
>SYSCALL SetEnv >SYSCALL SetEnv
rts rts

View File

@ -249,8 +249,8 @@ CS.RUN.IAC.SB >SYSCALL GetChar Wait for IAC SB.IS or SEND
cmp #SB.IS cmp #SB.IS
bne .8 bne .8
>PUSHW L.ENV.TERM
>PUSHW pData IAC.SB.DATA >PUSHW pData IAC.SB.DATA
>LDYA L.ENV.TERM
>SYSCALL SetEnv >SYSCALL SetEnv
.8 jmp CS.RUN.LOOP1 .8 jmp CS.RUN.LOOP1
.9 rts .9 rts

View File

@ -78,15 +78,8 @@ K.ExpandStr jsr K.strdup
jsr ENV.AddYAToBuf jsr ENV.AddYAToBuf
bra .35 bra .35
.32 ldx #ENV.SysVars.Cnt-1 .32 jsr ENV.SysVar
bcs .40
.33 cmp ENV.SysVars,x
beq .34
dex
bpl .33
bra .40
.34 jsr ENV.SysVar
.35 jsr SHARED.TXTPTR.Next skip $x .35 jsr SHARED.TXTPTR.Next skip $x
bra .10 bra .10
@ -125,7 +118,6 @@ K.ExpandStr jsr K.strdup
bit ENV.bExp Did we expand something ? bit ENV.bExp Did we expand something ?
bpl .9 bpl .9
jmp .1 jmp .1
* clc * clc
@ -302,13 +294,13 @@ K.PutEnv >STYA FORPNT NAME=VALUE
* `int setenv(const char *name, const char *value);` * `int setenv(const char *name, const char *value);`
* ## ASM * ## ASM
* **In:** * **In:**
* `>PUSHW name`
* `>PUSHW value` * `>PUSHW value`
* `>LDYA name`
* `>SYSCALL setenv` * `>SYSCALL setenv`
* ## RETURN VALUE * ## RETURN VALUE
*\-------------------------------------- *\--------------------------------------
K.SetEnv >STYA TXTPTR name K.SetEnv >PULLW FORPNT value
>PULLW FORPNT value >PULLW TXTPTR name
K.SetEnv.I jsr K.UnsetEnv.I K.SetEnv.I jsr K.UnsetEnv.I
@ -482,7 +474,17 @@ ENV.SysVarsAllArgs
jsr ENV.AddAToBuf jsr ENV.AddAToBuf
bra .2 bra .2
*-------------------------------------- *--------------------------------------
ENV.SysVar txa ENV.SysVar ldx #ENV.SysVars.Cnt-1
.1 cmp ENV.SysVars,x
beq .2
dex
bpl .1
sec
rts
.2 txa
beq ENV.SysVarsAllArgs beq ENV.SysVarsAllArgs
ldy ENV.SysVars.PS-1,x ldy ENV.SysVars.PS-1,x
@ -651,12 +653,7 @@ ENV.DelVarP3 >LDYA ZPPtr3 save actual Ptr
*-------------------------------------- *--------------------------------------
ENV.InitEnvP3 ldy #S.PS.hENV ENV.InitEnvP3 ldy #S.PS.hENV
lda (pPs),y lda (pPs),y
.DO AUXENV=1
ldx #SYS.GetStkObjPtr
jsr K.SYSCALL2
.ELSE
jsr K.GetMemPtr jsr K.GetMemPtr
.FIN
>STYA ZPPtr3 Store ENV >STYA ZPPtr3 Store ENV
ENV.InitEnvP3.RTS ENV.InitEnvP3.RTS
rts rts
@ -729,11 +726,6 @@ ENV.Dup.A sta .8+1 Store target page Count
iny #S.PS.hENV iny #S.PS.hENV
lda (pPs),y lda (pPs),y
.DO AUXENV=1
sta SETREADAUX
sta SETWRITEAUX
.FIN
jsr K.GetMemPtr jsr K.GetMemPtr
>STYA .1+1 >STYA .1+1
@ -749,11 +741,7 @@ ENV.Dup.A sta .8+1 Store target page Count
dex dex
bne .1 bne .1
.8 .DO AUXENV=1 .8 ldx #$ff SELF MODIFIED Target Page Count
sta CLRREADAUX
sta CLRWRITEAUX
.FIN
ldx #$ff SELF MODIFIED Target Page Count
pla hMem pla hMem
clc clc
.9 rts .9 rts

View File

@ -1025,13 +1025,13 @@ TskMgrInit >LDYAI MSG.TSK
txa txa
ldy #S.PS.hCWD ldy #S.PS.hCWD
sta (pPs),y sta (pPs),y
>PUSHWI I.ENV.BOOT
>PUSHWI $2C0 Get BOOT from QC >PUSHWI $2C0 Get BOOT from QC
>LDYAI I.ENV.BOOT
>SYSCALL2 SetEnv >SYSCALL2 SetEnv
bcs .9 bcs .9
>PUSHWI I.ENV.ROOT
>PUSHWI $2E0 Get ROOT from QC >PUSHWI $2E0 Get ROOT from QC
>LDYAI I.ENV.ROOT
>SYSCALL2 SetEnv >SYSCALL2 SetEnv
bcs .9 bcs .9