Table of Contents
Note: This API call is for DOS and Win16 personality only. Use Family API for portability.
Int 21H, AH=1BH
Version
1 and higher
Brief
GET ALLOCATION INFORMATION FOR DEFAULT DRIVE
Family API
none
Input
AH = 1Bh
Return
AL = sectors per cluster (allocation unit) CX = bytes per sector DX = total number of clusters DS:BX → media ID byte (see #01356)
Notes
under DOS 1.x, DS:BX points at an actual copy of the FAT; later versions return a pointer to a copy of the FAT's ID byte
this function may not be properly supported on CD-ROMs and other installable file systems (use AX=4402h“CD-ROM” for CD-ROMs instead)
BUG: DOS 7.10 (Win95B/Win98) reportedly returns incorrect values in AL and DX for FAT12/FAT16 drives, even though it manages correct results for FAT32 drives (DOS windows are not affected, only real-mode DOS)
Values for media ID byte:
FFh | floppy, double-sided, 8 sectors per track (320K) |
FEh | floppy, single-sided, 8 sectors per track (160K) |
FDh | floppy, double-sided, 9 sectors per track (360K) |
FCh | floppy, single-sided, 9 sectors per track (180K) |
FAh | HP 200LX D: ROM disk, 16 sectors per track (995K) HP 200LX E: (Stacker host drive ???) |
F9h | floppy, double-sided, 15 sectors per track (1.2M) floppy, double-sided, 9 sectors per track (720K,3.5“) |
F8h | hard disk |
F0h | other media (e.g. floppy, double-sized, 18 sectors per track – 1.44M,3.5”) |
Note
Text based on Ralf Brown Interrupt List Release 61
osFree Macro Library | |
---|---|
Video I/O | @SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls |
Hardware info | @Equipment @MemSize |
Serial I/O | @AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus |
Tape I/O | @TapeOn @TapeOff @TapeRead @TapeWrite |
Keyboard I/O | @KbdStatus @CharIn @CharPeek |
Printer I/O | @PrnPrint @PrnInit @PrnStatus |
Disk I/O | @DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat |
Date and Time | @SetTime @GetTime |
Mouse | @MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion |
Memory manager | @ModBlok SET_BLOCK |