(view source code of videorom.bat as plain text)
@ECHO OFF
:: For Windows NT 4/2000/XP only
IF NOT [%OS%]==[Windows_NT] GOTO Syntax
:: No command line parameters required, "/2nd" is for internal use only
IF NOT [%1]==[] IF NOT [%1]==[/2nd] GOTO Syntax
:: OK, let's go
SETLOCAL
IF [%1]==[/2nd] (
:: DEBUG commands, to be piped to DEBUG.EXE
FOR %%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.EXE
FOR /F "tokens=16* delims= " %%A IN ('^(CMD.EXE /C "%~f0" /2nd 2^>NUL^) ^| DEBUG.EXE ^| FIND "C000:"') DO CALL :Parse "%%B"
)
:: Remove multiple dots
CALL :StripDots
:: Show result with several blank lines inserted in one single ECHO command
ECHO ^
Video adapter ROM manufacturer info:^
^
%Info%
:: Done
ENDLOCAL
GOTO:EOF
:AddStr
:: Remove quotes and append to existing string
SET Info=%Info%%~1
GOTO:EOF
:Parse
:: Remove "unprintable" characters
SET Line=%1
SET Line=%!!|%
SET Line=%Line:<=%
SET Line=%Line:>=%
:: Remove quotes and append to existing string
CALL :AddStr %Line%
GOTO:EOF
:StripDots
:: Quit when no multiple dots are left
ECHO.%Info% | FIND ".." >NUL
IF ERRORLEVEL 1 GOTO:EOF
:: Remove multiple dots
SET Info=%Info:..=.%
:: Repeat
GOTO :StripDots
:Syntax
ECHO.
ECHO VideoROM.cmd, Version 3.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: 2024-04-16; loaded in 0.0059 seconds