DoubleSpace IOCTL fn 'S': Get DriveSpace Pointers
Expects: AX 4404H (INT 21H IOCTL Read service number)
BL any compressed drive number (1=A, 2=B, etc)
CX 13 (size of an DsSpcIoctlRec; see below)
DS:DX address of a DsSpcIoctlRec with an 'S' (ASCII 53H) in
the bCmdCode field)
Returns: DS:DX bResult contains a DoubleSpace API Error Code (00H=success)
Info: This obtains the true (incompressible) total space and free space
available in the specified volume.
Note: This fn is new for DOS 6.2; the INT 2fH 4a11H 0007H fn
returns similar info for pre-6.2 systems, but is unreliable in
that the specified drive may have been unmounted.
DS:DX points to a DsSpcIoctlRec as follows:
Offset Size Contents
▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
+0 2 abSig must be 444dH ('M','D')
+2 1 bCmdCode must be 46H ('S') Space command
+3 2 bResult returns a DoubleSpace API Error Code
+5 4 plSects returns addr of 8 bytes of info
decsribing total & free space in heap
+9 4 plClusts returns addr of a 4-byte value holding
the heap free space, in clusters
13 size of a DsSpcIoctlRec structure
To use this fn, set up the packet and the registers, and call
INT 21H. See DOS fn 44H (device I/O Control) for related DOS
On return check bResult for an error code. The value 4f4bH ('OK')
plSects will contain a 4-byte pointer. At that address will be two
4-byte values. The first will contains the size of the
sector heap for the specified drive, in sectors. The second
value will contain the current free space in the sector heap, in
plClusts will contain a 4-byte pointer. At that address is a single
4-byte value containing the maximum number of incompressible
clusters that can be stored on the specified drive.
This is the "worst case" free space for the drive.
The high byte should be examined before using the value. If this
byte is ffH, then the rest of the value is invalid and should be
treated as 0.
Notes: ■ The returned information is valid as long as the drive is
■ To ensure that this obtains up-to-the-minute information, you
should use DOS fn 0dH (reset disk), followed by DS IOCTL 'I'
(flush and invalidate cache) before making the call.
■ "Install" programs should use this fn when checking to see if
there is enough disk space, especially if you are about to copy
incompressable files (such as .ZIP files of PKLITE-style
compressed executables) to the target drive.
See Also: DoubleSpace Overview
INT 2fH: Multiplex Interrupt