BCX Console Demonstration Program s70.bas

 '===================  Flags for GetSystemInfo  =========================== 
 
 CONST PROCESSOR_INTEL_386             = 386
 CONST PROCESSOR_INTEL_486             = 486
 CONST PROCESSOR_INTEL_PENTIUM         = 586
 CONST PROCESSOR_MIPS_R4000            = 4000
 CONST PROCESSOR_ALPHA_21064           = 21064
 CONST PROCESSOR_PPC_601               = 601
 CONST PROCESSOR_PPC_603               = 603
 CONST PROCESSOR_PPC_604               = 604
 CONST PROCESSOR_PPC_620               = 620
 CONST PROCESSOR_HITACHI_SH3           = 10003    'Windows CE 
 CONST PROCESSOR_HITACHI_SH3E          = 10004    'Windows CE 
 CONST PROCESSOR_HITACHI_SH4           = 10005    'Windows CE 
 CONST PROCESSOR_MOTOROLA_821          = 821      'Windows CE 
 CONST PROCESSOR_SHx_SH3               = 103      'Windows CE 
 CONST PROCESSOR_SHx_SH4               = 104      'Windows CE 
 CONST PROCESSOR_STRONGARM             = 2577     'Windows CE - 0xA11 
 CONST PROCESSOR_ARM720                = 1824     'Windows CE - 0x720 
 CONST PROCESSOR_ARM820                = 2080     'Windows CE - 0x820 
 CONST PROCESSOR_ARM920                = 2336     'Windows CE - 0x920 
 CONST PROCESSOR_ARM_7TDMI             = 70001    'Windows CE 
 
 CONST PROCESSOR_ARCHITECTURE_INTEL    =   0
 CONST PROCESSOR_ARCHITECTURE_MIPS     =   1
 CONST PROCESSOR_ARCHITECTURE_ALPHA    =   2
 CONST PROCESSOR_ARCHITECTURE_PPC      =   3
 CONST PROCESSOR_ARCHITECTURE_SHX      =   4
 CONST PROCESSOR_ARCHITECTURE_ARM      =   5
 CONST PROCESSOR_ARCHITECTURE_IA64     =   6
 CONST PROCESSOR_ARCHITECTURE_ALPHA64  =   7
 CONST PROCESSOR_ARCHITECTURE_UNKNOWN  = 0xFFFF
 
 CONST PROCESSOR_LEVEL_80386           =   3
 CONST PROCESSOR_LEVEL_80486           =   4
 CONST PROCESSOR_LEVEL_PENTIUM         =   5
 CONST PROCESSOR_LEVEL_PENTIUMII       =   6
 
 CONST nkb = 1024
 
 '================================================================ 
 
 DIM tmp$
 DIM a$
 DIM kb$
 
 DIM si AS SYSTEM_INFO
 DIM ms AS MEMORYSTATUS
 
 '================================================================ 
 
 kb$ = " kbytes"
 
 ms.dwLength = SIZEOF(&ms)
 
 GlobalMemoryStatus (&ms)
 
 GetSystemInfo (&si)
 
 '================================================================ 
 
 PRINT : PRINT "Number Of Processors ", si.dwNumberOfProcessors
 
 SELECT CASE si.dwProcessorType
 CASE PROCESSOR_INTEL_386
   tmp$ = " 386 "
 CASE PROCESSOR_INTEL_486
   tmp$ = " 486 "
 CASE PROCESSOR_INTEL_PENTIUM
   tmp$ = " Pentium "
 CASE PROCESSOR_MIPS_R4000
   tmp$ = " MIPS 4000 "
 CASE PROCESSOR_ALPHA_21064
   tmp$ = " Alpha "
 END SELECT
 
 PRINT "Processor Type ", si.dwProcessorType, tmp$
 
 SELECT CASE si.wProcessorLevel
 CASE PROCESSOR_LEVEL_80386
   tmp$ = " Intel 80386 "
 CASE PROCESSOR_LEVEL_80486
   tmp$ = " Intel 80486 "
 CASE PROCESSOR_LEVEL_PENTIUM
   tmp$ = " Intel Pentium "
 CASE PROCESSOR_LEVEL_PENTIUMII
   tmp$ = " Intel Pentium Pro or Pentium II "
 END SELECT
 
 PRINT "Processor Level", si.wProcessorLevel, tmp$
 PRINT "Processor Revision ";
 PRINT si.wProcessorRevision;
 PRINT " Model ";
 PRINT HIBYTE(si.wProcessorRevision);
 PRINT ", Stepping ";
 PRINT LOBYTE(si.wProcessorRevision)
 PRINT
 
 '================================================================ 
 
 a$ = "Memory Used     " & STR$(ms.dwMemoryLoad)        & " free" : ? a$
 a$ = "Total Memory    " & STR$(ms.dwTotalPhys/nkb)     & kb$      : ? a$
 a$ = "Avail Memory    " & STR$(ms.dwAvailPhys/nkb)     & kb$      : ? a$
 a$ = "Total Page File " & STR$(ms.dwTotalPageFile/nkb) & kb$      : ? a$
 a$ = "Avail PageFile  " & STR$(ms.dwAvailPageFile/nkb) & kb$      : ? a$
 a$ = "Total Virtual   " & STR$(ms.dwTotalVirtual/nkb)  & kb$      : ? a$
 a$ = "Avail Virtual   " & STR$(ms.dwAvailVirtual/nkb)  & kb$      : ? a$