mov ax, 1686h ; Detect Interrupt 31h Services
int 2Fh ; multiplex interrupt
or ax,0
jz int31_avail ; ax is zero if interrupt 31h services available
Detect Interrupt 31h Services (Interrupt 2Fh Function 1686h) determines whether a set of protected-mode functions are available for use by protected-mode applications. Applications use the Interrupt 31h services to allocate and manage protected-mode memory.
This function has no parameters.
The return value is zero in the AX register if the Interrupt 31h services are available. Otherwise, the AX register contains a nonzero value.
Both standard- and 386 enhanced-mode Windows support the Interrupt 31h services. Interrupt 31h services are only supported for protected-mode programs.