(view source code of videorom.bat as plain text)
@ECHO OFF
:: For Windows NT 4/2000/XP onlyIF NOT [%OS%]==[Windows_NT] GOTO Syntax
:: No command line parameters required, "/2nd" is for internal use onlyIF NOT [%1]==[] IF NOT [%1]==[/2nd] GOTO Syntax
:: OK, let's goSETLOCAL
IF [%1]==[/2nd] (
:: DEBUG commands, to be piped to DEBUG.EXEFOR %%A IN ("d C000:0040" "d C000:00C0" "q") DO ECHO.%%~A
) ELSE (
SET Info=
:: Recursive call is needed to enable piping screen output to DEBUG.EXEFOR /F "tokens=16* delims= " %%A IN ('^(CMD.EXE /C "%~f0" /2nd 2^>NUL^) ^| DEBUG.EXE ^| FIND "C000:"') DO CALL :Parse "%%B"
):: Remove multiple dotsCALL :StripDots
:: Tidy up resulting stringCALL :Tidy
:: Show resultECHO.
ECHO Video adapter ROM manufacturer info:
ECHO.
ECHO.%Info%
:: DoneENDLOCAL
GOTO:EOF
:AddStr:: Remove quotes and append to existing stringSET Info=%Info%%~1
GOTO:EOF
:Parse:: Remove "unprintable" charactersSET Line=%1
SET Line=%!!|%
SET Line=%Line:<=%
SET Line=%Line:>=%
:: Remove quotes and append to existing stringCALL :AddStr %Line%
GOTO:EOF
:Reverse:: Subroutine that reverses the specified input string:: Initialize variablesSET Reverse=
SET Input=%*
:: Strip leading space in NT 4 onlyVER | FIND "Windows NT" >NUL
IF NOT ERRORLEVEL 1 SET Input=%Input:~1%
:Loop:: Continue till the input string's last characterIF NOT DEFINED Input GOTO:EOF
:: Separate first character from input stringSET FirstChar=%Input:~0,1%
SET Input=%Input:~1%
:: Rebuild string in reverse orderSET Reverse=%FirstChar%%Reverse%
:: Next characterGOTO Loop
:StripDots:: Quit when no multiple dots are leftECHO.%Info% | FIND ".." >NUL
IF ERRORLEVEL 1 GOTO:EOF
:: Remove multiple dotsSET Info=%Info:..=.%
:: RepeatGOTO :StripDots
:Tidy:: Split string at first spaceFOR /F "tokens=1* delims= " %%A IN ('ECHO.%Info%') DO (
SET Prefix=%%A
SET TempInfo=%%B
):: Quit if string wasn't splitIF NOT DEFINED TempInfo GOTO:EOF
:: Split at next space if first space was followed by a dotIF "%TempInfo:~0,1%"=="." FOR /F "tokens=1* delims= " %%A IN ('ECHO.%TempInfo%') DO (
SET Prefix=%Prefix% %%A
SET TempInfo=%%B
):: Quit if string wasn't splitIF NOT DEFINED TempInfo GOTO:EOF
:: Split at next space if previous space was followed by a dotIF "%TempInfo:~0,1%"=="." FOR /F "tokens=1* delims= " %%A IN ('ECHO.%TempInfo%') DO (
SET Prefix=%Prefix% %%A
SET TempInfo=%%B
):: Quit if string wasn't splitIF NOT DEFINED TempInfo GOTO:EOF
:: Reverse first part of stringCALL :Reverse %Prefix%
:: Quit if last character of first string part was a dotIF "%Reverse:~0,1%"=="." GOTO:EOF
:: Remove everything after first dot, efectively keeping:: only the reversed last "word" of first part of stringFOR /F "tokens=1 delims=." %%a IN ('ECHO.%Reverse%') DO SET Prefix=%%a
:: Reverse againCALL :Reverse %Prefix%
:: Concatenate the 2 partsSET Info=%Reverse% %TempInfo%
GOTO:EOF
:SyntaxECHO.
ECHO VideoROM.cmd, Version 4.00 for Windows NT 4 / 2000 / XP
ECHO Reads and displays manufacturer information from your video adapter ROM
ECHO.
ECHO Usage: %~n0
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
ECHO Original idea by ComputerHope
ECHO http://www.computerhope.com/rdebug.htm
page last modified: 2025-10-11; loaded in 0.0088 seconds