Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-04-03 16:52:24 +01:00
parent c805d3c21d
commit fcc36ca1ed
3 changed files with 53 additions and 67 deletions

Binary file not shown.

View File

@ -67,8 +67,6 @@ CORE.Run >LDYA ZPInputBufPtr Save Actual cmd for looping
lda #$ff
>STA.G CORE.IntCmd assume external
inc
>STA.G CORE.CmdFile no Cmd file mode
jsr CORE.GetCharNB
bcc .11
@ -210,14 +208,7 @@ CORE.ExecCmd.1 lda #0
tax
jmp (J.CMD,x)
CORE.ExecExtCmd >LDA.G CORE.CmdFile
bpl .1
>LDYA ZPArgVBufPtr
jsr CORE.FCALL
bra CORE.ExecExtCmd.Exit
.1 >PUSHB.G CORE.PSFlags
CORE.ExecExtCmd >PUSHB.G CORE.PSFlags
>LDYA ZPArgVBuf
>SYSCALL execv
@ -506,19 +497,7 @@ CORE.ArgV.Dup >STYA ZPPtr1
lda (ZPPtr1),y
bne .2
tya
sec
adc ZPPtr1
sta ZPPtr1
bcc .3
inc ZPPtr1+1
.3 tya
sec
adc ZPPtr2
sta ZPPtr2
bcc .1
inc ZPPtr2+1
jsr CORE.ArgV.DupNextY
bra .1
.4 pla
@ -541,25 +520,29 @@ CORE.ArgV.Dup >STYA ZPPtr1
lda (ZPPtr1),y
sta (ZPPtr2),y
bne .6
tya
sec
adc ZPPtr1
sta ZPPtr1
bcc .7
inc ZPPtr1+1
.7 tya
sec
adc ZPPtr2
sta ZPPtr2
bcc .5
inc ZPPtr2+1
jsr CORE.ArgV.DupNextY
bra .5
.8 clc
.9 rts
*--------------------------------------
CORE.ArgV.DupNextY
tya
sec
adc ZPPtr1
sta ZPPtr1
bcc .1
inc ZPPtr1+1
.1 tya
sec
adc ZPPtr2
sta ZPPtr2
bcc .8
inc ZPPtr2+1
.8 rts
*--------------------------------------
CORE.ArgV.Add >LDYA ZPArgVBufPtr
>STYA ZPArgVBufPrev Save String start of Expand
@ -777,6 +760,12 @@ CORE.SkipCharsA clc
*--------------------------------------
* Stack
*--------------------------------------
CORE.StkCheck sec
adc (pData) StackPtr
cmp #CORE.STACK.MAX
lda #E.STKOVERFLOW
rts
*--------------------------------------
CORE.StkPushPtr bcs .1
lda ZPInputCmdPtr
ldx ZPInputCmdPtr+1
@ -799,32 +788,6 @@ CORE.StkPullPtr jsr CORE.StkPull
CORE.StkPullPtr.9
rts
*--------------------------------------
CORE.StkGetPtr lda (pData) StackPtr
beq CORE.StkErr
dec
beq CORE.StkErr
tay
lda (pData),y
sta ZPInputBufPtr
iny
lda (pData),y
sta ZPInputBufPtr+1
clc
rts
CORE.StkErr lda #E.STACKERROR
sec
rts
*--------------------------------------
CORE.StkCheck sec
adc (pData) StackPtr
cmp #CORE.STACK.MAX
lda #E.STKOVERFLOW
rts
*--------------------------------------
CORE.StkPushYA phy
jsr CORE.StkPush
pla
@ -846,6 +809,26 @@ CORE.StkPush pha
* sec
rts
*--------------------------------------
CORE.StkGetPtr lda (pData) StackPtr
beq CORE.StkErr
dec
beq CORE.StkErr
tay
lda (pData),y
sta ZPInputBufPtr
iny
lda (pData),y
sta ZPInputBufPtr+1
clc
rts
CORE.StkErr lda #E.STACKERROR
sec
rts
*--------------------------------------
CORE.StkGetCtx jsr CORE.StkGet
tax
bcs .1 no context...

View File

@ -248,6 +248,9 @@ CS.RUN.LOOP >SLEEP
.1 jsr CheckSleep
beq .3
>LDA.G bSET.C
bne CS.RUN.LOOP
ldy #S.PS.hStdIn
lda (pPS),y
>SYSCALL feof
@ -386,7 +389,9 @@ CS.RUN.READ jsr CL.RESET
.8 jmp CS.RUN.LOOP.END
CS.RUN.READ.9 rts
*--------------------------------------
CS.RUN.BATCH
CS.RUN.BATCH >LDA.G bSET.C
bne .2
ldy #S.PS.hStdIn
lda (pPS),y
>SYSCALL feof
@ -401,8 +406,7 @@ CS.RUN.BATCH
cmp #3 test Ctrl-c
bne .1
sec
rts
bra CS.RUN.LOOP.END CS
.1 cmp #19 test Ctrl-s
bne .2
@ -439,7 +443,7 @@ CS.RUN.BATCH
pha
jsr CORE.RETURN
lda (pData)
bne .6
>LDA.G bExitOnEOF
@ -725,7 +729,6 @@ CL.Len .BS 1
CL.bReady .BS 1
CORE.IntCmd .BS 1
CORE.CmdFile .BS 1
CORE.hArgVBuf .BS 1
CORE.PSFlags .BS 1