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-7-bit X-Google-Thread: 103376,c72b93d85d765332 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-13 17:19:08 PST Path: archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!chnws02.mediaone.net!chnws06.ne.mediaone.net!24.91.0.34!typhoon.ne.mediaone.net.POSTED!not-for-mail From: "Jeff Creem" Newsgroups: comp.lang.ada References: Subject: Re: Ada and Hardware X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Mon, 14 May 2001 00:18:31 GMT NNTP-Posting-Host: 24.147.67.93 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.ne.mediaone.net 989799511 24.147.67.93 (Sun, 13 May 2001 20:18:31 EDT) NNTP-Posting-Date: Sun, 13 May 2001 20:18:31 EDT Organization: Road Runner Xref: archiver1.sj.google.com comp.lang.ada:7470 Date: 2001-05-14T00:18:31+00:00 List-Id: When this thread first started, I and several others tried to point out that this was not the best group since you are not really asking how to do something in Ada but are asking how to do something in windows.. Many of us tried to help but since we are not all win32 gurus we probably thew you some curve balls... So lets try this and try to set things straight (mainly for people who revisit this thread someday in deja (ok make that google) 1) The first assertion was that the poster knew how to do this in C so could we help in Ada. After following the thread a little and reading a little I assert that the poster (and I am not trying to flame here at all) did not know how to "do it" in C. The poster DID know how to make a particular BIOS call with a particular C compiler however that call IS NOT available to a win32 (32 bit) C compiler. It is available on 16 bit compilers or for compilers producing 16 bit executables. 2) An early post recommended opening the disk device with a name like \\.\A: which would be correct for a win32 system based on NT code (and will not work for win 95,98,ME). 3) One recommeded approach (which should have worked) was to use GNAT for DOS so that you would be able to make these BIOS calls..Note that I think this could still work but it is not the greatest long term approach..(although with what the answer actually is perhaps this would not be bad to revisit) 3) Now, for what I think is approaching the correct answer. I looked at the archives of a few win32 related groups for similar questions (where the question should have started in the beginning...Again this is not meant to be a flame, sometimes the specifics of a question and what the actual question is really is only clear once you begin to understand the answer). Take a look at the link: http://msdn.microsoft.com/library/psdk/win95/devio_2b1v.htm This describes how to use the VWIN32.VXD service in windows to do low level IO (specifically floppy disk read/write....Note that apparently if you wanted something as simple as direct hard disk access it would be much more difficult (See Microsoft Knowledge base Q137176 and Q137813 ) What is really amazing here is the pain it takes under a 32 bit app on win 95/98/ME to do this stuff and how different it is from NT. I always find it amazing how Windows snobs will talk about the multiple versions of Linux (or Unix) without realizing how different win 95, 95 OSR 2, 98, 98 SE, ME, NT, 2000, XP, CE are from each other...Granted several of these are version updates and so you can cut them some slack but it is not as if a windows developer can ignore the older versions (although it appears finally that the original 95 and even 95 OSR 2 are now no longer supported well).. "chris.danx" wrote in message news:ABBL6.3405$tU6.554354@news2-win.server.ntlworld.com... > Hi, > I've got a binding to the biosdisk function but i do not know how to tell > GNAT which file it's in. I tried -I but that's wrong. I looked in the users > guide and reference manual for GNAT but cannot find it. > > I'm linking to the libc.a file a part of the djgpp installation. (this is GNAT > non-dos i'm using i had major problems trying to get the dos one to compile...) > I hope linking non-dos and dos is possible (win98 i'm on). > > This is my binding > > > with interfaces.c; > with interfaces.c.strings; > > package biosf is > > package C renames interfaces.c; > > function biosdisk ( cmd : in c.int; > drive : in c.int; > head : in c.int; > track : in c.int; > sector : in c.int; > nsects : in c.int; > buffer : in c.strings.chars_ptr) return c.int; > pragma import (C, biosdisk, "biosdisk"); > pragma linker_options ("d:\djgpp\lib\libc.a"); > -- the above line is wrong... > -- i don't know what the correct option is! > > end biosf; > > > > Thanks, > Chris Campbell > >