Free Space on Floppy Disk? Is INT 0x13 the right way?
Posted: Fri Oct 18, 2013 10:18 am
Is there a BIOS Function that returns free and used space on a "FAT12" floppy drive?
To my knowledge INT 0x13 is used for this stuff.
The floppy drive of my os is DISK 1 (A:), DL=0x00
INT 13h AH=02h: Read Sectors From Drive
AH 02h
AL Sectors To Read Count
CH Cylinder
CL Sector
DH Head
DL Drive (0x00)
ES:BX Buffer Address Pointer
And then calculate the empty sectors, which will be free and subtract it from the total size (1.44MB),
Is this the correct way to do this?
Or any other call/method can achieve this?
PS: I have searched whole of wikipedia,osdev with BIOS Calls INT0x10,INT0x13,INT0x21 and nothing gave me what I
needed
I am very sorry if I am being silly, I apologize to all those who have OSes that run in 64 bit Protected Mode with Memory Protection
,Multitasking,GCC Port,NASM Port,BASH Port,Advantage of Multiple cores etc.
~Help would be appreciated
To my knowledge INT 0x13 is used for this stuff.
The floppy drive of my os is DISK 1 (A:), DL=0x00
INT 13h AH=02h: Read Sectors From Drive
AH 02h
AL Sectors To Read Count
CH Cylinder
CL Sector
DH Head
DL Drive (0x00)
ES:BX Buffer Address Pointer
And then calculate the empty sectors, which will be free and subtract it from the total size (1.44MB),
Is this the correct way to do this?
Or any other call/method can achieve this?
PS: I have searched whole of wikipedia,osdev with BIOS Calls INT0x10,INT0x13,INT0x21 and nothing gave me what I
needed
I am very sorry if I am being silly, I apologize to all those who have OSes that run in 64 bit Protected Mode with Memory Protection
,Multitasking,GCC Port,NASM Port,BASH Port,Advantage of Multiple cores etc.
~Help would be appreciated