Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for videorom.bat

(view source code of videorom.bat as plain text)

  1. @ECHO OFF
  2. ECHO.
  3. ECHO VideoROM.bat,  Version 1.00 for DOS
  4. ECHO Reads and displays manufacturer information from your video adapter ROM
  5. ECHO.
  6. ECHO Usage:  %0
  7. ECHO.
  8. ECHO Written by Rob van der Woude
  9. ECHO http://www.robvanderwoude.com
  10. ECHO Idea by ComputerHope
  11. ECHO http://www.computerhope.com/rdebug.htm
  12. ECHO.
  13.  
  14. :: Check if running in true DOS mode
  15. ECHO.%COMSPEC% | FIND /I "COMMAND.COM" > NUL
  16. IF ERRORLEVEL 1 GOTO Error
  17.  
  18. :: Create temporary DEBUG script to gather video info
  19. >  VIDEO.DBG ECHO d C000:0040
  20. >> VIDEO.DBG ECHO d C000:00C0
  21. >> VIDEO.DBG ECHO q
  22.  
  23. :: Create temporary batch file to display 17th "word" in a line
  24. >  C000.BAT ECHO @ECHO OFF
  25. >> C000.BAT ECHO FOR %%%%A IN (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) DO SHIFT
  26. >> C000.BAT ECHO ECHO %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
  27.  
  28. :: Gather video adapter ROM info and store in a temporary file
  29. DEBUG < VIDEO.DBG | FIND "  " > VIDEO.DAT
  30.  
  31. :: Read the 16 lines of video info one line at a time
  32. :: and display each line starting at the 17th "word"
  33. TYPE VIDEO.DAT | FIND "C000:0040  " > VIDEO_.BAT
  34. CALL VIDEO_.BAT
  35. TYPE VIDEO.DAT | FIND "C000:0050  " > VIDEO_.BAT
  36. CALL VIDEO_.BAT
  37. TYPE VIDEO.DAT | FIND "C000:0060  " > VIDEO_.BAT
  38. CALL VIDEO_.BAT
  39. TYPE VIDEO.DAT | FIND "C000:0070  " > VIDEO_.BAT
  40. CALL VIDEO_.BAT
  41. TYPE VIDEO.DAT | FIND "C000:0080  " > VIDEO_.BAT
  42. CALL VIDEO_.BAT
  43. TYPE VIDEO.DAT | FIND "C000:0090  " > VIDEO_.BAT
  44. CALL VIDEO_.BAT
  45. TYPE VIDEO.DAT | FIND "C000:00A0  " > VIDEO_.BAT
  46. CALL VIDEO_.BAT
  47. TYPE VIDEO.DAT | FIND "C000:00B0  " > VIDEO_.BAT
  48. CALL VIDEO_.BAT
  49. TYPE VIDEO.DAT | FIND "C000:00C0  " > VIDEO_.BAT
  50. CALL VIDEO_.BAT
  51. TYPE VIDEO.DAT | FIND "C000:00D0  " > VIDEO_.BAT
  52. CALL VIDEO_.BAT
  53. TYPE VIDEO.DAT | FIND "C000:00E0  " > VIDEO_.BAT
  54. CALL VIDEO_.BAT
  55. TYPE VIDEO.DAT | FIND "C000:00F0  " > VIDEO_.BAT
  56. CALL VIDEO_.BAT
  57. TYPE VIDEO.DAT | FIND "C000:0100  " > VIDEO_.BAT
  58. CALL VIDEO_.BAT
  59. TYPE VIDEO.DAT | FIND "C000:0110  " > VIDEO_.BAT
  60. CALL VIDEO_.BAT
  61. TYPE VIDEO.DAT | FIND "C000:0120  " > VIDEO_.BAT
  62. CALL VIDEO_.BAT
  63. TYPE VIDEO.DAT | FIND "C000:0130  " > VIDEO_.BAT
  64. CALL VIDEO_.BAT
  65.  
  66. :: Remove temporary files
  67. DEL VIDEO_.BAT
  68. DEL VIDEO.DAT
  69. DEL VIDEO.DBG
  70. DEL C000.BAT
  71. GOTO End
  72.  
  73. :Error
  74. ECHO ERROR: This batch file is meant for DOS only!
  75. ECHO.
  76.  
  77. :End
  78.  

page last uploaded: 2017-04-06, 13:33