Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-07-17 08:04:08 +02:00
parent 59045997d8
commit 238dacc597
7 changed files with 107 additions and 101 deletions

Binary file not shown.

View File

@ -536,7 +536,7 @@ fndfvol tax search for associated vcb
nxtfvol txa adjust index to next vcb. nxtfvol txa adjust index to next vcb.
clc clc
adc #$20 adc #VCB
bcc fndfvol loop until volume found. bcc fndfvol loop until volume found.
lda #$0A open file has no volume so lda #$0A open file has no volume so
@ -611,24 +611,24 @@ online1 jsr fnddvcb see if it has already been logged in.
ldx #$00 read in root (volume) directory ldx #$00 read in root (volume) directory
lda #$02 lda #$02
jsr XDOS.ReadGBufAX read it into general purpose buffer. jsr XDOS.ReadGBufAX read it into general purpose buffer.
ldx vcbptr index to the vcb entry. ldx vcbptr index to the vcb entry.
bcc volfound branch if read was ok. bcc volfound branch if read was ok.
tay error value. tay error value.
lda VCBs+VCB.OFCNT,x don't take the vcb offline if lda VCBs+VCB.OFCNT,x don't take the vcb offline if
bne rtrnerr there are active files present. bne rtrnerr there are active files present.
sta VCBs,x now take the volume offline sta VCBs,x now take the volume offline
sta VCBs+VCB.DEV,x sta VCBs+VCB.DEV,x
rtrnerr tya error value. rtrnerr tya error value.
bcs olinerr1 branch if unable to read. bcs olinerr1 branch if unable to read.
volfound lda VCBs,x has it been logged in before? volfound lda VCBs,x has it been logged in before?
beq H349E if not. beq H349E if not.
lda VCBs+VCB.OFCNT,x it has, are there active files? lda VCBs+VCB.OFCNT,x it has, are there active files?
bne H34AA branch if volume is currently busy. bne H34AA branch if volume is currently busy.
H349E jsr logvcb1 go log it in. H349E jsr logvcb1 go log it in.

View File

@ -319,9 +319,9 @@ preproot jsr findvol search vcb's and dev's for spec'd volume
ldx vcbptr ldx vcbptr
inx inx
.2 lda VCBs+VCB.TBLK,x misc info includes .2 lda VCBs+VCB.TBLK,x misc info includes
sta h_tblk,y total # of blocks, sta h_tblk,y total # of blocks,
lda VCBs+VCB.BMAP,x the address of the 1st bitmap, lda VCBs+VCB.BMAP,x the address of the 1st bitmap,
sta h_bmap,y sta h_bmap,y
lda bloknml,y directory's disk address, lda bloknml,y directory's disk address,
sta d_head,y sta d_head,y
@ -361,13 +361,13 @@ L396F sty vnptr and save.
L3975 pha acc now used as vcb lookup index. L3975 pha acc now used as vcb lookup index.
tax index pointer to x. tax index pointer to x.
lda VCBs,x get vcb volume name length. lda VCBs,x get vcb volume name length.
bne L3987 branch if claimed vcb to be tested. bne L3987 branch if claimed vcb to be tested.
L397C ldy vnptr restore pointer to requested vol name. L397C ldy vnptr restore pointer to requested vol name.
pla now adj vcb index to next vcb entry. pla now adj vcb index to next vcb entry.
clc clc
adc #$20 adc #VCB
bcc L3975 branch if more vcb's to check bcc L3975 branch if more vcb's to check
bcs L39D4 otherwise go look for unlogged volumes. bcs L39D4 otherwise go look for unlogged volumes.
@ -405,7 +405,7 @@ L39AC tay if prefix then find ptr to prefixed
* verify volume name * verify volume name
L39C2 jsr XDOS.ReadGBuf read in directory (or prefix dir) L39C2 jsr XDOS.ReadGBuf read in directory (or prefix dir)
bcs L39CC if error then look on other devices. bcs L39CC if error then look on other devices.
jsr XDOS.CheckVolName compare dir name with path name. jsr XDOS.CheckVolName compare dir name with path name.
@ -448,7 +448,7 @@ L39FE sta devnum preserve device to be checked next.
lda VCBs,x lda VCBs,x
beq L3A16 if free vcb. beq L3A16 if free vcb.
lda VCBs+VCB.OFCNT,x is this volume active? lda VCBs+VCB.OFCNT,x is this volume active?
bne L39E2 if so, no need to re-log. bne L39E2 if so, no need to re-log.
L3A16 lda #$02 go read root dir into gbuf L3A16 lda #$02 go read root dir into gbuf
@ -478,7 +478,7 @@ fnddvcb lda #$00 look for vcb with this device#
ldy #$FF ldy #$FF
L3A40 tax new index to next vcb L3A40 tax new index to next vcb
lda VCBs+VCB.DEV,x check all devnums lda VCBs+VCB.DEV,x check all devnums
cmp devnum is this the vcb? cmp devnum is this the vcb?
bne L3A4E if not bne L3A4E if not
@ -486,7 +486,7 @@ L3A40 tax new index to next vcb
clc indicates found clc indicates found
rts rts
L3A4E lda VCBs,x is this a free vcb? L3A4E lda VCBs,x is this a free vcb?
bne L3A57 if not bne L3A57 if not
iny iny
@ -494,8 +494,8 @@ L3A4E lda VCBs,x is this a free vcb?
L3A57 txa L3A57 txa
clc inc index to next vcb clc inc index to next vcb
adc #$20 adc #VCB
bne L3A40 bcc L3A40
tya any free vcb's available? tya any free vcb's available?
bpl L3A79 yes bpl L3A79 yes
@ -503,20 +503,20 @@ L3A57 txa
lda #$00 look for an entry to kick out lda #$00 look for an entry to kick out
L3A62 tax L3A62 tax
lda VCBs+VCB.OFCNT,x any open files? lda VCBs+VCB.OFCNT,x any open files?
beq L3A70 no, kick this one out. beq L3A70 no, kick this one out.
txa next vcb txa next vcb
clc clc
adc #$20 (vcb entry size) adc #VCB
bne L3A62 bcc L3A62
lda #MLI.E.VCBFULL all vcb entries have open files lda #MLI.E.VCBFULL all vcb entries have open files
* sec * sec
rts rts
L3A70 stx vcbptr save entry index. L3A70 stx vcbptr save entry index.
stz VCBs,x free this entry stz VCBs,x free this entry
stz VCBs+VCB.DEV,x stz VCBs+VCB.DEV,x
L3A79 clc no error. L3A79 clc no error.
rts rts
@ -571,7 +571,7 @@ XDOS.CheckVolName.RTS
rts rts
*-------------------------------------- *--------------------------------------
logvcb ldx vcbptr previously logged in volume? logvcb ldx vcbptr previously logged in volume?
lda VCBs,x (acc = 0?) lda VCBs,x (acc = 0?)
beq logvcb1 no, go prepare vcb. beq logvcb1 no, go prepare vcb.
jsr cmpvcb does vcb match vol read? jsr cmpvcb does vcb match vol read?

