Kernel 0.92+

This commit is contained in:
Rémy GIBERT 2019-02-19 11:30:45 +00:00
parent 8a80a31a37
commit 01fa428204
5 changed files with 71 additions and 35 deletions

Binary file not shown.

View File

@ -68,17 +68,32 @@ CORE.Run >LDYA ZPInputBufPtr Save Actual cmd for looping
sec
rts Ending 0, CS,A=0
.11 cmp #C.CR
.11 cmp #'|'
bne .21
jsr IO.Pipe.In
bcs .9
jsr CORE.GetNextCharNB Skip |
bcs CORE.Run.CSYN
bra .3
.21 pha
jsr IO.Reset
pla
.3 cmp #C.CR
beq .80 empty line ?
.10 cmp #'#' commented line?
bne .2
.1 jsr CORE.GetNextCharNB
.12 jsr CORE.GetNextCharNB
bcs .8 EOF
cmp #C.CR
bne .1 EOL
bne .12 EOL
.80 jsr CORE.GetNextChar skip CR...
@ -86,22 +101,9 @@ CORE.Run >LDYA ZPInputBufPtr Save Actual cmd for looping
lda #0
clc
rts EOL, CS,A=0
.9 rts EOL, CS,A=0
.2 cmp #'|'
bne .21
jsr CORE.GetNextCharNB
bcs CORE.Run.CSYN
jsr IO.Pipe.In
bcs CORE.Run.RTS
bra .3
.21 jsr IO.Reset
.3 cmp #'.'
.2 cmp #'.'
bne .4
ldy #1

View File

@ -35,7 +35,7 @@ IO.Reset.In >LDA.G IO.hIn
beq .8
pha
ldy #S.PS.hStdIn
lda (pPS),y
>SYSCALL fclose

View File

@ -284,7 +284,18 @@ CS.RUN.LOOP
*--------------------------------------
CS.RUN.INTERACTIVE
jsr IO.Reset
jsr CL.Reset
>LDA.G hInputBuf some commmands left in buffer
beq .10
lda (ZPInputBufPtr)
bne .6
>LDA.G hInputBuf
>SYSCALL freemem
>STZ.G hInputBuf
.10 jsr CL.Reset
jsr CL.PrintPrompt
bcs .9
@ -323,7 +334,7 @@ CS.RUN.INTERACTIVE
txa
>STA.G hInputBuf
.7 jsr CORE.Run
.6 jsr CORE.Run
.8 jmp CS.RUN.LOOP.END
*--------------------------------------
@ -426,10 +437,6 @@ CS.RUN.LOOP.END ldy #S.PS.RC
jsr IO.PrintErrMsg
bcs CS.RUN.LOOP.RTS
>LDA.G hInputBuf
beq CS.RUN.LOOP.8
>SYSCALL FreeMem
CS.RUN.LOOP.8 >LDA.G bExit
beq CS.RUN.LOOP.80
@ -463,7 +470,12 @@ CS.DOEVENT lda (pEvent)
.9 sec
rts
*--------------------------------------
CS.QUIT jsr HIS.Quit
CS.QUIT >LDA.G hInputBuf
beq .1
>SYSCALL FreeMem
.1 jsr HIS.Quit
jsr CL.Quit
jsr CORE.Quit
clc

View File

@ -235,13 +235,7 @@ IO.CLOSE.DIR ldy #S.FD.REG.REF
>MLICALL MLICLOSE
.1 ldy #S.FD.REG.IOBUF
IO.CLOSE.FD lda (pFD),y
beq .2
jsr K.FreeMem
.2 lda IO.hFD
jmp K.FreeMem
bra IO.CLOSE.FD
*--------------------------------------
IO.CLOSE.CDEV
IO.CLOSE.BDEV
@ -250,8 +244,36 @@ IO.CLOSE.DSOCK
IO.CLOSE.SSOCK clc
rts
*--------------------------------------
IO.CLOSE.PIPE ldy #S.FD.PIPE.hMem
bra IO.CLOSE.FD
IO.CLOSE.PIPE jsr IO.CLOSE.NOD
ldy #S.FD.PIPE.hMem
IO.CLOSE.FD lda (pFD),y
beq .1
jsr K.FreeMem
.1 lda IO.hFD
jmp K.FreeMem
*--------------------------------------
IO.CLOSE.NOD ldx #0
lda IO.hFD
.1 lda Nod.Table.hFD,x
cmp IO.hFD
bne .2
stz Nod.Table.hFD,x
lda Nod.Table.hPath,x
stz Nod.Table.hPath,x
jmp K.FreeMem
.2 inx
cpx #K.Nod.MAX
bne .1
rts
*/--------------------------------------
* # read
* ## C