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!
Borland C++ Builder Example:
void __fastcall TForm1::Button1Click(TObje ct *Sender)
{
INT64 lpFreeBytesAvailableToCall er;
INT64 lpTotalNumberOfBytes;
INT64 lpTotalNumberOfFreeBytes;
Sysutils::GetDiskFreeSpace Ex("A:\\", lpFreeByte sAvailable ToCaller,l pTotalNumb erOfBytes, &lpTotalNu mberOfFree Bytes);
ShowMessage("toal disk size="+IntToStr(lpTotalNum berOfBytes ));
Good luck!!
void __fastcall TForm1::Button1Click(TObje
{
INT64 lpFreeBytesAvailableToCall
INT64 lpTotalNumberOfBytes;
INT64 lpTotalNumberOfFreeBytes;
Sysutils::GetDiskFreeSpace
ShowMessage("toal disk size="+IntToStr(lpTotalNum
Good luck!!
Opps! I missed the post stating that this was 16 bit....
ASKER
Well, thanks for the effort at least :)
Anyone else?
Anyone else?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER