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
Free Space on Floppy Disk? Is INT 0x13 the right way?
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Free Space on Floppy Disk? Is INT 0x13 the right way?
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: Free Space on Floppy Disk? Is INT 0x13 the right way?
You need to read a good book on OS design that covers file systems (most will). There's a whole thread to help you choose.
Every universe of discourse has its logical structure --- S. K. Langer.
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: Free Space on Floppy Disk? Is INT 0x13 the right way?
Oooo I see...
This means that the BIOS itself doesn't provide functions for checking free space on floppy disk?
So I have to write an FDD Driver for that. Right?
Thanks,
This means that the BIOS itself doesn't provide functions for checking free space on floppy disk?
So I have to write an FDD Driver for that. Right?
Thanks,
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Free Space on Floppy Disk? Is INT 0x13 the right way?
No. A FDD driver would only be useful for controlling FDD's. However, drives don't know anything about files or file systems just like RAM doesn't know anything about data types, memory allocation, etc. You need to write file system drivers to interpret and maintain the on-disk structures.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]