mirror of
https://github.com/A2osX/A2osX.git
synced 2025-04-04 18:32:56 +00:00
Kernel 0.92
This commit is contained in:
parent
8401ddf407
commit
a6e317b765
Binary file not shown.
@ -308,42 +308,26 @@ K.SetEnv.I jsr K.UnsetEnv.I
|
||||
|
||||
.1 jsr ENV.InitEnvP3 ZPPtr3 -> Env
|
||||
|
||||
ldy #0
|
||||
ldx #0
|
||||
lda #1
|
||||
sta ZPPtr4
|
||||
stz ZPPtr4+1 ZPPtr4 = ENVSIZE = 1
|
||||
|
||||
.10 lda (ZPPtr3) End of ENV
|
||||
beq .15
|
||||
|
||||
.11 iny Compute ENV size in X,Y
|
||||
bne .12
|
||||
inx
|
||||
jsr ENV.GetP3LenY
|
||||
|
||||
.12 inc ZPPtr3
|
||||
bne .13
|
||||
inc ZPPtr3+1
|
||||
|
||||
.13 lda (ZPPtr3) End of string
|
||||
bne .11
|
||||
|
||||
iny
|
||||
bne .14
|
||||
inx
|
||||
|
||||
.14 inc ZPPtr3
|
||||
bne .10
|
||||
inc ZPPtr3+1
|
||||
jsr ENV.NextEnvP3Y
|
||||
jsr ENV.NextEnvP4Y
|
||||
bra .10
|
||||
|
||||
.15 sty ZPPtr4
|
||||
stx ZPPtr4+1
|
||||
|
||||
ldy #$ff
|
||||
.15 ldy #$ff
|
||||
|
||||
.16 iny
|
||||
lda (ZPPtr1),y
|
||||
bne .16
|
||||
|
||||
.17 jsr ENV.NextEnvP4Y
|
||||
jsr ENV.NextEnvP4Y ZPPtr4 = ENVSIZE + VAR
|
||||
|
||||
ldy #$ff
|
||||
|
||||
@ -351,19 +335,19 @@ K.SetEnv.I jsr K.UnsetEnv.I
|
||||
lda (ZPPtr2),y
|
||||
bne .19
|
||||
|
||||
tya
|
||||
sec
|
||||
adc ZPPtr4
|
||||
tax
|
||||
bcc .22
|
||||
jsr ENV.NextEnvP4Y ZPPtr4 = ENVSIZE + VALUE
|
||||
|
||||
lda ZPPtr4
|
||||
beq .20
|
||||
inc ZPPtr4+1
|
||||
|
||||
ldy #S.PS.ENVPAGECNT
|
||||
|
||||
.20 ldy #S.PS.ENVPAGECNT
|
||||
lda (pPs),y
|
||||
cmp ZPPtr4+1
|
||||
bcs .22 env is large enough
|
||||
|
||||
jsr ENV.Dup
|
||||
lda ZPPtr4+1
|
||||
jsr ENV.Dup.A
|
||||
bcs .9
|
||||
|
||||
pha
|
||||
@ -711,11 +695,7 @@ ENV.InitEnvP3 ldy #S.PS.hENV
|
||||
>STYA ZPPtr3 Store ENV
|
||||
rts
|
||||
*--------------------------------------
|
||||
ENV.NextEnvP3 ldy #$ff
|
||||
|
||||
.1 iny
|
||||
lda (ZPPtr3),y
|
||||
bne .1
|
||||
ENV.NextEnvP3 jsr ENV.GetP3LenY
|
||||
|
||||
ENV.NextEnvP3Y tya
|
||||
sec
|
||||
@ -725,6 +705,13 @@ ENV.NextEnvP3Y tya
|
||||
inc ZPPtr3+1
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
ENV.GetP3LenY ldy #$ff
|
||||
|
||||
.1 iny
|
||||
lda (ZPPtr3),y
|
||||
bne .1
|
||||
rts
|
||||
*--------------------------------------
|
||||
ENV.NextEnvP4Y tya
|
||||
sec
|
||||
adc ZPPtr4
|
||||
@ -749,6 +736,8 @@ ENV.AddAToBuf ldx ENV.BufLen
|
||||
*--------------------------------------
|
||||
ENV.Dup ldy #S.PS.ENVPAGECNT
|
||||
lda (pPs),y
|
||||
|
||||
ENV.Dup.A sta .8+1 Store target page Count
|
||||
ldy #0
|
||||
|
||||
jsr K.GetMem
|
||||
@ -764,9 +753,8 @@ ENV.Dup ldy #S.PS.ENVPAGECNT
|
||||
jsr K.GetMemPtr
|
||||
>STYA .1+1
|
||||
|
||||
ldy #S.PS.ENVPAGECNT
|
||||
ldy #S.PS.ENVPAGECNT get SOURCE page count
|
||||
lda (pPs),y
|
||||
pha
|
||||
|
||||
tax
|
||||
ldy #0
|
||||
@ -780,7 +768,7 @@ ENV.Dup ldy #S.PS.ENVPAGECNT
|
||||
dex
|
||||
bne .1
|
||||
|
||||
plx Page Count
|
||||
.8 ldx #$ff SELF MODIFIED Target Page Count
|
||||
pla hMem
|
||||
|
||||
clc
|
||||
|
Loading…
x
Reference in New Issue
Block a user