Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-07-18 16:04:21 +02:00
parent 88a56a14a3
commit 200bf2b4ef
13 changed files with 135 additions and 79 deletions

Binary file not shown.

View File

@ -154,13 +154,16 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
rts rts
.5 cmp /S.STAT.MODE.DIR DIR ? .5 cmp /S.STAT.MODE.DIR DIR ?
bne .6 beq .6
cmp /S.STAT.MODE.BDEV VOL ?
bne .9
jsr CS.RUN.DIR .6 jsr CS.RUN.DIR
bcc CS.RUN.NEXT bcc CS.RUN.NEXT
rts rts
.6 lda #MLI.E.UNSUPST .9 lda #MLI.E.UNSUPST
sec sec
.99 rts .99 rts
*-------------------------------------- *--------------------------------------

View File

@ -149,13 +149,16 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
rts rts
.5 cmp /S.STAT.MODE.DIR DIR ? .5 cmp /S.STAT.MODE.DIR DIR ?
bne .6 beq .6
cmp /S.STAT.MODE.BDEV VOL ?
bne .9
jsr CS.RUN.DIR .6 jsr CS.RUN.DIR
bcc CS.RUN.NEXT bcc CS.RUN.NEXT
rts rts
.6 lda #MLI.E.UNSUPST .9 lda #MLI.E.UNSUPST
sec sec
.99 rts .99 rts
*-------------------------------------- *--------------------------------------

View File

@ -155,13 +155,16 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
rts rts
.5 cmp /S.STAT.MODE.DIR DIR ? .5 cmp /S.STAT.MODE.DIR DIR ?
bne .6 beq .6
cmp /S.STAT.MODE.BDEV VOL ?
bne .9
jsr CS.RUN.DIR .6 jsr CS.RUN.DIR
bcc CS.RUN.NEXT bcc CS.RUN.NEXT
rts rts
.6 lda #MLI.E.UNSUPST .9 lda #MLI.E.UNSUPST
sec sec
.99 rts .99 rts
*-------------------------------------- *--------------------------------------

View File

@ -113,7 +113,7 @@ NEW
.FIN .FIN
.DO ]1=MLIGETBUF .DO ]1=MLIGETBUF
lda #2 lda #2
.FIN .FIN
.DO ]1=MLISETFILEINFOEX .DO ]1=MLISETFILEINFOEX
lda #2 lda #2
@ -121,11 +121,11 @@ NEW
.DO ]1=MLIGETFILEINFOEX .DO ]1=MLIGETFILEINFOEX
lda #2 lda #2
.FIN .FIN
.DO ]1=MLISETACL .DO ]1=MLIACL
lda #2 lda #2
.FIN .FIN
jsr GP.MLICall jsr GP.MLICall
.EM .EM
*-------------------------------------- *--------------------------------------
* FPU Entry Point * FPU Entry Point
@ -204,7 +204,7 @@ FPU.FOUT .EQ 58 PrintF
.EM .EM
*-------------------------------------- *--------------------------------------
.MA PUSHL.G .MA PUSHL.G
ldy #]1+4 ldy #]1+4
:1 dey :1 dey
lda (pData),y lda (pData),y
>PUSHA >PUSHA

View File

@ -35,10 +35,10 @@ MLISETEOF .EQ $D0
MLIGETEOF .EQ $D1 MLIGETEOF .EQ $D1
MLISETBUF .EQ $D2 MLISETBUF .EQ $D2
MLIGETBUF .EQ $D3 MLIGETBUF .EQ $D3
* ProDOS FX
MLISETFILEINFOEX .EQ $D4 MLISETFILEINFOEX .EQ $D4
MLIGETFILEINFOEX .EQ $D5 MLIGETFILEINFOEX .EQ $D5
MLISETACL .EQ $D6 MLIACL .EQ $D6
*-------------------------------------- *--------------------------------------
S.FI.A .EQ $03 S.FI.A .EQ $03
S.FI.A.R .EQ $01 S.FI.A.R .EQ $01

