Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-09-09 14:47:18 +02:00
parent c4d9de2cf3
commit 2094cef35c
7 changed files with 65 additions and 56 deletions

Binary file not shown.

View File

@ -333,40 +333,37 @@ CS.RUN.IOERR pha
*--------------------------------------
CS.RUN.ENCODE >LDYA ZPReqBufPtr
>STYA ZPPtr
inc ZPEncodedBufLen for ending \0
.10 lda (ZPPtr)
.1 lda (ZPPtr)
beq .4
inc ZPEncodedBufLen
bne .1
inc ZPEncodedBufLen+1
.1 inc ZPPtr
bne .11
inc ZPPtr
bne .2
inc ZPPtr+1
.11 jsr CS.RUN.TOENCODE
bcc .10
.2 jsr CS.RUN.TOENCODE if CS 2 bytes, if CC 1 byte
.3 lda ZPEncodedBufLen
clc
adc #2
lda ZPEncodedBufLen
adc #1
sta ZPEncodedBufLen
bcc .10
bcc .1
inc ZPEncodedBufLen+1
bra .10
bra .1
*--------------------------------------
.4 >LDYA ZPEncodedBufLen
>SYSCALL GetMem
bcs .9
>STYA ZPEncodedBufPtr
>STYA ZPPtr
stx hEncodedBuf
>LDYA ZPReqBufPtr
>STYA ZPPtr
.5 lda (ZPReqBufPtr)
beq .8
@ -384,7 +381,9 @@ CS.RUN.ENCODE >LDYA ZPReqBufPtr
.7 jsr CS.RUN.ADDTOBUF
bra .5
.8 clc
.8 sta (ZPPtr) ending \0
clc
.9 rts
*--------------------------------------
CS.RUN.TOENCODE ldx #URI.ToEncode.Cnt-1

View File

@ -31,7 +31,7 @@ K.OpenDir jsr PFT.CheckPathYA
cmp /S.STAT.MODE.DIR
bne .97
jsr IO.MLI.OPEN
jsr FS.OPEN
bcs .98
.8 jsr STDIO.NewHFile

View File

@ -22,7 +22,7 @@ IO.OPEN.REG >MLICALL MLIGETFILEINFO
jsr IO.MkFD
bcs .9
jsr IO.MLI.OPEN
jsr FS.OPEN
bcs .99
lda IO.Open.FLAGS
@ -85,8 +85,8 @@ IO.WRITE.REG ldx #MLIWRITE
IO.WRITE.REG.RTS
rts
*--------------------------------------
IO.CLOSE.REG
IO.CLOSE.DIR ldy #S.FD.REG.REF
FS.CLOSE.REG
FS.CLOSE.DIR ldy #S.FD.REG.REF
lda (pFD),y
beq .1
sta K.MLI.PARAMS+1
@ -100,7 +100,7 @@ IO.CLOSE.DIR ldy #S.FD.REG.REF
.2 lda IO.hFD
jmp K.FreeMem
*--------------------------------------
IO.EOF.REG >MLICALL MLIGETMARK
FS.EOF.REG >MLICALL MLIGETMARK
bcs .9
ldy #2
.1 lda K.MLI.PARAMS+2,y
@ -137,7 +137,7 @@ FS.CREATE sta K.MLI.PARAMS+7 Storage Type
>MLICALL MLICREATE
rts
*--------------------------------------
IO.MLI.OPEN >LDYAI 1024 get a ProDOS IOBUF
FS.OPEN >LDYAI 1024 get a ProDOS IOBUF
ldx #S.MEM.F.ALIGN
jsr MEM.GetMem.YAX
bcs .9

View File

@ -591,7 +591,7 @@ K.FEOF jsr PFT.CheckNodeA
IO.EOF lda (pFD)
tax
jmp (.1,x)
.1 .DA IO.EOF.REG
.1 .DA FS.EOF.REG
.DA STDIO.IOERR DIR
.DA IO.EOF.CDEV
.DA STDIO.IOERR BDEV

View File

@ -108,8 +108,8 @@ K.Close jsr UNISTD.GetPFD
UNISTD.Close lda (pFD) #S.FD.T
tax
jmp (.1,x)
.1 .DA IO.CLOSE.REG
.DA IO.CLOSE.DIR
.1 .DA FS.CLOSE.REG
.DA FS.CLOSE.DIR
.DA IO.CLOSE.CDEV
.DA IO.CLOSE.BDEV
.DA STDIO.IOERR LNK

