home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!deakin.OZ.AU!cs.uow.edu.au!david
- From: david@cs.uow.edu.au (David E A Wilson)
- Newsgroups: comp.sys.apple2
- Subject: Re: How many files in a ProDOS directory ?
- Message-ID: <1992Aug15.025209.14064@cs.uow.edu.au>
- Date: 15 Aug 92 02:52:09 GMT
- References: <1992Aug8.140049.17236@unlv.edu> <56394@mentor.cc.purdue.edu> <1992Aug10.060546.2276@blkbox> <71207@apple.Apple.COM>
- Organization: Dept of Computer Science, Wollongong University, Australia
- Lines: 41
-
- dlyons@Apple.COM (David A Lyons) writes:
- >Yes, you're correct. You can never do anything useful with block $FFFF on
- >a ProDOS disk, because there's no way in the 16-bit value in block 2 to say
- >that there are $10000 blocks available.
-
- This could be a problem for ProDOS 8 v2.0.1. If I have a smartport device
- exactly 65536 blocks in size and it is drive 3 on the smartport chain (and
- I am assuming not in slot 5 [otherwise it would have to be drive 5 or more])
- then ProDOS 8 v2.0.1 will use the Smartport status routine which can return
- $010000 as the number of blocks. ProDOS will ignore the top byte and say that
- the drive is a 0 block device.
-
- If this same device was instead 48 MB, ProDOS 8 v2.0.1 would say it was 16 MB.
-
- The code in question is:
-
- fd47 jsr $0000
- fd4a dcb $00
- fd4b dcw $fd8d
- fd4d bcs $fd6e
- fd4f ldx $fd4a ; get command just performed
- fd52 bne $fd6e ; not status so done
- fd54 ldx $d6ed ; get low byte of volume size
- fd57 ldy $d6ee ; get middle byte of volume size
- fd5a lda $d6ec ; get status
- fd5d bit #$10 ; online?
- fd5f bne $fd65 ; yes - check write prot
- fd61 lda #$2f ; OFFLINE
- fd63 bra $fd6d
- fd65 and #$44 ; get device & media write protect
- fd67 eor #$40
- fd69 beq $fd6e
- fd6b lda #$2b ; WRITE PROTECTED
- fd6d sec
- fd6e rts
-
- The top byte of the volume size ($d6ef) is never checked. In my opinion,
- if the top byte is non zero the status call should return $ffff as the size.
- --
- David Wilson (042) 21 3802 voice, (042) 21 3262 fax
- Dept Comp Sci, Uni of Wollongong david@cs.uow.edu.au
-