View File

@ -406,11 +406,8 @@ XDOS.SetPrefix jsr XDOS.GetPath call is made to detect if a null path.
clc no error clc no error
rts rts
H3333 jsr findfile go find specified prefix directory. H3333 jsr XDOS.FindFileOrVol go find specified prefix directory.
bcc H333C if no error. bcs pfxerr branch if error is not root directory.
cmp #MLI.E.INVPATH bad pathname.
bne pfxerr branch if error is not root directory.
H333C lda d_stor make sure last local name is dir type H333C lda d_stor make sure last local name is dir type
and #$D0 (either root or sub). and #$D0 (either root or sub).

View File

@ -1,9 +1,27 @@
NEW NEW
AUTO 3,1 AUTO 3,1
*-------------------------------------- *--------------------------------------
findfile jsr lookfile see if file exists XDOS.FindDirOrVol
bcs nofind jsr XDOS.FindFileOrVol
bcs .99
lda d_stor
and #$F0
cmp #$D0
beq moventry.CLCRTS
.9 lda #MLI.E.UNSUPST
sec
.99 rts
*--------------------------------------
XDOS.FindFileOrVol
jsr lookfile
bcc moventry
cmp #MLI.E.INVPATH
bne fnderr
moventry ldy h_entln Get FileInfo From Directory Block Buffer moventry ldy h_entln Get FileInfo From Directory Block Buffer
.1 dey .1 dey
@ -11,8 +29,13 @@ moventry ldy h_entln Get FileInfo From Directory Block Buffer
sta d_stor,y sta d_stor,y
tya tya
bne .1 bne .1
moventry.CLCRTS
nofind rts clc
rts
*--------------------------------------
XDOS.FindFile jsr lookfile see if file exists
bcc moventry
rts
*-------------------------------------- *--------------------------------------
lookfile jsr preproot go find volume lookfile jsr preproot go find volume
bcs fnderr bcs fnderr

View File

@ -698,11 +698,8 @@ L408D ldy fcbptr change status byte to reflect
sta FCBs+FCB.F,y (carry is unaffected) sta FCBs+FCB.F,y (carry is unaffected)
L4096 rts L4096 rts
*-------------------------------------- *--------------------------------------
XDOS.Open jsr findfile look up the file. XDOS.Open jsr XDOS.FindFileOrVol look up the file.
bcc L40A0 if ok. bcs L4096 if not, then error.
cmp #MLI.E.INVPATH is this opening a root directory ?
bne L40AE if not, then error.
L40A0 jsr tstopen are any other files writing to this L40A0 jsr tstopen are any other files writing to this
bcc L40AD same file ? branch if not. bcc L40AD same file ? branch if not.
@ -712,7 +709,7 @@ L40A5 lda #MLI.E.OPEN file is busy, shared access not allowed.
L40A9 lda #MLI.E.UNSUPST file is wrong storage type. L40A9 lda #MLI.E.UNSUPST file is wrong storage type.
.HS 2C .HS 2C
L40AB lda #MLI.E.FCBFULL fcb full error. L40AB lda #MLI.E.FCBFULL fcb full error.
L40AE sec sec
rts rts
L40AD ldy fcbptr get address of 1st free fcb found. L40AD ldy fcbptr get address of 1st free fcb found.

View File

