INT 13 - IBM/MS INT 13 Extensions - INSTALLATION CHECK
AH = 41h
BX = 55AAh
DL = drive (80h-FFh)
CF should be set on entry for better compatibility
Return: CF set on error (extensions not supported)
AH = 01h (invalid function)
CF clear if successful
BX = AA55h if installed
AH = major version of extensions
01h = 1.x
20h = 2.0 / EDD-1.0
21h = 2.1 / EDD-1.1
30h = EDD-3.0
AL = internal use
CX = API subset support bitmap (see #00271)
DH = extension version (v2.0+ ??? -- not present in 1.x)
Notes: the Phoenix Enhanced Disk Drive Specification v1.0 uses version 2.0 of
the INT 13 Extensions API
the lDOS instsect application can patch some lDOS and FreeDOS boot
sector loaders to disable LBA access, using its /L options. to
disable LBA access, /L NONE is used, while /L AUTO reverts to the
code to detect LBA support at run time. /L AUTOHDD writes the
code that detects LBA support only on hard disk drives (units
above 7Fh, see description in BUGS below). this HDD-only check
originated with FreeDOS but as of 2026 April it is also supported
by the lDOS loaders.
FreeDOS SYS offers three options to change LBA detection. (it only
supports patching its own built-in loaders, unlike lDOS instsect
which supports patching selected other loaders.) the options are
called /FORCE:CHS, /FORCE:LBA, and /FORCE:AUTO. for the FAT12 and
FAT16 loaders, /FORCE:CHS corresponds to /L NONE, /FORCE:LBA to
/L AUTO (check on any unit), and /FORCE:AUTO to /L AUTOHDD (check
on HDD units only, else use CHS).
for the FAT32 loaders this differs: there are two separate loaders,
one of which is installed, each one fitting (entirely) in the
FAT32 boot sector. one of them uses only CHS reads (and can run
on an 8086) while the other one uses only LBA reads (and requires
at least a 386). /FORCE:CHS or /FORCE:LBA directly select one of
the two loaders. /FORCE:AUTO (which is the default) queries LBA
support for drive 80h on the system running SYS (using this
installation check) and selects the loader matching the result.
(lDOS uses a two-stage FAT32 loader storing a common second stage
in the FSINFO sector, called FSIBOOT. the first stage uses this
installation check, the code of which can be patched by instsect
as described above. lDOS FAT12 and FAT16 loaders instead use the
"skip check" method in which they attempt to read using function
AH=42h"INT 13 Ext" without using this installation check, as
noted in that entry.)
BUGS: Xi8088 BIOS version 0.9.4 fails to set DS (to 0040h) when it
encounters any unsupported function, writing to BYTE [DS:0041h]
"fdc_last_error". if DS=0000h this corrupts the INT 10 vector.
as a workaround, calls to detect LBA support can temporarily
set DS=0040h for this function so that the BIOS writes to the
correct location. if all other LBA functions are gated by this
check then they won't be called on the BIOS with this bug.
FreeDOS boot sector loaders by default refuse to use LBA access
on diskette drives (unit numbers below 80h), even if this
function would indicate that they are supported. there is a
comment in the source text reading: "don't use LBA addressing
on A: [...] might be a (buggy) CDROM-BOOT floppy emulation"
SeeAlso: AH=42h"INT 13 Ext",AH=48h"INT 13 Ext"
Bitfields for IBM/MS INT 13 Extensions API support bitmap:
Bit(s) Description (Table 00271)
0 extended disk access functions (AH=42h-44h,47h,48h) supported
1 removable drive controller functions (AH=45h,46h,48h,49h,INT 15/AH=52h)
supported
2 enhanced disk drive (EDD) functions (AH=48h,AH=4Eh) supported
extended drive parameter table is valid (see #00273,#00278)
3-15 reserved (0)