mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-03 09:33:01 +00:00
Kernel 0.94
This commit is contained in:
parent
cfd16a2e66
commit
943d5a706a
Binary file not shown.
Binary file not shown.
@ -520,12 +520,15 @@ fndfcbuf lda FCBs+FCB.BUFID,y get page address of file buffer.
|
||||
inx
|
||||
inx index block always 2 pages after data
|
||||
stx zpt+1
|
||||
|
||||
lda FCBs+FCB.DEVID,y also set up device #
|
||||
sta devnum
|
||||
lda bufaddrl
|
||||
sta datptr index and data buffers always on
|
||||
sta zpt page boundaries.
|
||||
|
||||
lda #VCB0
|
||||
|
||||
fndfvol tax search for associated vcb
|
||||
lda VCBs+VCB.DEV,x
|
||||
cmp FCBs+FCB.DEVID,y is this vcb the same device?
|
||||
@ -603,33 +606,32 @@ H3459 phx save index to last item on list
|
||||
clc
|
||||
onlinerr rts
|
||||
*--------------------------------------
|
||||
online1 jsr fnddvcb see if it has already been logged in.
|
||||
online1 jsr XDOS.FindVCBForDevNum see if it has already been logged in.
|
||||
bcs olinerr1 branch if vcb is full.
|
||||
|
||||
lda #$02
|
||||
ldx #$00 read in root (volume) directory
|
||||
jsr XDOS.ReadGBufAX read ROOT VOL 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
|
||||
bne rtrnerr there are active files present.
|
||||
ldx vcbptr
|
||||
ldy VCBs+VCB.OFCNT,x don't take the vcb offline if
|
||||
bne olinerr1 there are active files present.
|
||||
|
||||
sta VCBs,x now take the volume offline
|
||||
sta VCBs+VCB.DEV,x
|
||||
stz VCBs,x now take the volume offline
|
||||
stz VCBs+VCB.DEV,x
|
||||
|
||||
rtrnerr tya error value.
|
||||
bcs olinerr1 branch if unable to read.
|
||||
bra olinerr1 branch if unable to read.
|
||||
|
||||
volfound .DO LOWERCASE=1
|
||||
lda gbuf+$23
|
||||
sta h_entln
|
||||
lda gbuf+$24
|
||||
sta h_maxent
|
||||
jsr XDOS.UnpackGBuf
|
||||
jsr XDOS.UnpackGBuf X trashed....
|
||||
.FIN
|
||||
|
||||
|
||||
ldx vcbptr
|
||||
lda VCBs,x has it been logged in before?
|
||||
beq H349E if not.
|
||||
|
||||
@ -1072,7 +1074,7 @@ ripple lda gbuf+4 test for 'root' directory because
|
||||
ldx gbuf+40
|
||||
|
||||
.DO LOWERCASE=1
|
||||
jsr XDOS.ReadGBufAX Dir
|
||||
jsr XDOS.ReadGBufAX no need to pak/unpak....will disturb zpt
|
||||
.ELSE
|
||||
jsr XDOS.ReadGBufAX read it
|
||||
.FIN
|
||||
@ -1093,7 +1095,7 @@ H3732 lda p8date,x
|
||||
bpl H3732
|
||||
|
||||
H373B .DO LOWERCASE=1
|
||||
jsr XDOS.WriteGBuf Dir
|
||||
jsr XDOS.WriteGBuf
|
||||
.ELSE
|
||||
jsr XDOS.WriteGBuf write updated entry back to disk.
|
||||
.FIN
|
||||
@ -1111,7 +1113,7 @@ H373B .DO LOWERCASE=1
|
||||
beq ripple they are the same, continue to root dir.
|
||||
|
||||
H3751 .DO LOWERCASE=1
|
||||
jsr XDOS.ReadGBufAX Dir
|
||||
jsr XDOS.ReadGBufAX
|
||||
.ELSE
|
||||
jsr XDOS.ReadGBufAX
|
||||
.FIN
|
||||
|
@ -363,6 +363,8 @@ findvol lda #$00
|
||||
L396F sty vnptr and save.
|
||||
sta devnum zero out dev# until vcb located.
|
||||
|
||||
lda #VCB0
|
||||
|
||||
L3975 pha acc now used as vcb lookup index.
|
||||
tax index pointer to x.
|
||||
lda VCBs,x get vcb volume name length.
|
||||
@ -373,6 +375,7 @@ L397C ldy vnptr restore pointer to requested vol name.
|
||||
clc
|
||||
adc #VCB
|
||||
bcc L3975 branch if more vcb's to check
|
||||
|
||||
bcs L39D4 otherwise go look for unlogged volumes.
|
||||
|
||||
L3987 sta namcnt save length of vol name to be compared.
|
||||
@ -454,16 +457,18 @@ L39F1 ldx DEVCNT now remove the device from the list
|
||||
|
||||
L39F4 cmp loklst,x of prospective devices.
|
||||
beq L39FE branch if match.
|
||||
|
||||
dex look until found.
|
||||
bpl L39F4 always taken (usually) unless
|
||||
bmi L39ED if dev was removed from devlst (/RAM).
|
||||
|
||||
L39FE sta devnum preserve device to be checked next.
|
||||
stz loklst,x mark this one as tested.
|
||||
jsr fnddvcb find vcb that claims this dev (if any).
|
||||
|
||||
jsr XDOS.FindVCBForDevNum find vcb that claims this dev (if any).
|
||||
bcs L3A29 branch if vcb full.
|
||||
ldx vcbptr did fndvcb find it or return free vcb?
|
||||
lda VCBs,x
|
||||
|
||||
lda VCBs,x did we find it or return free vcb?
|
||||
beq L3A16 if free vcb.
|
||||
|
||||
lda VCBs+VCB.OFCNT,x is this volume active?
|
||||
@ -496,51 +501,54 @@ L3A2D lda DEVLST,x active device list.
|
||||
ldx DEVCNT
|
||||
rts
|
||||
*--------------------------------------
|
||||
fnddvcb lda #$00 look for vcb with this device#
|
||||
XDOS.FindVCBForDevNum
|
||||
lda #VCB0 look for vcb for devnum
|
||||
ldy #$FF
|
||||
|
||||
L3A40 tax new index to next vcb
|
||||
.1 tax new index to next vcb
|
||||
lda VCBs+VCB.DEV,x check all devnums
|
||||
cmp devnum is this the vcb?
|
||||
bne L3A4E if not
|
||||
beq .7
|
||||
|
||||
stx vcbptr
|
||||
clc indicates found
|
||||
rts
|
||||
|
||||
L3A4E lda VCBs,x is this a free vcb?
|
||||
bne L3A57 if not
|
||||
lda VCBs,x is this a free vcb?
|
||||
bne .3 if not
|
||||
|
||||
iny
|
||||
stx vcbptr
|
||||
bne .3 already found a free one
|
||||
|
||||
stx vcbptr save first free VCB
|
||||
|
||||
L3A57 txa
|
||||
.3 txa
|
||||
clc inc index to next vcb
|
||||
adc #VCB
|
||||
bcc L3A40
|
||||
bcc .1
|
||||
|
||||
ldx vcbptr get found free if any
|
||||
|
||||
tya any free vcb's available?
|
||||
bpl L3A79 yes
|
||||
bpl .8 yes, exit withX = vcbptr
|
||||
|
||||
lda #$00 look for an entry to kick out
|
||||
lda #VCB0 look for an entry to kick out
|
||||
|
||||
L3A62 tax
|
||||
.4 tax
|
||||
lda VCBs+VCB.OFCNT,x any open files?
|
||||
beq L3A70 no, kick this one out.
|
||||
beq .5 no, kick this one out.
|
||||
|
||||
txa next vcb
|
||||
clc
|
||||
adc #VCB
|
||||
bcc L3A62
|
||||
bcc .4
|
||||
|
||||
lda #MLI.E.VCBFULL all vcb entries have open files
|
||||
* sec
|
||||
rts
|
||||
|
||||
L3A70 stx vcbptr save entry index.
|
||||
stz VCBs,x free this entry
|
||||
.5 stz VCBs,x free this entry
|
||||
stz VCBs+VCB.DEV,x
|
||||
L3A79 clc no error.
|
||||
|
||||
.7 stx vcbptr save entry index.
|
||||
|
||||
.8 clc no error.
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.CheckVolName
|
||||
@ -579,12 +587,12 @@ logvcb ldx vcbptr previously logged in volume?
|
||||
jsr cmpvcb does vcb match vol read?
|
||||
bcc XDOS.CheckVolName.RTS yes, do not disturb.
|
||||
|
||||
logvcb1 ldy #VCB-1 zero out vcb entry
|
||||
logvcb1 ldy #VCB zero out vcb entry
|
||||
|
||||
L3AB2 stz VCBs,x
|
||||
inx
|
||||
dey
|
||||
bpl L3AB2
|
||||
bne L3AB2
|
||||
|
||||
lda gbuf pointer to previous dir block
|
||||
ora gbuf+1 must be null
|
||||
@ -602,7 +610,8 @@ L3AB2 stz VCBs,x
|
||||
and #$0F strip root marker
|
||||
tay
|
||||
pha
|
||||
ora vcbptr
|
||||
* clc
|
||||
adc vcbptr
|
||||
tax
|
||||
|
||||
L3ACE lda gbuf+4,y
|
||||
@ -617,21 +626,6 @@ L3ACE lda gbuf+4,y
|
||||
lda devnum last device used.
|
||||
sta VCBs+VCB.DEV,x save device # and
|
||||
|
||||
* lda bloknml save address of root directory.
|
||||
* sta VCBs+VCB.ROOT,x
|
||||
* lda bloknml+1
|
||||
* sta VCBs+VCB.ROOT+1,x
|
||||
|
||||
* lda gbuf+39 save address of the 1st bitmap.
|
||||
* sta VCBs+VCB.BMAP,x
|
||||
* lda gbuf+40
|
||||
* sta VCBs+VCB.BMAP+1,x
|
||||
|
||||
* lda gbuf+41 total # of blocks on this unit.
|
||||
* sta VCBs+VCB.TBLK,x
|
||||
* lda gbuf+42
|
||||
* sta VCBs+VCB.TBLK+1,x
|
||||
|
||||
ldy #0
|
||||
|
||||
.1 lda gbuf+39,y
|
||||
@ -655,7 +649,8 @@ cmpvcb lda gbuf+4 with name in directory.
|
||||
bne L3B1E if not the same.
|
||||
|
||||
tay
|
||||
ora xvcbptr
|
||||
clc
|
||||
adc xvcbptr
|
||||
tax
|
||||
|
||||
L3B18 lda gbuf+4,y
|
||||
@ -673,7 +668,7 @@ L3B1E sec anticipate different names.
|
||||
L3B26 ldx xvcbptr offset to start of vcb (rev note #23)
|
||||
rts
|
||||
*--------------------------------------
|
||||
tstdupvol lda #$00 check for other logged in volumes with the same name.
|
||||
tstdupvol lda #VCB0 check for other logged in volumes with the same name.
|
||||
|
||||
L3B2C tax
|
||||
jsr cmpvcb
|
||||
|
@ -396,7 +396,7 @@ XDOS.Pack.Init lda #4
|
||||
sta zpt+1
|
||||
|
||||
ldx h_maxent
|
||||
beq *
|
||||
beq * DEBUG : should never happends
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.Pack.Next lda h_entln
|
||||
|
@ -49,14 +49,9 @@ close2 ldy fcbptr
|
||||
sta FCBs,y free fcb too
|
||||
lda FCBs+FCB.DEVID,y
|
||||
sta devnum go look for associated vcb
|
||||
jsr fnddvcb
|
||||
jsr XDOS.FindVCBForDevNum get vcb pointer.
|
||||
|
||||
ldx vcbptr get vcb pointer.
|
||||
dec VCBs+VCB.OFCNT,x indicate one less file open.
|
||||
* bne L46B4 branch if that wasn't the last...
|
||||
|
||||
* clc strip 'files open' bit
|
||||
* ror VCBs+VCB.OF,x
|
||||
|
||||
L46B4 clc
|
||||
rts
|
||||
|
@ -162,6 +162,8 @@ FCB.NLMASK .EQ 31
|
||||
FCB .EQ 32
|
||||
*--------------------------------------
|
||||
VCBs .EQ $D900
|
||||
* 6 free bytes
|
||||
VCB0 .EQ 06 range $D906-$DA00
|
||||
VCB.DEV .EQ 16
|
||||
VCB.OFCNT .EQ 17
|
||||
VCB.BMAP .EQ 18 2 bytes
|
||||
@ -169,8 +171,7 @@ VCB.TBLK .EQ 20 2 bytes
|
||||
VCB.FBLK .EQ 22 2 bytes
|
||||
VCB.BMAPIDX .EQ 24
|
||||
*
|
||||
*VCB .EQ 25
|
||||
VCB .EQ 32
|
||||
VCB .EQ 25
|
||||
*--------------------------------------
|
||||
bmbuf .EQ $DA00 512 byte bitmap buffer
|
||||
gbuf .EQ $DC00 general purpose 512 byte block buffer
|
||||
|
@ -404,16 +404,21 @@ RWDRV.START cld ProDOS will check that byte!!!
|
||||
ldy DRV.COMMAND 0 = Status ?
|
||||
beq RMDRV.CMDSTATUS
|
||||
cpy #3
|
||||
beq RWDRV.EXITOK 3 = Format : nothing to do, exit with no error
|
||||
bcs RWDRV.IOERR > 3 = Invalid OP, IO error
|
||||
|
||||
beq RWDRV.EXITOK 3 = Format : nothing to do, exit with no error
|
||||
* bcs RWDRV.IOERR > 3 = Invalid OP, IO error
|
||||
|
||||
RWDRV.IOERR lda #MLI.E.IO Carry already set
|
||||
rts
|
||||
|
||||
ldx DRV.BLKNUM
|
||||
cpx RWDRV.MAXLO+1
|
||||
lda DRV.BLKNUM+1
|
||||
sbc RWDRV.MAXHI+1
|
||||
bcs RWDRV.IOERR DRV.BLKNUM >= RW.DRV.SIZE, IO error
|
||||
|
||||
* bit RD80STORE save 80 Store status
|
||||
bit RD80STORE save 80 Store status
|
||||
|
||||
php Disable IRQ as no vector set in RW Banks
|
||||
sei
|
||||
|
||||
@ -468,14 +473,14 @@ RWDRV.RW.DST sta ($FF),y
|
||||
dec DRV.A2H
|
||||
bcc RWDRV.RW.LOOP
|
||||
|
||||
stz RWBankSelect
|
||||
RWDRV.EXIT stz RWBankSelect
|
||||
sta CLRREADAUX
|
||||
sta CLRWRITEAUX
|
||||
|
||||
plp restore IRQ
|
||||
|
||||
* bpl RMDRV.CMDSTATUS
|
||||
* sta SET80STORE
|
||||
bpl RMDRV.CMDSTATUS
|
||||
sta SET80STORE
|
||||
|
||||
RMDRV.CMDSTATUS
|
||||
RWDRV.MAXLO ldx #$FF return device block count in X,Y...
|
||||
@ -483,9 +488,6 @@ RWDRV.MAXHI ldy #$FF
|
||||
RWDRV.EXITOK lda #0 make A=0
|
||||
clc
|
||||
rts
|
||||
|
||||
RWDRV.IOERR lda #MLI.E.IO Carry already set
|
||||
rts
|
||||
*--------------------------------------
|
||||
* X=Page(0/1 or LC),A=Bank
|
||||
*--------------------------------------
|
||||
@ -506,12 +508,10 @@ RWDRV.GOAUX pha save BANK
|
||||
* returns : CC=WRITE, CS=READ
|
||||
sta CLRREADAUX CLRWRITEAUX already triggered by code copy
|
||||
jsr RWDRV.XM.RUN Now execute generated code in main memory
|
||||
sta SETREADAUX
|
||||
|
||||
jsr RWDRVX.RESTORE
|
||||
sta CLRREADAUX
|
||||
plp restore IRQ
|
||||
rts A & carry setup properly by RWDRVX.RESTORE
|
||||
sta SETREADAUX
|
||||
jmp RWDRVX.RESTORE
|
||||
|
||||
RWDRV.END .EP
|
||||
RWDRV.B.END
|
||||
.LIST ON
|
||||
@ -575,10 +575,7 @@ RWDRVX.RESTORE ldy #RWDRVX.XM.SIZE Now, restore begining of $300
|
||||
dey
|
||||
bne .1
|
||||
|
||||
tya setup A=0 and CC for exit with non error
|
||||
|
||||
clc
|
||||
rts
|
||||
jmp RWDRV.EXIT
|
||||
*--------------------------------------
|
||||
* "auXMove" Code, moved from Aux to main $300
|
||||
* $0200 -> $02FF TMP buffer for 2 steps moving between LCs
|
||||
|
Loading…
x
Reference in New Issue
Block a user