mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-22 16:31:07 +00:00
Kernel 0.94
This commit is contained in:
parent
88a56a14a3
commit
200bf2b4ef
Binary file not shown.
@ -154,13 +154,16 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
rts
|
||||
|
||||
.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
|
||||
rts
|
||||
|
||||
.6 lda #MLI.E.UNSUPST
|
||||
.9 lda #MLI.E.UNSUPST
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
|
@ -149,13 +149,16 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
rts
|
||||
|
||||
.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
|
||||
rts
|
||||
|
||||
.6 lda #MLI.E.UNSUPST
|
||||
.9 lda #MLI.E.UNSUPST
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
|
@ -155,13 +155,16 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
rts
|
||||
|
||||
.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
|
||||
rts
|
||||
|
||||
.6 lda #MLI.E.UNSUPST
|
||||
.9 lda #MLI.E.UNSUPST
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
|
@ -113,7 +113,7 @@ NEW
|
||||
.FIN
|
||||
.DO ]1=MLIGETBUF
|
||||
lda #2
|
||||
.FIN
|
||||
.FIN
|
||||
|
||||
.DO ]1=MLISETFILEINFOEX
|
||||
lda #2
|
||||
@ -121,11 +121,11 @@ NEW
|
||||
.DO ]1=MLIGETFILEINFOEX
|
||||
lda #2
|
||||
.FIN
|
||||
.DO ]1=MLISETACL
|
||||
.DO ]1=MLIACL
|
||||
lda #2
|
||||
.FIN
|
||||
|
||||
jsr GP.MLICall
|
||||
jsr GP.MLICall
|
||||
.EM
|
||||
*--------------------------------------
|
||||
* FPU Entry Point
|
||||
@ -204,7 +204,7 @@ FPU.FOUT .EQ 58 PrintF
|
||||
.EM
|
||||
*--------------------------------------
|
||||
.MA PUSHL.G
|
||||
ldy #]1+4
|
||||
ldy #]1+4
|
||||
:1 dey
|
||||
lda (pData),y
|
||||
>PUSHA
|
||||
|
@ -35,10 +35,10 @@ MLISETEOF .EQ $D0
|
||||
MLIGETEOF .EQ $D1
|
||||
MLISETBUF .EQ $D2
|
||||
MLIGETBUF .EQ $D3
|
||||
|
||||
* ProDOS FX
|
||||
MLISETFILEINFOEX .EQ $D4
|
||||
MLIGETFILEINFOEX .EQ $D5
|
||||
MLISETACL .EQ $D6
|
||||
MLIACL .EQ $D6
|
||||
*--------------------------------------
|
||||
S.FI.A .EQ $03
|
||||
S.FI.A.R .EQ $01
|
||||
|
@ -406,11 +406,8 @@ XDOS.SetPrefix jsr XDOS.GetPath call is made to detect if a null path.
|
||||
clc no error
|
||||
rts
|
||||
|
||||
H3333 jsr findfile go find specified prefix directory.
|
||||
bcc H333C if no error.
|
||||
|
||||
cmp #MLI.E.INVPATH bad pathname.
|
||||
bne pfxerr branch if error is not root directory.
|
||||
H3333 jsr XDOS.FindFileOrVol go find specified prefix directory.
|
||||
bcs pfxerr branch if error is not root directory.
|
||||
|
||||
H333C lda d_stor make sure last local name is dir type
|
||||
and #$D0 (either root or sub).
|
||||
|
@ -1,9 +1,27 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
*--------------------------------------
|
||||
findfile jsr lookfile see if file exists
|
||||
bcs nofind
|
||||
XDOS.FindDirOrVol
|
||||
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
|
||||
|
||||
.1 dey
|
||||
@ -11,8 +29,13 @@ moventry ldy h_entln Get FileInfo From Directory Block Buffer
|
||||
sta d_stor,y
|
||||
tya
|
||||
bne .1
|
||||
|
||||
nofind rts
|
||||
moventry.CLCRTS
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.FindFile jsr lookfile see if file exists
|
||||
bcc moventry
|
||||
rts
|
||||
*--------------------------------------
|
||||
lookfile jsr preproot go find volume
|
||||
bcs fnderr
|
||||
|
@ -698,11 +698,8 @@ L408D ldy fcbptr change status byte to reflect
|
||||
sta FCBs+FCB.F,y (carry is unaffected)
|
||||
L4096 rts
|
||||
*--------------------------------------
|
||||
XDOS.Open jsr findfile look up the file.
|
||||
bcc L40A0 if ok.
|
||||
|
||||
cmp #MLI.E.INVPATH is this opening a root directory ?
|
||||
bne L40AE if not, then error.
|
||||
XDOS.Open jsr XDOS.FindFileOrVol look up the file.
|
||||
bcs L4096 if not, then error.
|
||||
|
||||
L40A0 jsr tstopen are any other files writing to this
|
||||
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.
|
||||
.HS 2C
|
||||
L40AB lda #MLI.E.FCBFULL fcb full error.
|
||||
L40AE sec
|
||||
sec
|
||||
rts
|
||||
|
||||
L40AD ldy fcbptr get address of 1st free fcb found.
|
||||
|
@ -6,7 +6,7 @@ XDOS.Close ldy #$01 close all ?
|
||||
bne L4683 no, just one of them.
|
||||
|
||||
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.
|
||||
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
|
||||
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.
|
||||
|
||||
jsr flush2 clean it out...
|
||||
@ -58,7 +58,7 @@ close2 ldy fcbptr
|
||||
* clc strip 'files open' bit
|
||||
* ror VCBs+VCB.OF,x
|
||||
|
||||
L46B4 clc
|
||||
L46B4 clc
|
||||
rts
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
tay index to ref #.
|
||||
@ -169,7 +169,7 @@ L476C lda FCBs+FCB.EOF,y needed or not.
|
||||
cpx #$03 move all 3 bytes
|
||||
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
|
||||
iny since the file first opened.
|
||||
bne L476C branch always.
|
||||
@ -338,6 +338,7 @@ L485F jsr tkfrecnt force free block count before releasing
|
||||
sec and tree levels.
|
||||
sbc #$01
|
||||
sta dsap deallocate for last (phantom) block
|
||||
|
||||
lda #$02 and don't modify last data block.
|
||||
bcs L489F branch if tree level unaffected.
|
||||
|
||||
@ -454,7 +455,7 @@ XDOS.NewLine ldy #$02 adjust newline status for open file.
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.GetFileInfo
|
||||
jsr findfile look for file.
|
||||
jsr XDOS.FindFile look for file.
|
||||
bcc L4988 no error.
|
||||
|
||||
cmp #MLI.E.INVPATH was it a root directory file ?
|
||||
@ -509,7 +510,7 @@ L4994 lda inftabl-3,y
|
||||
L49A4 rts
|
||||
*--------------------------------------
|
||||
XDOS.SetFileInfo
|
||||
jsr findfile get the file to work on.
|
||||
jsr XDOS.FindFile get the file to work on.
|
||||
bcs L49CF if error.
|
||||
|
||||
lda bubit see if backup bit can be cleared
|
||||
@ -544,7 +545,7 @@ L49D0 ldy #$0B
|
||||
jmp drevise update with clock also...
|
||||
*--------------------------------------
|
||||
XDOS.SetFileInfoEx
|
||||
jsr findfile
|
||||
jsr XDOS.FindFile
|
||||
bcs L49A4
|
||||
|
||||
ldx #S.FIEX.BLKPTR+2-1
|
||||
@ -559,14 +560,10 @@ XDOS.SetFileInfoEx.8
|
||||
jmp drevise1
|
||||
*--------------------------------------
|
||||
XDOS.GetFileInfoEx
|
||||
jsr findfile see if file exists
|
||||
bcc .1
|
||||
|
||||
cmp #MLI.E.INVPATH
|
||||
sec
|
||||
bne .9
|
||||
jsr XDOS.FindFileOrVol
|
||||
bcs .9
|
||||
|
||||
.1 ldx #S.FIEX.BLKPTR+2-1
|
||||
ldx #S.FIEX.BLKPTR+2-1
|
||||
ldy #S.FIEX.BLKPTR+2-1+3
|
||||
|
||||
.2 lda d_stor,x
|
||||
@ -584,38 +581,42 @@ XDOS.GetFileInfoEx
|
||||
dex
|
||||
bpl .3
|
||||
|
||||
clc
|
||||
* clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
XDOS.SetACL jsr findfile
|
||||
XDOS.ACL jsr XDOS.FindDirOrVol
|
||||
bcs .9
|
||||
|
||||
lda d_stor
|
||||
and #$F0
|
||||
cmp #$D0
|
||||
bne .99
|
||||
|
||||
jsr XDOS.ReadGBuf_d_frst
|
||||
bcs .9
|
||||
|
||||
ldx #7
|
||||
|
||||
ldy #S.FIEX.ACL+3
|
||||
lda (A3L),y
|
||||
beq .2
|
||||
|
||||
ldy #S.FIEX.ACL+7+3
|
||||
|
||||
.3 lda (A3L),y
|
||||
|
||||
.1 lda (A3L),y
|
||||
sta gbuf+$14,x
|
||||
dey
|
||||
dex
|
||||
bpl .3
|
||||
bpl .1
|
||||
|
||||
jmp XDOS.WriteGBuf
|
||||
|
||||
.2 ldy #S.FIEX.ACL+7+3
|
||||
|
||||
.99 lda MLI.E.UNSUPST
|
||||
sec
|
||||
.3 lda gbuf+$14,x
|
||||
sta (A3L),y
|
||||
dey
|
||||
dex
|
||||
bpl .3
|
||||
|
||||
* clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
XDOS.GetACL clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.Rename jsr lookfile look for source (original) file.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
jsr tstopen is file in use ?
|
||||
|
@ -1,7 +1,7 @@
|
||||
NEW
|
||||
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.
|
||||
|
||||
jsr tstopen is it open ?
|
||||
@ -816,7 +816,7 @@ XDOS.CmdNums .HS D3D4D5D6 table of valid mli command numbers.
|
||||
.HS 808182
|
||||
.HS 65
|
||||
.HS C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF
|
||||
.HS D7
|
||||
.HS 00
|
||||
.HS D0D1D2
|
||||
|
||||
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 04
|
||||
.HS 070102070A0201010303040401010202
|
||||
.HS 02
|
||||
.HS FF
|
||||
.HS 020202
|
||||
|
||||
XDOS.CmdFlags .HS A0A1A2
|
||||
@ -863,8 +863,7 @@ cmdtable .DA XDOS.Create
|
||||
|
||||
.DA XDOS.SetFileInfoEx
|
||||
.DA XDOS.GetFileInfoEx
|
||||
.DA XDOS.SetACL
|
||||
.DA XDOS.GetACL
|
||||
.DA XDOS.ACL
|
||||
|
||||
dinctbl .HS 0100000200 table to increment directory usage/eof counts
|
||||
.DO LOWERCASE=1
|
||||
|
@ -295,7 +295,9 @@ IO.CLOSE.NOD ldx #2
|
||||
K.ChOwn jsr PFT.CheckPath2
|
||||
bcs K.ChOwn.RET4
|
||||
|
||||
>MLICALL MLIGETFILEINFOEX
|
||||
stz K.MLI.PARAMS+3+S.FIEX.ACL read mode
|
||||
|
||||
>MLICALL MLIACL
|
||||
bcs K.ChOwn.RET4
|
||||
|
||||
>PULLB K.MLI.PARAMS+3+S.FIEX.ACL.GID
|
||||
@ -304,10 +306,10 @@ K.ChOwn jsr PFT.CheckPath2
|
||||
inc pStack
|
||||
inc pStack
|
||||
|
||||
lda #$57
|
||||
lda #$57 write mode
|
||||
sta K.MLI.PARAMS+3+S.FIEX.ACL
|
||||
|
||||
>MLICALL MLISETACL
|
||||
>MLICALL MLIACL
|
||||
rts
|
||||
|
||||
K.ChOwn.RET4 >RET 4
|
||||
|
@ -33,11 +33,12 @@ RW.Init >LDYAI RW.MSG
|
||||
rts
|
||||
|
||||
.10 jsr RW.Detect2
|
||||
|
||||
bcc .1
|
||||
|
||||
>LDYAI RW.MSG.KO1
|
||||
jsr PrintFYA
|
||||
rts
|
||||
|
||||
.1 pha Push Page count
|
||||
|
||||
lsr divide by 4 to compute KB size
|
||||
@ -84,16 +85,21 @@ RW.ONLINEBUFFER .BS 16
|
||||
*--------------------------------------
|
||||
RW.Detect2 php
|
||||
sei
|
||||
|
||||
sta SETALTZP
|
||||
|
||||
ldx #0 start detection at page $00
|
||||
|
||||
.1 stx RWBankSelect
|
||||
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
|
||||
sta RW.SAVEZP1,x
|
||||
inx
|
||||
bpl .1
|
||||
|
||||
lda #0
|
||||
|
||||
.2 sta RWBankSelect
|
||||
*--------------------------------------
|
||||
* Added after David Finnigan from macgui.com testing sessions
|
||||
@ -109,7 +115,9 @@ RW.Detect2 php
|
||||
eor #$FF
|
||||
inc
|
||||
bpl .2
|
||||
|
||||
ldx #0
|
||||
|
||||
.3 txa
|
||||
sta RWBankSelect
|
||||
*--------------------------------------
|
||||
@ -122,13 +130,17 @@ RW.Detect2 php
|
||||
*--------------------------------------
|
||||
cmp 0
|
||||
bne .4
|
||||
|
||||
eor #$FF
|
||||
cmp 1
|
||||
bne .4
|
||||
|
||||
inx
|
||||
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
|
||||
|
||||
@ -141,10 +153,12 @@ RW.Detect2 php
|
||||
|
||||
txa
|
||||
stx RW.PGCNT PGCNT = last detected page, as we do -1 for AuxMem
|
||||
|
||||
sta CLRALTZP
|
||||
plp
|
||||
lda RW.PGCNT
|
||||
bmi .9
|
||||
|
||||
txa PGCNT > 0 ?
|
||||
beq .9
|
||||
|
||||
clc
|
||||
rts
|
||||
@ -154,33 +168,43 @@ RW.Detect2 php
|
||||
*--------------------------------------
|
||||
RW.Install lda RRAMWRAMBNK1
|
||||
lda RRAMWRAMBNK1
|
||||
|
||||
ldx #RWDRV.SIZE
|
||||
|
||||
.1 lda RWDRV.B.START-1,x
|
||||
sta RWDRV.START-1,x
|
||||
dex
|
||||
bne .1
|
||||
|
||||
lda RW.PGCNT
|
||||
lsr
|
||||
sta RWDRV.MAXHI+1
|
||||
|
||||
lda #0
|
||||
ror
|
||||
sta RWDRV.MAXLO+1
|
||||
|
||||
lda RROMBNK1
|
||||
sta SETWRITEAUX
|
||||
|
||||
ldx #RWDRVX.SIZE
|
||||
|
||||
.2 lda RWDRVX.B.START-1,x
|
||||
sta RWDRVX.START-1,x
|
||||
dex
|
||||
bne .2
|
||||
|
||||
sta CLRWRITEAUX
|
||||
inc DEVCNT
|
||||
ldx DEVCNT
|
||||
lda #$B0 Slot 3,Drive 2,0=Not Removable, 0=no int, 00=1 Volume
|
||||
sta DEVLST,x
|
||||
|
||||
lda #RWDRV.START
|
||||
sta DEVPTRS3D2
|
||||
lda /RWDRV.START
|
||||
sta DEVPTRS3D2+1
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -372,18 +396,19 @@ RWDRV.START cld ProDOS will check that byte!!!
|
||||
sbc RWDRV.MAXHI+1
|
||||
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
|
||||
asl compute PAGE = blocknumLO *2
|
||||
pha
|
||||
lda DRV.BLKNUM+1 compute BANK = blocknumHI *2
|
||||
rol
|
||||
inc +1 for skipping Aux BANK 0
|
||||
|
||||
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
|
||||
|
||||
cpx #$C0
|
||||
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
|
||||
*--------------------------------------
|
||||
RWDRVX.RESTORE ldy #RWDRVX.XM.SIZE Now, restore begining of $300
|
||||
|
||||
.1 lda RWDRVX.XM.SAVE-1,y
|
||||
sta RWDRV.XM.RUN-1,y
|
||||
dey
|
||||
bne .1
|
||||
|
||||
tya setup A=0 and CC for exit with non error
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user