flat assembler
Message board for the users of flat assembler.

Index > OS Construction > floppy disk wear n tear

Author
Thread Post new topic Reply to topic
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp 04 Jan 2010, 07:49
i know, im getting very annoying posting thousands of questions, well i think i am. but the bios int 13h says i can load multiple sectors, say

one way of doing it: ;loads 5 sectors at once
load 5 sectors
ret


or

another way of doing it: ;loads a sector at a time, 5 times
load one sector
cmp register, 5
je done
sub register,1
jmp another way of doing it



would function #2 wear on the floppy disk drive?

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 04 Jan 2010, 07:49
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4336
Location: Now
edfed 04 Jan 2010, 17:35
3 times is enough.

1 sector at a time, 3 retries (if cf set or reset (don't remember exact value)

i tested many possibilities with bios. the only who always works is that one.

then, do that:

Code:
mov eax,LBA ; do LBA addressing for simplicity
LOOP:
dec [count]
jl .end
call read
inc eax
/LOOP
.end:

read:
call lba2bioschs
int13h
jc .end
int13h
jc .end
int 13h
jc .end
.error:
.end:
/read
    
Post 04 Jan 2010, 17:35
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 04 Jan 2010, 21:54
I always use one sector at a time and have the same test PC and floppy drives for over 5 years, with no problems with wear etc.
Post 04 Jan 2010, 21:54
View user's profile Send private message Reply with quote
GhostXoPCorp



Joined: 13 Dec 2008
Posts: 199
Location: 01F0:0100
GhostXoPCorp 04 Jan 2010, 21:55
thanks

_________________
Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me.
Post 04 Jan 2010, 21:55
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 04 Jan 2010, 23:30
Have you ever run out of retries?
Post 04 Jan 2010, 23:30
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 04 Jan 2010, 23:39
It happens with dead/dying disks with bad sectors.
The FDC can be quite "stubborn", but 3 retries should be good.
Post 04 Jan 2010, 23:39
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.