View File

@ -579,67 +579,77 @@ RWDRVX.RESTORE ldy #RWDRVX.XM.SIZE Now, restore begining of $300
jmp RWDRV.EXIT
*--------------------------------------
* "auXMove" Code, moved from Aux to main $300
* $0200 -> $02FF TMP buffer for 2 steps moving between LCs
* LC Copy Code, moved from Aux to main $300
* $0200 -> $02FF TMP buffer for 2 steps move between LCs
* CC=WRITE :
* CS=READ :
*--------------------------------------
RWDRVX.XM.START ldx #0
ldy #2 2 pages to copy
RWDRVX.XM.COPY jsr RWDRV.XM.RUN+RWDRVX.XM.MNLC-RWDRVX.XM.START WRITE:copy from MAIN to TMP
bcc RWDRVX.XM.SRC CC=WRITE,CS=READ?
jsr RWDRV.XM.RUN+RWDRVX.XM.RWLC-RWDRVX.XM.START READ:copy from BANK to TMP
sta SETALTZP
RWDRVX.XM.START ldy #2 2 pages to copy
RWDRVX.XM.COPY jsr RWDRV.XM.RUN+RWDRVX.XM.SRCLC-RWDRVX.XM.START
sta $C000,x
sta RWBankSelect
ldx #0
RWDRVX.XM.SRC lda $FFFF,x
sta RMDRVX.TMP,x
inx
bne RWDRVX.XM.SRC
sta CLRALTZP
jsr RWDRV.XM.RUN+RWDRVX.XM.DSTLC-RWDRVX.XM.START
sta $C000,x
sta RWBankSelect
ldx #0
jsr RWDRV.XM.RUN+RWDRVX.XM.MNLC-RWDRVX.XM.START READ:copy from TMP to MAIN
bcs RWDRVX.XM.1 CC=WRITE,CS=READ?
jsr RWDRV.XM.RUN+RWDRVX.XM.RWLC-RWDRVX.XM.START WRITE:copy from TMP to BANK
sta SETALTZP
RWDRVX.XM.1 lda RMDRVX.TMP,x
RWDRVX.XM.2 lda RMDRVX.TMP,x
RWDRVX.XM.DST sta $FFFF,x
inx
bne RWDRVX.XM.1
sta CLRALTZP
bne RWDRVX.XM.2
inc RWDRV.XM.RUN+RWDRVX.XM.SRC+2-RWDRVX.XM.START
inc RWDRV.XM.RUN+RWDRVX.XM.DST+2-RWDRVX.XM.START
dey
bne RWDRVX.XM.COPY
sta CLRALTZP
stz RWBankSelect
*--------------------------------------
RWDRVX.XM.MNLC bit RRAMWRAMBNK1 ProDOS always uses LCBANK1
bit RRAMWRAMBNK1
lda #0
ldx #CLRALTZP
RWDRVX.XM.MNLC stz RWBankSelect ProDOS always uses LCBANK1
bit RRAMWRAMBNK1
bit RRAMWRAMBNK1
rts
*--------------------------------------
RWDRVX.XM.SRCLC bcc RWDRVX.XM.MNLC CC=WRITE,CS=READ?
.HS 2C BIT ABS
RWDRVX.XM.DSTLC bcs RWDRVX.XM.MNLC CC=WRITE,CS=READ?
*--------------------------------------
RWDRVX.XM.RWLC lda #$FF
bmi RWDRVX.XM.BANK
bit RRAMWRAMBNK2
bit RRAMWRAMBNK2
RWDRVX.XM.BANK lda #$FF
sta RWBankSelect
ldx #SETALTZP
rts
RWDRVX.XM.END
*--------------------------------------
RWDRVX.XM.SIZE .EQ RWDRVX.XM.END-RWDRVX.XM.START
.LIST ON
RWDRVX.XM.SIZE .EQ *-RWDRVX.XM.START
.LIST OFF
*--------------------------------------
RWDRVX.XM.SAVE .BS RWDRVX.XM.SIZE
*--------------------------------------
.EP
*--------------------------------------
RWDRVX.B.END
.LIST ON
RWDRVX.B.END .LIST ON
RWDRVX.SIZE .EQ RWDRVX.B.END-RWDRVX.B.START
.LIST OFF
*--------------------------------------