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.
clc
adc #$20
adc #VCB
bcc fndfvol loop until volume found.
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
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.
bcc volfound branch if read was ok.
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.
sta VCBs,x now take the volume offline
sta VCBs,x now take the volume offline
sta VCBs+VCB.DEV,x
rtrnerr tya error value.
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.
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.
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
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,
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
lda bloknml,y directory's disk address,
sta d_head,y
@ -361,13 +361,13 @@ L396F sty vnptr and save.
L3975 pha acc now used as vcb lookup index.
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.
L397C ldy vnptr restore pointer to requested vol name.
pla now adj vcb index to next vcb entry.
clc
adc #$20
adc #VCB
bcc L3975 branch if more vcb's to check
bcs L39D4 otherwise go look for unlogged volumes.
@ -405,7 +405,7 @@ L39AC tay if prefix then find ptr to prefixed
* 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.
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
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.
L3A16 lda #$02 go read root dir into gbuf
@ -478,7 +478,7 @@ fnddvcb lda #$00 look for vcb with this device#
ldy #$FF
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?
bne L3A4E if not
@ -486,7 +486,7 @@ L3A40 tax new index to next vcb
clc indicates found
rts
L3A4E lda VCBs,x is this a free vcb?
L3A4E lda VCBs,x is this a free vcb?
bne L3A57 if not
iny
@ -494,8 +494,8 @@ L3A4E lda VCBs,x is this a free vcb?
L3A57 txa
clc inc index to next vcb
adc #$20
bne L3A40
adc #VCB
bcc L3A40
tya any free vcb's available?
bpl L3A79 yes
@ -503,20 +503,20 @@ L3A57 txa
lda #$00 look for an entry to kick out
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.
txa next vcb
clc
adc #$20 (vcb entry size)
bne L3A62
adc #VCB
bcc L3A62
lda #MLI.E.VCBFULL all vcb entries have open files
* sec
rts
L3A70 stx vcbptr save entry index.
stz VCBs,x free this entry
stz VCBs,x free this entry
stz VCBs+VCB.DEV,x
L3A79 clc no error.
rts
@ -571,7 +571,7 @@ XDOS.CheckVolName.RTS
rts
*--------------------------------------
logvcb ldx vcbptr previously logged in volume?
lda VCBs,x (acc = 0?)
lda VCBs,x (acc = 0?)
beq logvcb1 no, go prepare vcb.
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.
and #$E0 first strip any possible index offsets.
clc
adc #$20 inc to next fcb.
bne L4188 branch if more to compare.
adc #FCB inc to next fcb.
bcc L4188 branch if more to compare.
clc report no conflicts.
rts

View File

@ -28,7 +28,7 @@ L4654 sta fcbptr save current low byte of pointer.
L4675 lda fcbptr inc pointer to next fcb
clc
adc #$20
adc #FCB
bcc L4654 branch if within same page.
lda cferr on final close report logged errors.
@ -69,6 +69,7 @@ XDOS.Flush ldy #$01 flush all ?
sta cferr clear global flush error.
lda #$00 start at the beginning.
L46C3 sta fcbptr save current low byte of pointer.
tay index to ref #.
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.
clc
adc #$20
adc #FCB
bcc L46C3 branch if within same page
L46D9 clc
@ -450,35 +451,6 @@ XDOS.NewLine ldy #$02 adjust newline status for open file.
clc no error possible
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
jsr findfile look for file.
bcc L4988 no error.
@ -534,47 +506,6 @@ L4994 lda inftabl-3,y
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
jsr findfile get the file to work on.
bcs L49CF if error.
@ -611,6 +542,79 @@ L49D0 ldy #$0B
jmp drevise1 end by updating directory.
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.
bcc XDOS.RenameFileDir if found.

View File

@ -816,7 +816,7 @@ XDOS.CmdNums .HS D3D4D5D6 table of valid mli command numbers.
.HS 808182
.HS 65
.HS C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF
.HS 00
.HS D7
.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 FF
.HS 02
.HS 020202
XDOS.CmdFlags .HS A0A1A2
@ -834,7 +834,7 @@ XDOS.CmdFlags .HS A0A1A2
.HS 2C2D
.HS 4E4F
.HS 50515253
.HS 949596
.HS 94959697
cmdtable .DA XDOS.Create
.DA XDOS.Destroy
@ -864,6 +864,7 @@ cmdtable .DA XDOS.Create
.DA XDOS.SetFileInfoEx
.DA XDOS.GetFileInfoEx
.DA XDOS.SetACL
.DA XDOS.GetACL
dinctbl .HS 0100000200 table to increment directory usage/eof counts
.DO LOWERCASE=1

View File

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