DosQueryABIOSSupport

From EDM2
Jump to: navigation, search

DosQueryABIOSSupport returns flags that indicate various basic hardware configurations.

Syntax

APIRET APRENTRY DosQueryABIOSSupport (ULONG Reserved)

Parameters

Reserved (ULONG) input
Must be set to 0L. No other value is defined.

Return Code

APIRET flags
The following flags are returned:
  • HW_CFG_MCA 0x01
  • HW_CFG_EISA 0x02
  • HW_CFG_ABIOS_SUPPORTED 0x04
  • HW_CFG_ABIOS_PRESENT 0x08
  • HW_CFG_PCI 0x10
  • HW_CFG_OEM_ABIOS 0x20
  • HW_CFG_IBM_ABIOS 0000
  • HW_CFG_PENTIUM_CPU 0x40

Example Code

int main(int argc, char *argv[], char *envp[]){
   APIRET flags;

   flags = DosQueryABIOSSupport(0L);

   printf("H/W config  %08x\n",flags);

   if (flags   HW_CFG_MCA)             printf("            0x01 => MCA Bus\n");
   if (flags   HW_CFG_EISA)            printf("            0x02 => EISA Bus\n");
   if (flags   HW_CFG_ABIOS_SUPPORTED) printf("            0x04 => ABIOS Supported\n");
   if (flags   HW_CFG_ABIOS_PRESENT)   printf("            0x08 => ABIOS Present\n");
   if (flags   HW_CFG_PCI)             printf("            0x10 => PCI Bus\n");
   if (flags   HW_CFG_OEM_ABIOS)       printf("            0x20 => OEM ABIOS\n");
   if (flags   HW_CFG_PENTIUM_CPU)     printf("            0x40 => Pentium or Higher CPU\n");

   return 0;
}