/* 
DPMIINFO.C
*/ 
 
#include <stdlib.h> 
#include <stdio.h> 
#include <string.h>
#include <dos.h>
#include <pharlap.h>
 
void fail(char *s) { puts(s); exit(1); } 
 
main() 
{ 
    CONFIG_INF config; 
    UCHAR vmmname[256]; 
     
    _dx_config_inf(&config, vmmname); 
     
    printf("386|DOS Extender v. <<%u.%u>>\n",  
        config.c_major, config.c_minor); 
 
    if (! config.c_dpmif) 
        fail("DPMI is not present"); 
     
    printf("DPMI v. <<%u.%u>>\n",  
        config.c_dpmimaj, config.c_dpmimin); 
     
    if (config.c_dpmi_capf & 1) 
        puts("DPMI Paging Support capability"); 
    if (config.c_dpmi_capf & 2) 
        puts("DPMI Device Mapping capability"); 
    if (config.c_dpmi_capf & 4) 
        puts("DPMI Conventional Memory capability"); 
    if (config.c_dpmi_capf & 8) 
        puts("DPMI Exception Restartability capability"); 
    if (config.c_dpmi_capf & 16) 
        puts("DPMI Page Accessed/Dirty capability"); 
     
    return 0; 
} 
