Article View: comp.os.msdos.programmer
Article #3232Re: Turbo-C 2.0 absread() / abswrite()
From: L. Scott Emmons
Date: Fri, 30 Nov 1990 17:18
Date: Fri, 30 Nov 1990 17:18
35 lines
2542 bytes
2542 bytes
In article <1990Nov30.141911.5076@maytag.waterloo.edu> dmurdoch@watstat.waterloo.edu (Duncan Murdoch) writes:
>According to my manual, absread uses the DOS absolute read service. As
>far as that service is concerned, disks don't have sides: they're just
>a bunch of sectors, running from 0 to 719 on a standard 360K disk. If
>you can read sectors 0 to 359, you're reading both sides of the disk, tracks
>0 to 19. You seem to be having trouble reading tracks 20 to 39, which
>is a completely different problem.
I thought of this (reading a sector reads from both sides of a disk
[i.e. a cylinder]), however calling absread with a 1K buffer (i.e. two
sectors) didn't result in reading both sides of the disk. As it is an
absolute read/write, it should _not_ know enough to read a track from
side 2 after reading a track from side 1 (because to do that it would have
to know the topological format of the disk, which it would get off the
boot sector (or fat...wherever it is); but, this can't be since abs
read/write should be independent of disk topology. Or, it could start
with side 2 after reaching the end of side 1 (could be done w/o regard
for topology), or (as you suggest and I tried) it could read full
cylinders (problem with buffer size, though, as this is device
dependant [i.e. the same routine would work only for devices with the same
number of heads]).
>I'd suspect your problem is somewhere else. Perhaps something has happened to
>the boot sector of your disk, so DOS thinks it's single sided?
It can't be this, because I am using diskettes with raw data (no boot sector,
no fat: nothing but raw data); without regard to _ANY_ format, beyond a disk
"oriented by cylinders, with 40 tracks, 2 sides, and 9 sectors per track".
Thanks for your response,
Scott
L. Scott Emmons
---------------
emmonsl@csus.edu <or> ...[ucbvax]!ucdavis!csusac!athena!emmonsl
Packet: kc6nfp@kg6xx.#nocal.ca.usa.na
Technical Details
Message-ID:
<1990Nov30.171831.25498@csusac.csus.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!wuarchive!csus.edu!ucdavis!csusac!usenetReferences:
<1990Nov30.071240.8847@csusac.csus.edu> <1990Nov30.141911.5076@maytag.waterloo.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!wuarchive!csus.edu!ucdavis!csusac!usenet From: emmonsl@athena.ecs.csus.edu (L. Scott Emmons) Newsgroups: comp.os.msdos.programmer Subject: Re: Turbo-C 2.0 absread() / abswrite() Message-ID: <1990Nov30.171831.25498@csusac.csus.edu> Date: 30 Nov 90 17:18:31 GMT References: <1990Nov30.071240.8847@csusac.csus.edu> <1990Nov30.141911.5076@maytag.waterloo.edu> Reply-To: emmonsl@athena.ecs.csus.edu.UUCP (L. Scott Emmons) Organization: California State University, Sacramento Lines: 35