Link to home
Start Free TrialLog in
Avatar of schtoom
schtoom

asked on

How do I discern between a 1.44 MB and a 720k floppy?

I haven't the slightest idea how to start this.  Theory is fine, but sample code would be the best.  Thanks!
Avatar of schtoom
schtoom

ASKER

BTW, this is a 16-bit problem.  Thanks!
Borland C++ Builder Example:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  INT64 lpFreeBytesAvailableToCaller;
  INT64 lpTotalNumberOfBytes;
  INT64 lpTotalNumberOfFreeBytes;


  Sysutils::GetDiskFreeSpaceEx("A:\\",lpFreeBytesAvailableToCaller,lpTotalNumberOfBytes,&lpTotalNumberOfFreeBytes);

  ShowMessage("toal disk size="+IntToStr(lpTotalNumberOfBytes));




Good  luck!!
Opps! I missed the post stating that this was 16 bit....
Avatar of schtoom

ASKER

Well, thanks for the effort at least :)
Anyone else?
ASKER CERTIFIED SOLUTION
Avatar of DrDelphi
DrDelphi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can use 0x13 interruption (or biosdisk function : it is same) with AH = 08H: get status of disk
AH return status :
01h    360K
02h    1.2M
03h    720K
04h    1.44M
05h    ??? (reportedly an obscure drive type shipped on some IBM machines).
2.88M on some machines (at least AMI 486 BIOS)
06h    2.88M
10h    ATAPI Removable Media Device

see more details in
http://www.ctyme.com/intr/rb-0621.htm