home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol8n16.zip / HARDWARE.BAS < prev    next >
BASIC Source File  |  1989-08-11  |  1KB  |  34 lines

  1.  
  2.  
  3. '******** HARDWARE.BAS - determines installed hardware using Turbo Basic
  4.  
  5. CLS
  6. CALL INTERRUPT &H11                             'call BIOS routine
  7. Equip$ = BIN$(REG(1))                           'set binary of AX in Equip$
  8. Length = LEN(Equip$)                            'find number of bits returned
  9. Equip$ = STRING$(16 - Length, 48) + Equip$      'adjust for 16 bits
  10.  
  11. PCRam = VAL("&B" + MID$(Equip$, 13, 2)) + 1 * 16  'Bit 3 & 2
  12. VMode = VAL("&B" + MID$(Equip$, 11, 2))           'Bit 5 & 4
  13. DiskDrives = VAL("&B" + MID$(Equip$, 9, 2)) + 1   'Bit 7 & 6
  14. RS232 = VAL("&B" + MID$(Equip$, 5, 3))            'Bit 11,10 & 9
  15. Game = VAL("&B" + MID$(Equip$, 4, 1))             'Bit 12
  16. Parallel = VAL("&B" + MID$(Equip$, 1, 2))         'Bit 15 & 14
  17.  
  18. CALL INTERRUPT &H12                             'call BIOS routine to
  19. SysMem = REG(1)                                 '  determine memory size
  20.  
  21. IF VMode = 1 THEN Monitor$ = " 40 X 25 Color Graphics Adapter"
  22. IF VMode = 2 THEN Monitor$ = " 80 X 25 Color Graphics Adapter"
  23. IF VMode = 3 THEN Monitor$ = " Monochrome Display Adapter"
  24.  
  25. PRINT "Disk Drives      "; DiskDrives
  26. PRINT "Serial Port      "; RS232
  27. PRINT "Game Ports       "; Game
  28. PRINT "Parallel Ports   "; Parallel
  29. PRINT "System Memory    "; SysMem; "K"
  30. PRINT "Video Adapter    "; Monitor$
  31.  
  32.  
  33.  
  34.