Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!att!drutx!druwy!dlm
From: dlm@druwy.ATT.COM (Dan Moore)
Newsgroups: comp.sys.atari.st
Subject: Re: Programming Hard Drive access?
Message-ID: <4354@druwy.ATT.COM>
Date: 26 Sep 89 15:10:08 GMT
References: <3867@helios.ee.lbl.gov>
Organization: AT&T, Denver, CO
Lines: 38

in article <3867@helios.ee.lbl.gov>, antony@lbl-csam.arpa (Antony A. Courtney)
says:
> I appologize.  I hadn't worded my aritcle correctly at all.  What I really want
> to know is how I can write sector level access routines which call things like
> Rwabs() to access files.  How can I find out the mapping of files->sectors. I
> assume this is an intrinisic part of the directory structure, unfortunatley I
> can not seem to find anything describing how this works.  A piece of sample
> code which uses rwabs() to access a file would be nice.  A description of this
> would also be nice.  And if nothing else, a pointer to a reference which
> describes this would also be appreciated.

	Books on MSDOS which cover the filesystem (GEMDOS is modeled
after MSDOS):

	Programmer's Guide to the IBM PC -- Peter Norton, Microsoft Press

	Advanced MSDOS -- Ray Duncan, Microsfot Press

	Microsoft MSDOS Reference Manual (also available from IBM)


	Most good bookstores should have the first two books, good
computer stores should carry the last (check IBM dealers).  All cover
the logical layout of the MSDOS filesystem, GEMDOS is almost 100%
compatible (GEMDOS ignores some fields that MSDOS cares about).

	You also might want to check out the back issues of STLog
magazine, Dave Small and I had an article on CHK in it about 18 months
ago.  CHK is a GEMDOS/MSDOS filesystem tester, it includes code to do
logical (ie. file level) to physical (ie. sector level) translations. 
The C source and binary were on the disk included with the magazine.



				Dan Moore
				AT&T Bell Labs
				Denver
				dlm@druwy.ATT.COM