@ -6,7 +6,7 @@ XDOS.Close ldy #$01 close all ?
bne L4683 no, just one of them. bne L4683 no, just one of them.
sta cferr clear global close error. sta cferr clear global close error.
lda #$00 start at the beginning. * lda #$00 start at the beginning.
L4654 sta fcbptr save current low byte of pointer. L4654 sta fcbptr save current low byte of pointer.
tay get the level at which the file tay get the level at which the file
@ -14,7 +14,7 @@ L4654 sta fcbptr save current low byte of pointer.
cmp flevel if file's level is < global level cmp flevel if file's level is < global level
bcc L4675 then don't close. bcc L4675 then don't close.
lda FCBs,y is this reference file open ? lda FCBs,y is this reference file open ?
beq L4675 no, try next. beq L4675 no, try next.
jsr flush2 clean it out... jsr flush2 clean it out...
@ -58,7 +58,7 @@ close2 ldy fcbptr
* clc strip 'files open' bit * clc strip 'files open' bit
* ror VCBs+VCB.OF,x * ror VCBs+VCB.OF,x
L46B4 clc L46B4 clc
rts rts
L46B6 bcs L46E6 don't report close all error now. L46B6 bcs L46E6 don't report close all error now.
@ -68,7 +68,7 @@ XDOS.Flush ldy #$01 flush all ?
bne flush1 no, just one of them. bne flush1 no, just one of them.
sta cferr clear global flush error. sta cferr clear global flush error.
lda #$00 start at the beginning. * lda #$00 start at the beginning.
L46C3 sta fcbptr save current low byte of pointer. L46C3 sta fcbptr save current low byte of pointer.
tay index to ref #. tay index to ref #.
@ -169,7 +169,7 @@ L476C lda FCBs+FCB.EOF,y needed or not.
cpx #$03 move all 3 bytes cpx #$03 move all 3 bytes
beq L4780 beq L4780
lda FCBs+12,y also move in the address of the file's lda FCBs+FCB.1stBLK,y also move in the address of the file's
sta d_filid,x first block since it might have changed sta d_filid,x first block since it might have changed
iny since the file first opened. iny since the file first opened.
bne L476C branch always. bne L476C branch always.
@ -338,6 +338,7 @@ L485F jsr tkfrecnt force free block count before releasing
sec and tree levels. sec and tree levels.
sbc #$01 sbc #$01
sta dsap deallocate for last (phantom) block sta dsap deallocate for last (phantom) block
lda #$02 and don't modify last data block. lda #$02 and don't modify last data block.
bcs L489F branch if tree level unaffected. bcs L489F branch if tree level unaffected.
@ -454,7 +455,7 @@ XDOS.NewLine ldy #$02 adjust newline status for open file.
rts rts
*-------------------------------------- *--------------------------------------
XDOS.GetFileInfo XDOS.GetFileInfo
jsr findfile look for file. jsr XDOS.FindFile look for file.
bcc L4988 no error. bcc L4988 no error.
cmp #MLI.E.INVPATH was it a root directory file ? cmp #MLI.E.INVPATH was it a root directory file ?
@ -509,7 +510,7 @@ L4994 lda inftabl-3,y
L49A4 rts L49A4 rts
*-------------------------------------- *--------------------------------------
XDOS.SetFileInfo XDOS.SetFileInfo
jsr findfile get the file to work on. jsr XDOS.FindFile get the file to work on.
bcs L49CF if error. bcs L49CF if error.
lda bubit see if backup bit can be cleared lda bubit see if backup bit can be cleared
@ -544,7 +545,7 @@ L49D0 ldy #$0B
jmp drevise update with clock also... jmp drevise update with clock also...
*-------------------------------------- *--------------------------------------
XDOS.SetFileInfoEx XDOS.SetFileInfoEx
jsr findfile jsr XDOS.FindFile
bcs L49A4 bcs L49A4
ldx #S.FIEX.BLKPTR+2-1 ldx #S.FIEX.BLKPTR+2-1
@ -559,14 +560,10 @@ XDOS.SetFileInfoEx.8
jmp drevise1 jmp drevise1
*-------------------------------------- *--------------------------------------
XDOS.GetFileInfoEx XDOS.GetFileInfoEx
jsr findfile see if file exists jsr XDOS.FindFileOrVol
bcc .1 bcs .9
cmp #MLI.E.INVPATH
sec
bne .9
.1 ldx #S.FIEX.BLKPTR+2-1 ldx #S.FIEX.BLKPTR+2-1
ldy #S.FIEX.BLKPTR+2-1+3 ldy #S.FIEX.BLKPTR+2-1+3
.2 lda d_stor,x .2 lda d_stor,x
@ -584,38 +581,42 @@ XDOS.GetFileInfoEx
dex dex
bpl .3 bpl .3
clc * clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
XDOS.SetACL jsr findfile XDOS.ACL jsr XDOS.FindDirOrVol
bcs .9 bcs .9
lda d_stor
and #$F0
cmp #$D0
bne .99
jsr XDOS.ReadGBuf_d_frst jsr XDOS.ReadGBuf_d_frst
bcs .9 bcs .9
ldx #7 ldx #7
ldy #S.FIEX.ACL+3
lda (A3L),y
beq .2
ldy #S.FIEX.ACL+7+3 ldy #S.FIEX.ACL+7+3
.3 lda (A3L),y .1 lda (A3L),y
sta gbuf+$14,x sta gbuf+$14,x
dey dey
dex dex
bpl .3 bpl .1
jmp XDOS.WriteGBuf jmp XDOS.WriteGBuf
.2 ldy #S.FIEX.ACL+7+3
.99 lda MLI.E.UNSUPST .3 lda gbuf+$14,x
sec sta (A3L),y
dey
dex
bpl .3
* clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
XDOS.GetACL clc
rts
*--------------------------------------
XDOS.Rename jsr lookfile look for source (original) file. XDOS.Rename jsr lookfile look for source (original) file.
bcc XDOS.RenameFileDir if found. bcc XDOS.RenameFileDir if found.
@ -726,7 +727,7 @@ L4A7F cmp #MLI.E.FNOTFND was it a valid file not found ?
bne L4A74 no, rename error. bne L4A74 no, rename error.
jsr XDOS.GetPath syntax pathname of file to be changed. jsr XDOS.GetPath syntax pathname of file to be changed.
jsr findfile get all the info on this file. jsr XDOS.FindFile get all the info on this file.
bcs L4A74 rename error. bcs L4A74 rename error.
jsr tstopen is file in use ? jsr tstopen is file in use ?

