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
5922161d2c
commit
82ce3a9813
Binary file not shown.
@ -246,6 +246,7 @@ ENV.Search.YA >STYA .4+1
|
||||
|
||||
.98 lda #$ff SELF MODIFIED : Discard Expanded hSrch list
|
||||
jsr K.FreeMem
|
||||
|
||||
lda #MLI.E.FNOTFND
|
||||
sec
|
||||
rts
|
||||
@ -260,11 +261,11 @@ ENV.Search.YA >STYA .4+1
|
||||
* `>SYSCALL putenv`
|
||||
* ## RETURN VALUE
|
||||
*\--------------------------------------
|
||||
K.PutEnv >STYA ZPPtr1 NAME=VALUE
|
||||
K.PutEnv >STYA ZPPtr2 NAME=VALUE
|
||||
|
||||
ldy #0
|
||||
|
||||
.1 lda (ZPPtr1),y copy STR to K.Buf256
|
||||
.1 lda (ZPPtr2),y copy NAME to K.Buf256
|
||||
beq .9
|
||||
|
||||
cmp #'='
|
||||
@ -274,23 +275,18 @@ K.PutEnv >STYA ZPPtr1 NAME=VALUE
|
||||
iny
|
||||
bne .1
|
||||
|
||||
.9 lda #E.SYN
|
||||
sec
|
||||
rts
|
||||
|
||||
.2 lda #0
|
||||
sta K.Buf256,y
|
||||
|
||||
tya
|
||||
sec
|
||||
adc ZPPtr1
|
||||
sta ZPPtr2
|
||||
lda ZPPtr1+1
|
||||
adc #0
|
||||
sta ZPPtr2+1
|
||||
jsr MEM.AddYp1ToPtr2
|
||||
|
||||
>LDYAI K.Buf256
|
||||
>STYA ZPPtr1
|
||||
bra K.SetEnv.I
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
*/--------------------------------------
|
||||
* # SetEnv
|
||||
* Change or add an environment variable
|
||||
|
@ -180,17 +180,14 @@ IO.OPEN.BDEV jsr K.IOCTL.GetPDrv
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
IO.OPEN.DSOCK
|
||||
*--------------------------------------
|
||||
IO.OPEN.SSOCK lda IO.hFD
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
IO.OPEN.PIPE ldy #S.FD.PIPE.S
|
||||
lda (pFD),y
|
||||
inc
|
||||
sta (pFD),y
|
||||
lda IO.hFD
|
||||
*--------------------------------------
|
||||
IO.OPEN.DSOCK
|
||||
*--------------------------------------
|
||||
IO.OPEN.SSOCK lda IO.hFD
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -738,6 +738,18 @@ MEM.AddYToPtr1 clc
|
||||
inc ZPPtr1+1
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
MEM.AddYp1ToPtr2
|
||||
sec
|
||||
.HS 90 BCC
|
||||
MEM.AddYToPtr2 clc
|
||||
tya
|
||||
adc ZPPtr2
|
||||
sta ZPPtr2
|
||||
bcc .8
|
||||
clc keep CC as some JMP exkt here
|
||||
inc ZPPtr2+1
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
MEM.PutCharPtr2 sta (ZPPtr2)
|
||||
MEM.NextCharPtr2
|
||||
inc ZPPtr2
|
||||
|
@ -496,7 +496,7 @@ PS.AddArgV ldy #$ff In both cases, remove ARGV[0]
|
||||
inc
|
||||
|
||||
.5 jsr K.GetMem
|
||||
bcs PS.AddPtr1ToStrV.RTS
|
||||
bcs PS.AddPtr1ToStrVUntil0.RTS
|
||||
|
||||
>STYA ZPPtr2 Target Buffer
|
||||
txa
|
||||
@ -518,10 +518,14 @@ PS.AddArgV ldy #$ff In both cases, remove ARGV[0]
|
||||
PS.AddPtr1ToStrVUntil0
|
||||
.1 lda (ZPPtr1)
|
||||
sta (ZPPtr2)
|
||||
beq PS.AddPtr1ToStrV.8 Ending \0
|
||||
beq .8 Ending \0
|
||||
|
||||
jsr PS.AddPtr1ToStrV
|
||||
bra .1
|
||||
|
||||
.8 clc
|
||||
PS.AddPtr1ToStrVUntil0.RTS
|
||||
rts
|
||||
*--------------------------------------
|
||||
PS.AddYAToStrV >STYA ZPPtr1
|
||||
PS.AddPtr1ToStrV
|
||||
@ -533,17 +537,7 @@ PS.AddPtr1ToStrV
|
||||
bne .2
|
||||
|
||||
jsr MEM.AddYp1ToPtr1
|
||||
|
||||
tya
|
||||
sec
|
||||
adc ZPPtr2
|
||||
sta ZPPtr2
|
||||
bcc PS.AddPtr1ToStrV.RTS
|
||||
inc ZPPtr2+1
|
||||
PS.AddPtr1ToStrV.8
|
||||
clc
|
||||
PS.AddPtr1ToStrV.RTS
|
||||
rts
|
||||
jmp MEM.AddYp1ToPtr2
|
||||
*--------------------------------------
|
||||
PS.AddYAp12ArgSize
|
||||
pha
|
||||
|
@ -989,7 +989,7 @@ K.SScanF.H lda K.SScanFTBL+1,x Get VAR size
|
||||
|
||||
jsr NUM.Hex2ACC32
|
||||
|
||||
K.SScanF.GetVAL jsr K.SScanF.Fwd Y=char count parsed
|
||||
K.SScanF.GetVAL jsr MEM.AddYToPtr2 Y=char count parsed
|
||||
|
||||
.1 ply get back VAL size
|
||||
|
||||
@ -1013,14 +1013,7 @@ K.SScanF.S ldy #$ff
|
||||
.2 lda #0 add \0 to param ptr
|
||||
sta (ZPPtr3),y
|
||||
|
||||
K.SScanF.Fwd tya Y=char count parsed
|
||||
clc
|
||||
adc ZPPtr2
|
||||
sta ZPPtr2
|
||||
bcc .8
|
||||
clc
|
||||
inc ZPPtr2+1
|
||||
.8 rts
|
||||
K.SScanF.Fwd jmp MEM.AddYToPtr2 Y=char count parsed
|
||||
*/--------------------------------------
|
||||
* # FOpen
|
||||
* Open a file
|
||||
|
Loading…
Reference in New Issue
Block a user