Kernel 0.92, /DEV/NULL fix

This commit is contained in:
Rémy GIBERT 2019-01-25 12:43:50 +00:00
parent 7829347f9c
commit 8401ddf407
6 changed files with 19 additions and 19 deletions

Binary file not shown.

Binary file not shown.

View File

@ -47,6 +47,7 @@ CS.INIT
>STYA ZPPtr1
lda (ZPPtr1)
cmp #'-'
bne .4
@ -106,7 +107,7 @@ CS.RUN >SYSCALL GetChar
.10 >LDA.G bPause
bne .8 Pause...
>LDA.G hFILE
bne .2

View File

@ -222,7 +222,7 @@ K.Close sta IO.hFD
jsr K.GetMemPtr
>STYA pFD
lda (pFD) #S.FD.T
IO.Close.I lda (pFD) #S.FD.T
tax
jmp (.1,x)

View File

@ -93,8 +93,7 @@ PFT.CheckNodeA stx .80+1 Save SYSCALL #
sta .81+1 Save hFILE
tax
lda OF.Table.hFD,x
beq .9
lda OF.Table.hFD,x /DEV/NULL = 0!
sta IO.hFD
ldy OF.Table.hPath,x if 0, its a hDEV
@ -133,10 +132,6 @@ PFT.CheckNodeA stx .80+1 Save SYSCALL #
.80 ldx #$ff SELF MODIFIED
.81 lda #$ff SELF MODIFIED
clc
rts
.9 lda #E.INVH
sec
rts
*--------------------------------------
MAN

View File

@ -1007,21 +1007,25 @@ K.FOpen jsr PFT.CheckPathYA
* ## RETURN VALUE
*\--------------------------------------
K.FClose jsr PFT.CheckNodeA
tax
bcs .9
sta .1+1 store hFile
jsr IO.Close.I
bcs .9
.1 ldx #$ff SELF MODIFIED
stz OF.Table.hFD,x
lda OF.Table.hPath,x
beq .9
stz OF.Table.hPath,x
jsr K.FreeMem discard filename
beq .9 special files have no path
lda OF.Table.hFD,x
stz OF.Table.hFD,x
jmp K.Close
stz OF.Table.hPath,x
jmp K.FreeMem discard filename
* clc
.9 lda #E.INVH
sec
K.FClose.RTS rts
.9 rts
*/--------------------------------------
* # FRead
* Read bytes from file