delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/07/30/07:00:06

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Trace-PostClient-IP: 68.147.131.211
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT Invalid>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Read by sector or Read by track more efficient?
Organization: Systematic Software
Message-ID: <kk7kg0hknf2d34ao9bjh54g85p0vmcsqj3@4ax.com>
References: <354933d6 DOT 0407292314 DOT b48ea86 AT posting DOT google DOT com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Lines: 33
Date: Fri, 30 Jul 2004 10:58:47 GMT
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse AT shaw DOT ca
X-Trace: pd7tw3no 1091185127 24.71.223.147 (Fri, 30 Jul 2004 04:58:47 MDT)
NNTP-Posting-Date: Fri, 30 Jul 2004 04:58:47 MDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 30 Jul 2004 00:14:39 -0700 in comp.os.msdos.djgpp,
gohyongkwang AT hotmail DOT com (Goh, Yong Kwang) wrote:

>Hi. I'm currently using _bios_disk function in a simple program to
>explore raw floppy disk content.
>
>To read an entire floppy disk, afaik, there's two way when calling the
>_bios_disk function.
>
>Method 1 is to read the entire track in a single call by specifying
>the number of sectors to read as the number of sectors per track and
>to loop thru all the tracks for an entire disk. Drawback is that it's
>impossible to identify which sector of the track is bad/unreadable
>when the function call fails.
>
>Method 2 is more fine-grained by having an additional loop that loops
>thru all the sector in a track one-by-one, reading in 1 sector per
>function call. Appears to be slower but allows the program to identify
>which specific sector is bad/unreadable.

See other post for speed comparison. 
When you get a diskette error, you have to reset/recalibrate the drive
to clear it, so you might as well read full tracks for speed, then if
you get an error, reset/recalibrate, then reread the track by sector
to identify the failing sector, reset/recalibrate, try a couple more
times to make sure, finish reading the track by sector, then switch
back to full track reads. 

-- 
Thanks. Take care, Brian Inglis 	Calgary, Alberta, Canada

Brian DOT Inglis AT CSi DOT com 	(Brian dot Inglis at SystematicSw dot ab dot ca)
    fake address		use address above to reply

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019