Mail Archives: djgpp/2001/10/12/16:04:19
From: | Silver <SilverBanana AT gmx DOT de>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Bios
|
Date: | Fri, 12 Oct 2001 21:55:58 +0200
|
Organization: | Private
|
Lines: | 41
|
Message-ID: | <3BC74ACE.DD2C87FC@gmx.de>
|
NNTP-Posting-Host: | gondwana.heim6.tu-clausthal.de
|
Mime-Version: | 1.0
|
X-Trace: | ariadne.rz.tu-clausthal.de 1002916560 138 139.174.246.158 (12 Oct 2001 19:56:00 GMT)
|
X-Complaints-To: | news AT rz DOT tu-clausthal DOT de
|
NNTP-Posting-Date: | 12 Oct 2001 19:56:00 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
|
Hi!
I was jsut trying to dump my partition table (an 80 GB hd). So I wrote
this program:
#include <conio.h>
#include <bios.h>
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
- Raw text -