View File

@ -873,8 +873,8 @@ L41A9 lda FCBs,y all bytes must match to say that it's
L41C1 tya calc position of next fcb. L41C1 tya calc position of next fcb.
and #$E0 first strip any possible index offsets. and #$E0 first strip any possible index offsets.
clc clc
adc #$20 inc to next fcb. adc #FCB inc to next fcb.
bne L4188 branch if more to compare. bcc L4188 branch if more to compare.
clc report no conflicts. clc report no conflicts.
rts rts

View File

@ -28,7 +28,7 @@ L4654 sta fcbptr save current low byte of pointer.
L4675 lda fcbptr inc pointer to next fcb L4675 lda fcbptr inc pointer to next fcb
clc clc
adc #$20 adc #FCB
bcc L4654 branch if within same page. bcc L4654 branch if within same page.
lda cferr on final close report logged errors. lda cferr on final close report logged errors.
@ -69,6 +69,7 @@ XDOS.Flush ldy #$01 flush all ?
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 #.
lda FCBs,y is this reference file open ? lda FCBs,y is this reference file open ?
@ -79,7 +80,7 @@ L46C3 sta fcbptr save current low byte of pointer.
L46D1 lda fcbptr inc pointer to next fcb. L46D1 lda fcbptr inc pointer to next fcb.
clc clc
adc #$20 adc #FCB
bcc L46C3 branch if within same page bcc L46C3 branch if within same page
L46D9 clc L46D9 clc
@ -450,35 +451,6 @@ XDOS.NewLine ldy #$02 adjust newline status for open file.
clc no error possible clc no error possible
rts rts
*-------------------------------------- *--------------------------------------
XDOS.GetFileInfoEx
jsr findfile see if file exists
bcc .1
cmp #MLI.E.INVPATH
sec
bne .9
.1 ldx #S.FIEX.BLKPTR+2-1
ldy #S.FIEX.BLKPTR+2-1+3
.2 lda d_stor,x
sta (A3L),y
dey
dex
bpl .2
ldx #7
ldy #S.FIEX.ACL+7+3
.3 lda h_acl,x
sta (A3L),y
dey
dex
bpl .3
clc
.9 rts
*--------------------------------------
XDOS.GetFileInfo XDOS.GetFileInfo
jsr findfile look for file. jsr findfile look for file.
bcc L4988 no error. bcc L4988 no error.
@ -534,47 +506,6 @@ L4994 lda inftabl-3,y
L49A4 rts L49A4 rts
*-------------------------------------- *--------------------------------------
XDOS.SetFileInfoEx
jsr findfile
bcs L49A4
ldx #S.FIEX.BLKPTR+2-1
ldy #S.FIEX.BLKPTR+2-1+3
.2 lda (A3L),y
sta d_stor,x
dey
dex
bpl .2
jmp drevise1
*--------------------------------------
XDOS.SetACL jsr findfile
bcs .9
lda d_stor
and #$F0
cmp #$D0
bne .99
jsr XDOS.ReadGBuf_d_frst
bcs .9
ldx #7
ldy #S.FIEX.ACL+7+3
.3 lda (A3L),y
sta gbuf+$14,x
dey
dex
bpl .3
jmp XDOS.WriteGBuf
.99 lda MLI.E.UNSUPST
sec
.9 rts
*--------------------------------------
XDOS.SetFileInfo XDOS.SetFileInfo
jsr findfile get the file to work on. jsr findfile get the file to work on.
bcs L49CF if error. bcs L49CF if error.
@ -611,6 +542,79 @@ L49D0 ldy #$0B
jmp drevise1 end by updating directory. jmp drevise1 end by updating directory.
L49D9 jmp drevise update with clock also... L49D9 jmp drevise update with clock also...
*-------------------------------------- *--------------------------------------
XDOS.SetFileInfoEx
jsr findfile
bcs L49A4
ldx #S.FIEX.BLKPTR+2-1
ldy #S.FIEX.BLKPTR+2-1+3
.2 lda (A3L),y
sta d_stor,x
dey
dex
bpl .2
jmp drevise1
*--------------------------------------
XDOS.GetFileInfoEx
jsr findfile see if file exists
bcc .1
cmp #MLI.E.INVPATH
sec
bne .9
.1 ldx #S.FIEX.BLKPTR+2-1
ldy #S.FIEX.BLKPTR+2-1+3
.2 lda d_stor,x
sta (A3L),y
dey
dex
bpl .2
ldx #7
ldy #S.FIEX.ACL+7+3
.3 lda h_acl,x
sta (A3L),y
dey
dex
bpl .3
clc
.9 rts
*--------------------------------------
XDOS.SetACL jsr findfile
bcs .9
lda d_stor
and #$F0
cmp #$D0
bne .99
jsr XDOS.ReadGBuf_d_frst
bcs .9
ldx #7
ldy #S.FIEX.ACL+7+3
.3 lda (A3L),y
sta gbuf+$14,x
dey
dex
bpl .3
jmp XDOS.WriteGBuf
.99 lda MLI.E.UNSUPST
sec
.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.

