Table of Contents
Note: This API call is for DOS personality only. Use Family API for portability.
Int 21H, AH=36H
Version
2 and higher
Brief
GET FREE DISK SPACE
Family API
Input
AH = 36h DL = drive number (00h = default, 01h = A:, etc)
Return
AX = FFFFh if invalid drive
else AX = sectors per cluster BX = number of free clusters CX = bytes per sector DX = total clusters on drive
Notes
free space on drive in bytes is AX * BX * CX total space on drive in bytes is AX * CX * DX "lost clusters" are considered to be in use according to Dave Williams' MS-DOS reference, the value in DX is incorrect for non-default drives after ASSIGN is run this function does not return proper results on CD-ROMs; use AX=4402h"CD-ROM" instead (FAT32 drive) the reported total and free space are limited to 2G-32K should they exceed that value
See also
AH=1Bh,AH=1Ch,AX=4402h“CD-ROM”,AX=7303h
Note
Text based on Ralf Brown Interrupt List Release 61
DOS API | |
---|---|
Process manager | INT 20H, INT 21H: 00H, 25H, 26H, 31H, 34H, 35H, 4CH, INT 22H, INT 27H, INT 28H |
File manager | INT 25H, INT 26H, INT 21H: 0DH, 0EH, 0FH, 10H, 11H, 12H, 13H, 14H, 15H, 16H, 17H, 19H, 1AH, 1BH, 1CH, 21H, 22H, 23H, 24H, 27H, 28H, 29H, 2EH, 2FH, 32H, 3305H, 36H |
Character Device I/O | INT 29H, INT 21H: 01H, 02H, 03H, 04H, 05H, 06H, 07H, 08H, 09H, 0AH, 0BH, 0AH, 0CH |
Signals | INT 23H, INT 24H, INT 21H: 3300H, 3301H, 3302H |
Memory manager | |
Date and Time | INT 21H: 2AH, 2BH, 2CH, 2DH |
Misc | INT 21H: 30H, 3306H, 3700H, 3701H, 3702H, 3703H |
NLS | INT 21H: 3303H, 3304H |