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. SETLOCAL ENABLEEXTENSIONS
  3.  
  4. SET Single=0
  5. IF "%1"=="/1" SET Single=1
  6. IF NOT "%1"=="" IF NOT "%1"=="/1" GOTO Syntax
  7.  
  8. SET FullParam=
  9. SET DebugScript=%Temp%.\%~n0.dbg
  10. (ECHO d C000:0040) >  %debugscript%
  11. (ECHO d C000:00C0) >> %debugscript%
  12. (ECHO q)           >> %DebugScript%
  13. ECHO.
  14. FOR /F "tokens=*" %%a IN ('DEBUG ^< %DebugScript%') DO CALL :Subroutine %%a
  15. DEL %DebugScript%
  16. IF %Single%==1 ECHO.%FullParam%
  17. GOTO End
  18.  
  19. :Subroutine
  20. FOR /F "tokens=1 delims=: " %%A IN ("%1") DO IF NOT "%%A"=="C000" GOTO:EOF
  21. SET Param=%*
  22. SET Param=%Param:~61%
  23. VER | FIND "Windows NT" >NUL
  24. IF NOT ERRORLEVEL 1 SET Param=%Param:~1%
  25. SET Param=%Param:(=^(%
  26. SET FullParam=%FullParam%%Param%
  27. IF NOT %Single%==1 ECHO.%Param%
  28. GOTO:EOF
  29.  
  30. :Syntax
  31. ECHO.
  32. ECHO VideoROM.cmd,  Version 2.01 for Windows NT 4 / 2000
  33. ECHO Reads and displays manufacturer information from your video adapter ROM
  34. ECHO.
  35. ECHO Usage:  %~n0  [ /1 ]
  36. ECHO         /1 switch results in single line output
  37. ECHO            ^(will be wrapped on screen though^)
  38. ECHO            default is 16 lines of 16 characters each
  39. ECHO.
  40. ECHO Written by Rob van der Woude
  41. ECHO http://www.robvanderwoude.com
  42. ECHO Idea by ComputerHope
  43. ECHO http://www.computerhope.com/rdebug.htm
  44.  
  45. :End
  46. ENDLOCAL
  47.  

page last uploaded: 2017-07-06, 12:37