: : How are you trying to implement it in C. Post your code.
: also, what compiler are you using? you will need a 16-bit compiler such as Turbo C.
we r using the 16-bit turbo c.
we are novices in terms of programming using interrupts. we have written a few programs not worth mentioning as we r still having some problems with regard to passing and retriving values from segment registers.
we have tried both the int86/int86x and the intdos/intdosx functions the former using the interrupt 13h
we have been able to implement a few programs for floppy drives that read the fat information but none so far for fixed disks.
what we may be looking for is a working program (example: calculating the capacity of a hard drive >8GB) so that we know how to use the the segment registers. most of programs that we have found over the internet use the indos functions or are in assembly language.
i'm sending a code for getting FAT info of floppy drive
//get FAT information for any drive
// here we r trying to retrive FAT info of floppy drive
union REGS i,o;
unsigned int ret;
i.h.ah = 0x1C; // interrupt service #
i.h.dl = 1; // for accessing a:
ret = intdos(&i, &o);
printf("\n dx = %u",o.x.dx);// prints the number of clusters
printf("\n al = %u",o.h.al);// sectors per cluster
printf("\n cx = %u",o.x.cx);// bytes per sector
// printf("\n bx = %x",o.x.bx); // DS:BX segment offset of media descriptor