floppy disk questions

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

floppy disk questions

Post by VolTeK »

question 1
getting the information of the inserted floppy disk

i want to determine not what kind of file system if on the floppy but how big, say 360 kb or a regular 1.44kb disk, how can i determine the size of the disk? would it be by loading the booloader into memory and gathering data from it?

question 2

the bios floppy disk int read functions asks how many sectors to read off the disk, if i wanted to read 5 sectors off the disk but instead of telling it to read 5 sectors, to tell it to read 1 sector and call the function 5 times, wud that wear on the floppy disk drive?
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: floppy disk questions

Post by qw »

Answer 1: Int 13/AH=08h. Reading the first block is useful only if you can rely on the file system. For example, a BPB is FAT-specific.

Answer 2: I'd choose to read one block at a time. If the five blocks are on different tracks, the read will most likely fail. You may implement a track buffer to speed up things.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: floppy disk questions

Post by VolTeK »

thank u so very much. i had a feeling using the "read one sector at a time" idea wud wear n tear on floppy drives. but now that its considered, it wud seem safe, thank u. now i can continue with my work. and thank u again with question one, its good because just in case of the fact that a person could put a disk that is 360kb and u cant read it if your file system driver only suits the standard 1.44kb, but i want it to be uninversal and read "all" fat12 disks just in case ;)

but i talk to much, all in all, i say thank u so much. my project was at a stop untill my question was answered
Post Reply