mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-10 02:36:59 +00:00
Kernel 0.93+
This commit is contained in:
parent
8814010151
commit
27817a2a79
BIN
.Floppies/A2OSX.BOOTlc.po
Normal file
BIN
.Floppies/A2OSX.BOOTlc.po
Normal file
Binary file not shown.
Binary file not shown.
@ -33,7 +33,7 @@ MLI.E.NOTPRODOS .EQ $52 Not a ProDOS disk
|
||||
MLI.E.INVPARAM .EQ $53 Invalid Parameter
|
||||
* .EQ $55 Too Many Volumes
|
||||
* .EQ $56 Bad Buffer Address
|
||||
* .EQ $57 Duplicate Volume
|
||||
MLI.E.DUPVOL .EQ $57 Duplicate Volume
|
||||
* .EQ $5A File Structure Damaged
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
@ -140,20 +140,25 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
||||
inc
|
||||
sta VolDirHdr.BMPtr
|
||||
>PULLW VolDirHdr.TB
|
||||
|
||||
ldx #3
|
||||
.1 lda DATELO,x
|
||||
sta VolDirHdr.CT,x
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
* Blk 0 : ProDOS Boot Code
|
||||
>LDYA L.ProDOS.Boot
|
||||
>STYA ZPPtr3
|
||||
|
||||
ldy #0
|
||||
ldx #2 2 pages
|
||||
|
||||
.2 lda (ZPPtr3),y
|
||||
sta (ZPPtr1),y
|
||||
iny
|
||||
bne .2
|
||||
|
||||
inc ZPPtr3+1
|
||||
inc ZPPtr1+1
|
||||
dex
|
||||
@ -174,16 +179,47 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
||||
ldx VolDirHdr.CatSize
|
||||
dex
|
||||
bne .30
|
||||
|
||||
txa
|
||||
|
||||
.30 sta VolDirHdr.next
|
||||
* stz VolDirHdr.next+1
|
||||
* stz VolDirHdr.VER
|
||||
* stz VolDirHdr.MVER
|
||||
|
||||
.3 lda (ZPPtr2),y
|
||||
beq .31
|
||||
beq .39
|
||||
|
||||
iny
|
||||
sta VolDirHdr.Name,y
|
||||
|
||||
cmp #'a'
|
||||
bcc .38
|
||||
cmp #'z'+1
|
||||
bcs .38
|
||||
|
||||
eor #$20
|
||||
|
||||
pha
|
||||
lda LC.BitMap,y
|
||||
cpy #8
|
||||
bcs .31
|
||||
|
||||
tsb VolDirHdr.VER
|
||||
bra .32
|
||||
|
||||
.31 tsb VolDirHdr.MVER
|
||||
|
||||
.32 lda #$80
|
||||
tsb VolDirHdr.VER
|
||||
|
||||
pla
|
||||
|
||||
.38 sta VolDirHdr.Name,y
|
||||
|
||||
cpy #15
|
||||
bne .3
|
||||
.31 tya
|
||||
|
||||
.39 tya
|
||||
* and #$0f make sure 15 bytes max
|
||||
ora #$F0 Volume Directory Header
|
||||
sta VolDirHdr.Name
|
||||
@ -207,19 +243,25 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
||||
phx
|
||||
plx
|
||||
bne .42
|
||||
|
||||
txa
|
||||
|
||||
.42 sta (ZPPtr1),y
|
||||
bra .41
|
||||
* BitMap Blocks : 0=Used 1=free
|
||||
|
||||
.40 jsr GetProDOSCatSize.I X=blk used for boot/dir/bitmap
|
||||
|
||||
lda VolDirHdr.TB
|
||||
eor #$ff
|
||||
sta Count
|
||||
|
||||
lda VolDirHdr.TB+1
|
||||
eor #$ff
|
||||
sta Count+1
|
||||
|
||||
ldy #0
|
||||
|
||||
.50 lda #%10000000
|
||||
.5 dex
|
||||
bmi .8
|
||||
@ -236,8 +278,12 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
||||
|
||||
.8 inc Count
|
||||
bne .81
|
||||
|
||||
inc Count+1
|
||||
beq .88
|
||||
bne .81
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.81 pha
|
||||
eor (ZPPtr1),y
|
||||
@ -245,12 +291,12 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
|
||||
pla
|
||||
lsr
|
||||
bne .8
|
||||
|
||||
iny
|
||||
bne .7
|
||||
|
||||
inc ZPPtr1+1
|
||||
bra .7
|
||||
.88 clc
|
||||
rts
|
||||
*/--------------------------------------
|
||||
*\--------------------------------------
|
||||
D2TrkRNIB
|
||||
@ -446,6 +492,8 @@ TrkWriter.Start lda D2ReadMode,x
|
||||
TrkWriter.Size .EQ *-TrkWriter.Start
|
||||
.EP
|
||||
*--------------------------------------
|
||||
LC.BitMap .HS 80402010080402018040201008040201
|
||||
*--------------------------------------
|
||||
ProDOS.Boot .HS 01.38.b0.03.4c.32.a1.86.43.c9.03.08.8a.29.70.4a
|
||||
.HS 4a.4a.4a.09.c0.85.49.a0.ff.84.48.28.c8.b1.48.d0
|
||||
.HS 3a.b0.0e.a9.03.8d.00.08.e6.3d.a5.49.48.a9.5b.48
|
||||
@ -487,7 +535,9 @@ VolDirHdr.Next .BS 2 pointer to next block
|
||||
VolDirHdr.Name .BS 16
|
||||
.HS 00.00.00.00.00.00.00.00
|
||||
VolDirHdr.CT .BS 4 Creation time
|
||||
.HS 01.00.C3.27.0D version/min version/access/EL/EPB
|
||||
VolDirHdr.VER .BS 1
|
||||
VolDirHdr.MVER .BS 1
|
||||
.HS C3.27.0D access/EL/EPB
|
||||
.DA 0 File Count=0 (only VDH)
|
||||
VolDirHdr.BMPtr .BS 2 bitmap pointer (Block 2..n are Volume directory)
|
||||
VolDirHdr.TB .BS 2 Total Blocks
|
||||
|
@ -610,6 +610,7 @@ online1 jsr fnddvcb see if it has already been logged in.
|
||||
|
||||
sta vcbbuf,x now take the volume offline
|
||||
sta vcbbuf+16,x
|
||||
|
||||
rtrnerr tya error value.
|
||||
bcs olinerr1 branch if unable to read.
|
||||
|
||||
@ -622,13 +623,13 @@ volfound lda vcbbuf,x has it been logged in before?
|
||||
H349E jsr logvcb1 go log it in.
|
||||
bcs olinerr1 branch if there is a problem.
|
||||
|
||||
lda #$57 anticipate a duplicate active volume
|
||||
lda #MLI.E.DUPVOL anticipate a duplicate active volume
|
||||
bit duplflag exits.
|
||||
bmi olinerr1 branch if so.
|
||||
|
||||
H34AA ldx vcbptr
|
||||
jsr cmpvcb does vol read compare with logged vol?
|
||||
lda #$2E anticipate wrong volume mounted.
|
||||
lda #MLI.E.DSKSWIT anticipate wrong volume mounted.
|
||||
bcc H34D0 branch if ok.
|
||||
|
||||
olinerr1 pha save error code.
|
||||
@ -636,7 +637,7 @@ olinerr1 pha save error code.
|
||||
pla error code.
|
||||
iny tell what error was encountered.
|
||||
sta (usrbuf),y
|
||||
cmp #$57 duplicate volume error?
|
||||
cmp #MLI.E.DUPVOL duplicate volume error?
|
||||
bne H34CE no.
|
||||
|
||||
iny report which other device has same name
|
||||
@ -644,7 +645,8 @@ olinerr1 pha save error code.
|
||||
lda vcbbuf+16,x
|
||||
sta (usrbuf),y
|
||||
stz duplflag clear duplicate flag.
|
||||
lda #$57 duplicate volume error code.
|
||||
|
||||
lda #MLI.E.DUPVOL duplicate volume error code.
|
||||
|
||||
H34CE sec flag error
|
||||
rts
|
||||
|
@ -78,10 +78,13 @@ fnderr sec
|
||||
L37EB sta entcntl keep a running count.
|
||||
lda /gbuf reset indirect pointer
|
||||
sta zpt+1
|
||||
|
||||
lda gbuf+2 get link to next dir block
|
||||
bne L37FC (if there is one).
|
||||
|
||||
cmp gbuf+3 are both zero, i.e. no link? if so,
|
||||
beq errdir then not all entries were acct'd for.
|
||||
|
||||
L37FC ldx gbuf+3 acc has value for block# (low).
|
||||
jsr rdblk go read the next linked directory.
|
||||
bcc L37C9 if no error.
|
||||
@ -102,13 +105,13 @@ L3814 sta d_entblk
|
||||
sta nofree
|
||||
|
||||
fnf0 jsr nxtpnam1 'file not found' or 'path not found'?
|
||||
errpath1 sec if non-zero then 'path not found'
|
||||
beq fnf1
|
||||
errpath1 beq .1 if non-zero then 'path not found'
|
||||
|
||||
lda #MLI.E.PNOTFND path not found
|
||||
rts
|
||||
.HS 2C BIT ABS
|
||||
|
||||
fnf1 lda #MLI.E.FNOTFND file not found
|
||||
.1 lda #MLI.E.FNOTFND file not found
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
namfound jsr nxtpname adj index to next name in path.
|
||||
@ -140,6 +143,7 @@ namfound jsr nxtpname adj index to next name in path.
|
||||
* Check if $75 at VOL/DIR entry + $14
|
||||
* (8 bytes reserved)
|
||||
*--------------------------------------
|
||||
.DO LOWERCASE=0
|
||||
lda gbuf+20 make sure password is disabled
|
||||
|
||||
ldx #$00
|
||||
@ -157,6 +161,7 @@ L386C asl
|
||||
lda #MLI.E.INCFF directory is not compatible
|
||||
sec
|
||||
rts
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
movhead jsr movhed0 move directory info.
|
||||
jmp lookfil0 do next local pathname.
|
||||
@ -539,6 +544,7 @@ L3A95 cmp pathbuf,y
|
||||
bpl L3A92 if more to compare.
|
||||
|
||||
clc match found
|
||||
XDOS.CheckVolName.RTS
|
||||
rts
|
||||
*--------------------------------------
|
||||
logvcb ldx vcbptr previously logged in volume?
|
||||
@ -546,7 +552,7 @@ logvcb ldx vcbptr previously logged in volume?
|
||||
beq logvcb1 no, go prepare vcb.
|
||||
|
||||
jsr cmpvcb does vcb match vol read?
|
||||
bcc L3B05 yes, do not disturb.
|
||||
bcc XDOS.CheckVolName.RTS yes, do not disturb.
|
||||
|
||||
logvcb1 ldy #$1F zero out vcb entry
|
||||
|
||||
@ -556,7 +562,7 @@ L3AB2 stz vcbbuf,x
|
||||
bpl L3AB2
|
||||
|
||||
jsr tstsos make sure it's an xdos disk
|
||||
bcs L3B05 if not, return carry set.
|
||||
bcs XDOS.CheckVolName.RTS if not, return carry set.
|
||||
|
||||
jsr tstdupvol does a duplicate with open files
|
||||
bcs L3B04 already exist? branch if yes.
|
||||
@ -568,7 +574,11 @@ L3AB2 stz vcbbuf,x
|
||||
ora vcbptr
|
||||
tax
|
||||
|
||||
L3ACE lda gbuf+4,y
|
||||
L3ACE .DO LOWERCASE=1
|
||||
jsr XDOS.GetVolNameCharGBufY
|
||||
.ELSE
|
||||
lda gbuf+4,y
|
||||
.FIN
|
||||
sta vcbbuf,x
|
||||
dex
|
||||
dey
|
||||
@ -576,6 +586,7 @@ L3ACE lda gbuf+4,y
|
||||
|
||||
pla get length again
|
||||
sta vcbbuf,x and save.
|
||||
|
||||
lda devnum last device used.
|
||||
sta vcbbuf+16,x save device # and
|
||||
lda gbuf+41 total # of blocks on this unit.
|
||||
@ -592,27 +603,62 @@ L3ACE lda gbuf+4,y
|
||||
sta vcbbuf+27,x
|
||||
|
||||
L3B04 clc indicate logged if possible
|
||||
L3B05 rts
|
||||
rts
|
||||
*--------------------------------------
|
||||
cmpvcb lda gbuf+4 with name in directory.
|
||||
and #$0F
|
||||
cmp vcbbuf,x are they the same length?
|
||||
stx xvcbptr (see rev note #23)
|
||||
bne L3B1E if not the same.
|
||||
|
||||
tay
|
||||
ora xvcbptr
|
||||
tax
|
||||
L3B18 lda gbuf+4,y
|
||||
|
||||
L3B18 .DO LOWERCASE=1
|
||||
jsr XDOS.GetVolNameCharGBufY
|
||||
.ELSE
|
||||
lda gbuf+4,y
|
||||
.FIN
|
||||
|
||||
cmp vcbbuf,x
|
||||
|
||||
L3B1E sec anticipate different names.
|
||||
bne L3B26 if not the same.
|
||||
|
||||
dex
|
||||
dey
|
||||
bne L3B18
|
||||
|
||||
clc indicate match.
|
||||
|
||||
L3B26 ldx xvcbptr offset to start of vcb (rev note #23)
|
||||
rts
|
||||
*--------------------------------------
|
||||
.DO LOWERCASE=1
|
||||
XDOS.GetVolNameCharGBufY
|
||||
bit gbuf+$20 VERSION
|
||||
bpl .8
|
||||
|
||||
cpy #8
|
||||
bcs .2
|
||||
|
||||
lda whichbit,y
|
||||
bit gbuf+$20
|
||||
beq .8
|
||||
bra .7
|
||||
|
||||
.2 lda whichbit-8,y
|
||||
bit gbuf+$21
|
||||
beq .8
|
||||
|
||||
.7 lda gbuf+4,y
|
||||
jmp XDOS.ToLower
|
||||
|
||||
.8 lda gbuf+4,y
|
||||
rts
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
tstdupvol lda #$00 check for other logged in volumes with the same name.
|
||||
L3B2C tax
|
||||
jsr cmpvcb
|
||||
@ -635,7 +681,7 @@ L3B4B sta duplflag duplicate has been found.
|
||||
stx vcbentry save pointer to conflicting vcb.
|
||||
sec error.
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
tstfrblk ldx vcbptr test if enough free blocks available for request.
|
||||
lda vcbbuf+21,x check if proper count for this volume.
|
||||
ora vcbbuf+20,x
|
||||
|
@ -583,6 +583,7 @@ XDOS.IsValidFirstChar.SEC
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
.DO LOWERCASE=1
|
||||
*XDOS.ToUpper cmp #'a'
|
||||
* bcc .8
|
||||
* cmp #'z'+1
|
||||
@ -596,6 +597,7 @@ XDOS.ToLower cmp #'A'
|
||||
bcs .8
|
||||
eor #$20
|
||||
.8 rts
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
* move 3 pages of dispatcher from 'displc2' to 'dispadr'
|
||||
* this move routine must be resident above $E000 at all times
|
||||
|
Loading…
x
Reference in New Issue
Block a user