8. Descriptor Management Services, Continued

8.2 Free Descriptor

This function is used to free descriptors that were
allocated through the Allocate Descriptors
function.

To Call

AX = 0001h
BX = Selector to free

Returns

If function was successful:
Carry flag is clear.
If function was not successful:
Carry flag is set.

Programmer's Notes

Since this function involves descriptor management,
it will be rarely needed in 32-bit programs.

Arrays of descriptors are freed by calling this
function for each of the individual descriptors.

It is valid to free the descriptors allocated for
the program's initial CS, DS, and SS. Other
descriptors that were not allocated by function
0000h should never be freed by this function
unless otherwise specified.

Code Sample:

The following function compiles with Watcom C/C++ version 11.0 or later,
and Microsoft Visual C/C++ version 4.0 or later: