Mail Archives: djgpp/2001/10/14/08:34:16
Silver wrote:
>
> 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
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
- Raw text -