View File

@ -1,7 +1,7 @@
NEW NEW
AUTO 3,1 AUTO 3,1
*-------------------------------------- *--------------------------------------
XDOS.Destroy jsr findfile look for file to be destroyed. XDOS.Destroy jsr XDOS.FindFile look for file to be destroyed.
bcs L4B66 if error. bcs L4B66 if error.
jsr tstopen is it open ? jsr tstopen is it open ?
@ -816,7 +816,7 @@ XDOS.CmdNums .HS D3D4D5D6 table of valid mli command numbers.
.HS 808182 .HS 808182
.HS 65 .HS 65
.HS C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF .HS C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF
.HS D7 .HS 00
.HS D0D1D2 .HS D0D1D2
XDOS.ParamCnt .HS 02020202 parameter counts for the calls XDOS.ParamCnt .HS 02020202 parameter counts for the calls
@ -824,7 +824,7 @@ XDOS.ParamCnt .HS 02020202 parameter counts for the calls
.HS 030300 .HS 030300
.HS 04 .HS 04
.HS 070102070A0201010303040401010202 .HS 070102070A0201010303040401010202
.HS 02 .HS FF
.HS 020202 .HS 020202
XDOS.CmdFlags .HS A0A1A2 XDOS.CmdFlags .HS A0A1A2
@ -863,8 +863,7 @@ cmdtable .DA XDOS.Create
.DA XDOS.SetFileInfoEx .DA XDOS.SetFileInfoEx
.DA XDOS.GetFileInfoEx .DA XDOS.GetFileInfoEx
.DA XDOS.SetACL .DA XDOS.ACL
.DA XDOS.GetACL
dinctbl .HS 0100000200 table to increment directory usage/eof counts dinctbl .HS 0100000200 table to increment directory usage/eof counts
.DO LOWERCASE=1 .DO LOWERCASE=1

View File

