Disk Parameter Code
Posted on 2003-03-28
I have some assembly used within Pascal to get the size of the hard disk as follows;
function GetGeometry(Drive: Byte; var cyls, heads, sects: Word): Integer;
var Regs: Registers;
regs.ah := 8;
regs.dl :=Drive or $80;
cyls := (((regs.cl shl 2) and $300) or regs.ch) + 1;
heads := regs.dh + 1;
sects := regs.cl and $3F;
GetGeometry:=regs.ax and $FF00;
if regs.flags and 1 <> 0 then
This unfortunatley only works upto 8gb, I've done some searching and found changing the interrupt 13
call to 48h should return me the information. I don't know how to access the informatin tho' as it is returned differently than above.
Can anyone post me some assembly/comment to help?
As It is quite urgent I am offering 500 points to a correct working solution.