Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-04-05 16:21:05 +01:00
parent b74bc95450
commit 6bf3599ad2
2 changed files with 21 additions and 5 deletions

View File

@ -607,10 +607,10 @@ CMD.CALL.YAX stx M32.ACC X=Code to Execute
jsr CORE.ArgV.Dup Y,A = ArgV
bcs .9
sta M32.ACC+2 A=ARGC
stx M32.ACC+1 X=ARGV
lda #7
lda #8
jsr CORE.StkCheck
bcs .9
@ -626,15 +626,19 @@ CMD.CALL.YAX stx M32.ACC X=Code to Execute
lda ZPInputBufPtr+1
jsr CORE.StkPush
ldy #S.PS.hARGV
ldy #S.PS.ARGC
lda (pPS),y
jsr CORE.StkPush
lda M32.ACC+2 new ARGC
ldy #S.PS.ARGC
sta (pPS),y
lda M32.ACC+1 new ARGV
ldy #S.PS.hARGV
sta (pPS),y
lda M32.ACC
lda M32.ACC new code
jsr CORE.StkPush
lda M32.ACC
@ -711,6 +715,10 @@ CMD.EXIT.A sta M32.ACC
ldy #S.PS.hARGV
sta (pPS),y
jsr CORE.StkPull
ldy #S.PS.ARGC
sta (pPS),y
jsr CORE.StkPull
sta ZPInputBufPtr+1

View File

@ -417,10 +417,17 @@ CORE.ArgV.Dup >STYA ZPPtr1
>STYA ZPPtr2
lda #$ff Arg count-1 (skip $0)
pha
.5 lda (ZPPtr1)
sta (ZPPtr2)
beq .8
pla
inc
pha
ldy #0
.6 iny
@ -431,7 +438,8 @@ CORE.ArgV.Dup >STYA ZPPtr1
jsr CORE.ArgV.DupNextY
bra .5
.8 clc
.8 pla Arg count
clc
.9 rts
*--------------------------------------
CORE.ArgV.DupNextY