Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-07-08 17:39:14 +02:00
parent 5922161d2c
commit 82ce3a9813
6 changed files with 33 additions and 41 deletions

Binary file not shown.

View File

@ -246,6 +246,7 @@ ENV.Search.YA >STYA .4+1
.98 lda #$ff SELF MODIFIED : Discard Expanded hSrch list .98 lda #$ff SELF MODIFIED : Discard Expanded hSrch list
jsr K.FreeMem jsr K.FreeMem
lda #MLI.E.FNOTFND lda #MLI.E.FNOTFND
sec sec
rts rts
@ -260,11 +261,11 @@ ENV.Search.YA >STYA .4+1
* `>SYSCALL putenv` * `>SYSCALL putenv`
* ## RETURN VALUE * ## RETURN VALUE
*\-------------------------------------- *\--------------------------------------
K.PutEnv >STYA ZPPtr1 NAME=VALUE K.PutEnv >STYA ZPPtr2 NAME=VALUE
ldy #0 ldy #0
.1 lda (ZPPtr1),y copy STR to K.Buf256 .1 lda (ZPPtr2),y copy NAME to K.Buf256
beq .9 beq .9
cmp #'=' cmp #'='
@ -274,23 +275,18 @@ K.PutEnv >STYA ZPPtr1 NAME=VALUE
iny iny
bne .1 bne .1
.9 lda #E.SYN
sec
rts
.2 lda #0 .2 lda #0
sta K.Buf256,y sta K.Buf256,y
tya jsr MEM.AddYp1ToPtr2
sec
adc ZPPtr1
sta ZPPtr2
lda ZPPtr1+1
adc #0
sta ZPPtr2+1
>LDYAI K.Buf256 >LDYAI K.Buf256
>STYA ZPPtr1 >STYA ZPPtr1
bra K.SetEnv.I bra K.SetEnv.I
.9 sec
rts
*/-------------------------------------- */--------------------------------------
* # SetEnv * # SetEnv
* Change or add an environment variable * Change or add an environment variable

View File

@ -180,17 +180,14 @@ IO.OPEN.BDEV jsr K.IOCTL.GetPDrv
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
IO.OPEN.DSOCK
*--------------------------------------
IO.OPEN.SSOCK lda IO.hFD
clc
rts
*--------------------------------------
IO.OPEN.PIPE ldy #S.FD.PIPE.S IO.OPEN.PIPE ldy #S.FD.PIPE.S
lda (pFD),y lda (pFD),y
inc inc
sta (pFD),y sta (pFD),y
lda IO.hFD *--------------------------------------
IO.OPEN.DSOCK
*--------------------------------------
IO.OPEN.SSOCK lda IO.hFD
clc clc
rts rts
*-------------------------------------- *--------------------------------------

View File

@ -738,6 +738,18 @@ MEM.AddYToPtr1 clc
inc ZPPtr1+1 inc ZPPtr1+1
.8 rts .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.PutCharPtr2 sta (ZPPtr2)
MEM.NextCharPtr2 MEM.NextCharPtr2
inc ZPPtr2 inc ZPPtr2

View File

@ -496,7 +496,7 @@ PS.AddArgV ldy #$ff In both cases, remove ARGV[0]
inc inc
.5 jsr K.GetMem .5 jsr K.GetMem
bcs PS.AddPtr1ToStrV.RTS bcs PS.AddPtr1ToStrVUntil0.RTS
>STYA ZPPtr2 Target Buffer >STYA ZPPtr2 Target Buffer
txa txa
@ -518,10 +518,14 @@ PS.AddArgV ldy #$ff In both cases, remove ARGV[0]
PS.AddPtr1ToStrVUntil0 PS.AddPtr1ToStrVUntil0
.1 lda (ZPPtr1) .1 lda (ZPPtr1)
sta (ZPPtr2) sta (ZPPtr2)
beq PS.AddPtr1ToStrV.8 Ending \0 beq .8 Ending \0
jsr PS.AddPtr1ToStrV jsr PS.AddPtr1ToStrV
bra .1 bra .1
.8 clc
PS.AddPtr1ToStrVUntil0.RTS
rts
*-------------------------------------- *--------------------------------------
PS.AddYAToStrV >STYA ZPPtr1 PS.AddYAToStrV >STYA ZPPtr1
PS.AddPtr1ToStrV PS.AddPtr1ToStrV
@ -533,17 +537,7 @@ PS.AddPtr1ToStrV
bne .2 bne .2
jsr MEM.AddYp1ToPtr1 jsr MEM.AddYp1ToPtr1
jmp MEM.AddYp1ToPtr2
tya
sec
adc ZPPtr2
sta ZPPtr2
bcc PS.AddPtr1ToStrV.RTS
inc ZPPtr2+1
PS.AddPtr1ToStrV.8
clc
PS.AddPtr1ToStrV.RTS
rts
*-------------------------------------- *--------------------------------------
PS.AddYAp12ArgSize PS.AddYAp12ArgSize
pha pha

View File

@ -989,7 +989,7 @@ K.SScanF.H lda K.SScanFTBL+1,x Get VAR size
jsr NUM.Hex2ACC32 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 .1 ply get back VAL size
@ -1013,14 +1013,7 @@ K.SScanF.S ldy #$ff
.2 lda #0 add \0 to param ptr .2 lda #0 add \0 to param ptr
sta (ZPPtr3),y sta (ZPPtr3),y
K.SScanF.Fwd tya Y=char count parsed K.SScanF.Fwd jmp MEM.AddYToPtr2 Y=char count parsed
clc
adc ZPPtr2
sta ZPPtr2
bcc .8
clc
inc ZPPtr2+1
.8 rts
*/-------------------------------------- */--------------------------------------
* # FOpen * # FOpen
* Open a file * Open a file