From: Silver Newsgroups: comp.os.msdos.djgpp Subject: Re: Bios Date: Sun, 14 Oct 2001 14:25:30 +0200 Organization: Private Lines: 52 Message-ID: <3BC9843A.677A7222@gmx.de> References: <3BC74ACE DOT DD2C87FC AT gmx DOT de> NNTP-Posting-Host: gondwana.heim6.tu-clausthal.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ariadne.rz.tu-clausthal.de 1003062332 69489 139.174.246.158 (14 Oct 2001 12:25:32 GMT) X-Complaints-To: news AT rz DOT tu-clausthal DOT de NNTP-Posting-Date: 14 Oct 2001 12:25:32 GMT X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Silver wrote: > > Hi! > > I was jsut trying to dump my partition table (an 80 GB hd). So I wrote > this program: > > #include > #include > > int main() > { > textmode(C4350); > clrscr(); > unsigned char c[512]; > if (biosdisk(2, 0x81, 0, 0, 0, 1, c)) > cprintf("Error: disk"); > for(int x=0; x<512; x+=16) > { > for(int i=0; i<16; i++) > { > cprintf("%2x ",c[x+i]); > } > for(int i=0; i<16; i++) > { > unsigned char a=c[x+i]; > if (a<' ') {a=' ';} > cprintf("%c",a); > } > cprintf("\r\n"); > } > } > > However: It did not dump my partition table. Instead it prints some > unidentifiable data. biosdisk writes something into my memory and it is > consistent over all sessions. I am sure anyway that it is not my > partition table. The program has to work under Windows 98 SE. > > Any ideas why it doesn't work as wanted and how I could fix it? > > Thanks in advance > > Silver Although I still don't know why this happens, I found a rather good way to circumvent the problem by simply not using int 0x13, ah=02. Now I use LBA Extension int 0x13, ah=0x42. Anyway: I think Delorie should consider to support this API because it seems to be far better than the old one. Silver