From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,c72b93d85d765332 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-10 10:24:20 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-FFM2.ecrc.net!news.siemens.de!news.mch.sbs.de!not-for-mail From: Alfred Hilscher Newsgroups: comp.lang.ada Subject: Re: Ada and Hardware Date: Thu, 10 May 2001 19:24:23 +0200 Organization: Siemens AG Message-ID: <3AFACEC7.C2E67357@icn.siemens.de> References: NNTP-Posting-Host: 139.21.122.158 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en Xref: newsfeed.google.com comp.lang.ada:7491 Date: 2001-05-10T19:24:23+02:00 List-Id: Maybe the Windows API calls "CreateFile" and "DeviceIOControl" will be what you are looking for ? Look for this excerpt from MS-API dokumentation. "You can use the CreateFile function to open a disk drive or a partition on a disk drive. The function returns a handle to the disk device; that handle can be used with the DeviceIOControl function. The following requirements must be met in order for such a call to succeed: � The caller must have administrative privileges for the operation to succeed on a hard disk drive. � The lpFileName string should be of the form \\.\PHYSICALDRIVEx to open the hard disk x. Hard disk numbers start at zero. For example: String Meaning \\.\PHYSICALDRIVE2 Obtains a handle to the third physical drive on the user's computer. � The lpFileName string should be \\.\x: to open a floppy drive x or a partition x on a hard disk. For example: String Meaning \\.\A: Obtains a handle to drive A on the user's computer. \\.\C: Obtains a handle to drive C on the user's computer." "chris.danx" wrote: > > Hello folks, > I'm implementing a program which reads files on a floppy disk which are not > stored via the fat12 file system. I know this is the most popular format but i > want a simple contigouous fs for the purposes of booting an OS. > > I'm implementing basic routines for the management of the fs at the moment but > i've been planning ahead and i've encountered a problem. It is necessary to > access the disk and write the fs to it. I was wondering if anyone knew of any > Ada packages or techniques for accessing the disk in such a raw manner? I need > a way to write and read via blocks, sectors, tracks etc on the floppy. I'm > developing on windows 98 via GNAT. > > Thanks, > Chris Campbell