@ -295,7 +295,9 @@ IO.CLOSE.NOD ldx #2
K.ChOwn jsr PFT.CheckPath2 K.ChOwn jsr PFT.CheckPath2
bcs K.ChOwn.RET4 bcs K.ChOwn.RET4
>MLICALL MLIGETFILEINFOEX stz K.MLI.PARAMS+3+S.FIEX.ACL read mode
>MLICALL MLIACL
bcs K.ChOwn.RET4 bcs K.ChOwn.RET4
>PULLB K.MLI.PARAMS+3+S.FIEX.ACL.GID >PULLB K.MLI.PARAMS+3+S.FIEX.ACL.GID
@ -304,10 +306,10 @@ K.ChOwn jsr PFT.CheckPath2
inc pStack inc pStack
inc pStack inc pStack
lda #$57 lda #$57 write mode
sta K.MLI.PARAMS+3+S.FIEX.ACL sta K.MLI.PARAMS+3+S.FIEX.ACL
>MLICALL MLISETACL >MLICALL MLIACL
rts rts
K.ChOwn.RET4 >RET 4 K.ChOwn.RET4 >RET 4

View File

@ -33,11 +33,12 @@ RW.Init >LDYAI RW.MSG
rts rts
.10 jsr RW.Detect2 .10 jsr RW.Detect2
bcc .1 bcc .1
>LDYAI RW.MSG.KO1 >LDYAI RW.MSG.KO1
jsr PrintFYA jsr PrintFYA
rts rts
.1 pha Push Page count .1 pha Push Page count
lsr divide by 4 to compute KB size lsr divide by 4 to compute KB size
@ -84,16 +85,21 @@ RW.ONLINEBUFFER .BS 16
*-------------------------------------- *--------------------------------------
RW.Detect2 php RW.Detect2 php
sei sei
sta SETALTZP sta SETALTZP
ldx #0 start detection at page $00 ldx #0 start detection at page $00
.1 stx RWBankSelect .1 stx RWBankSelect
lda 0 lda 0
sta RW.SAVEZP0,x save Bank 0 $0000 to prevent ALTZP trash sta RW.SAVEZP0,x save Bank 0 $0000 to prevent ALTZP trash
lda 1 lda 1
sta RW.SAVEZP1,x sta RW.SAVEZP1,x
inx inx
bpl .1 bpl .1
lda #0 lda #0
.2 sta RWBankSelect .2 sta RWBankSelect
*-------------------------------------- *--------------------------------------
* Added after David Finnigan from macgui.com testing sessions * Added after David Finnigan from macgui.com testing sessions
@ -109,7 +115,9 @@ RW.Detect2 php
eor #$FF eor #$FF
inc inc
bpl .2 bpl .2
ldx #0 ldx #0
.3 txa .3 txa
sta RWBankSelect sta RWBankSelect
*-------------------------------------- *--------------------------------------
@ -122,13 +130,17 @@ RW.Detect2 php
*-------------------------------------- *--------------------------------------
cmp 0 cmp 0
bne .4 bne .4
eor #$FF eor #$FF
cmp 1 cmp 1
bne .4 bne .4
inx inx
bpl .3 bpl .3
.4 dex we reached 128,last detected page was 127
ldy #127 X = detected page count dex we reached 128,last detected page was 127
.4 ldy #127 X = detected page count
.6 sty RWBankSelect .6 sty RWBankSelect
@ -141,10 +153,12 @@ RW.Detect2 php
txa txa
stx RW.PGCNT PGCNT = last detected page, as we do -1 for AuxMem stx RW.PGCNT PGCNT = last detected page, as we do -1 for AuxMem
sta CLRALTZP sta CLRALTZP
plp plp
lda RW.PGCNT
bmi .9 txa PGCNT > 0 ?
beq .9
clc clc
rts rts
@ -154,33 +168,43 @@ RW.Detect2 php
*-------------------------------------- *--------------------------------------
RW.Install lda RRAMWRAMBNK1 RW.Install lda RRAMWRAMBNK1
lda RRAMWRAMBNK1 lda RRAMWRAMBNK1
ldx #RWDRV.SIZE ldx #RWDRV.SIZE
.1 lda RWDRV.B.START-1,x .1 lda RWDRV.B.START-1,x
sta RWDRV.START-1,x sta RWDRV.START-1,x
dex dex
bne .1 bne .1
lda RW.PGCNT lda RW.PGCNT
lsr lsr
sta RWDRV.MAXHI+1 sta RWDRV.MAXHI+1
lda #0 lda #0
ror ror
sta RWDRV.MAXLO+1 sta RWDRV.MAXLO+1
lda RROMBNK1 lda RROMBNK1
sta SETWRITEAUX sta SETWRITEAUX
ldx #RWDRVX.SIZE ldx #RWDRVX.SIZE
.2 lda RWDRVX.B.START-1,x .2 lda RWDRVX.B.START-1,x
sta RWDRVX.START-1,x sta RWDRVX.START-1,x
dex dex
bne .2 bne .2
sta CLRWRITEAUX sta CLRWRITEAUX
inc DEVCNT inc DEVCNT
ldx DEVCNT ldx DEVCNT
lda #$B0 Slot 3,Drive 2,0=Not Removable, 0=no int, 00=1 Volume lda #$B0 Slot 3,Drive 2,0=Not Removable, 0=no int, 00=1 Volume
sta DEVLST,x sta DEVLST,x
lda #RWDRV.START lda #RWDRV.START
sta DEVPTRS3D2 sta DEVPTRS3D2
lda /RWDRV.START lda /RWDRV.START
sta DEVPTRS3D2+1 sta DEVPTRS3D2+1
clc clc
rts rts
*-------------------------------------- *--------------------------------------
@ -372,18 +396,19 @@ RWDRV.START cld ProDOS will check that byte!!!
sbc RWDRV.MAXHI+1 sbc RWDRV.MAXHI+1
bcs RWDRV.IOERR DRV.BLKNUM >= RW.DRV.SIZE, IO error bcs RWDRV.IOERR DRV.BLKNUM >= RW.DRV.SIZE, IO error
php Disable IRQ as no vector set in RW Banks
sei
txa Get Back DRV.BLKNUM txa Get Back DRV.BLKNUM
asl compute PAGE = blocknumLO *2 asl compute PAGE = blocknumLO *2
pha pha
lda DRV.BLKNUM+1 compute BANK = blocknumHI *2 lda DRV.BLKNUM+1 compute BANK = blocknumHI *2
rol rol
inc +1 for skipping Aux BANK 0 inc +1 for skipping Aux BANK 0
plx move page into X plx move page into X
php Disable IRQ as no vector set in RW Banks
sei
beq RWDRV.GOAUX move from/to aux page0/1 beq RWDRV.GOAUX move from/to aux page0/1
cpx #$C0 cpx #$C0
bcs RWDRV.GOAUX move from/to aux LC bcs RWDRV.GOAUX move from/to aux LC
*-------------------------------------- *--------------------------------------
@ -520,11 +545,14 @@ RWDRVX.START sta RWDRVX.XM.BANK+1 setup BANK
* Called form Main LC after RWDRVX.XM execution * Called form Main LC after RWDRVX.XM execution
*-------------------------------------- *--------------------------------------
RWDRVX.RESTORE ldy #RWDRVX.XM.SIZE Now, restore begining of $300 RWDRVX.RESTORE ldy #RWDRVX.XM.SIZE Now, restore begining of $300
.1 lda RWDRVX.XM.SAVE-1,y .1 lda RWDRVX.XM.SAVE-1,y
sta RWDRV.XM.RUN-1,y sta RWDRV.XM.RUN-1,y
dey dey
bne .1 bne .1
tya setup A=0 and CC for exit with non error tya setup A=0 and CC for exit with non error
clc clc
rts rts
*-------------------------------------- *--------------------------------------