View File

@ -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 00 .HS D7
.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 FF .HS 02
.HS 020202 .HS 020202
XDOS.CmdFlags .HS A0A1A2 XDOS.CmdFlags .HS A0A1A2
@ -834,7 +834,7 @@ XDOS.CmdFlags .HS A0A1A2
.HS 2C2D .HS 2C2D
.HS 4E4F .HS 4E4F
.HS 50515253 .HS 50515253
.HS 949596 .HS 94959697
cmdtable .DA XDOS.Create cmdtable .DA XDOS.Create
.DA XDOS.Destroy .DA XDOS.Destroy
@ -864,6 +864,7 @@ cmdtable .DA XDOS.Create
.DA XDOS.SetFileInfoEx .DA XDOS.SetFileInfoEx
.DA XDOS.GetFileInfoEx .DA XDOS.GetFileInfoEx
.DA XDOS.SetACL .DA XDOS.SetACL
.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

@ -150,6 +150,7 @@ FCB.IBLK .EQ 14
FCB.EOF .EQ 21 3 bytes FCB.EOF .EQ 21 3 bytes
FCB.FLEVEL .EQ 27 FCB.FLEVEL .EQ 27
FCB.NLMASK .EQ 31 FCB.NLMASK .EQ 31
*
FCB .EQ 32 FCB .EQ 32
*-------------------------------------- *--------------------------------------
VCBs .EQ $D900 VCBs .EQ $D900
@ -158,10 +159,10 @@ VCB.OFCNT .EQ 17
VCB.BMAP .EQ 18 VCB.BMAP .EQ 18
VCB.TBLK .EQ 20 VCB.TBLK .EQ 20
VCB.FBLK .EQ 22 VCB.FBLK .EQ 22
VCB.ROOT .EQ 24 *VCB.ROOT .EQ 24
VCB.BMAPIDX .EQ 26 VCB.BMAPIDX .EQ 24
* *
VCB .EQ 27 VCB .EQ 32
*-------------------------------------- *--------------------------------------
bmbuf .EQ $DA00 512 byte bitmap buffer bmbuf .EQ $DA00 512 byte bitmap buffer
gbuf .EQ $DC00 general purpose 512 byte block buffer gbuf .EQ $DC00 general purpose 512 byte block buffer