Interrupt 2Fh Function 4B04h Free Switcher ID

mov bx, ID ;switcher identifier to be freed

les di, Service ;address of service-function handler

mov ax, 4B04h ;Free Switcher ID

int 2Fh ;Multiplex Interrupt

cmp bx, 0

jne error_handler ;nonzero means invalid switcher identifier

Free Switcher ID (Interrupt 2Fh Function 4B04h) frees the switcher identifier associated with the task switcher having the specified service-function handler. When a task switcher terminates it calls this function.

Client programs must not call this function.

Parameters

ID

Specifies the switcher identifier to be freed. It must have been allocated by using Allocate Switcher ID (Interrupt 2Fh Function 4B03h).

Service

Points to the terminating task switcher's service-function handler. The processing task switcher can use this address to call the terminating task switcher's service functions, such as Test Memory Region (Service Function 0001h).

Return Value

If Free Switcher ID is successful, the AX and BX registers both contain 0000h. Otherwise, the BX register contains a nonzero value, indicating an invalid switcher identifier.

Comments

The task switcher processing this function can enable interrupts (except when examining and recording allocated identifiers) and call any MS-DOS system function. Although the task switcher modifies the AX and BX registers, it must preserve all other registers.

See Also

Interrupt 2Fh Function 4B03h Allocate Switcher ID
Service Function 0001h Test Memory Region