Here is the translation of the provided content:
Below is the conversion script, (The attachment is the processed foreign 64K work "Metal Maze.exe")
Below is the conversion script, (The attachment is the processed foreign 64K work "Metal Maze.exe")
::=====================================================
:: code by freeants CMD@XP version:1.00
::=====================================================
@echo off
cd/d "%~dp0">nul
if "%~z1" equ "" goto:usage
if %~z1 gtr 65280 goto:NOT_SUPPORT
setlocal ENABLEDELAYEDEXPANSION
copy/b "%~1" $$$>nul
set/a D_NUM=%~z1+255
call:DEC_HEX %D_NUM% >nul
echo @echo off>"%~n1.cmd"
echo more +5 "%%~0"^|debug^&graftabl 936^>nul>>"%~n1.cmd"
echo copy/b/y $tmp$ "%~nx1"^>nul>>"%~n1.cmd"
echo del/a/f/q $tmp$>>"%~n1.cmd"
echo goto:eof>>"%~n1.cmd"
for /f "eol=- skip=1 tokens=*" %%i in ('^(echo d100,%FILE_SIZE%^&echo q^)^|debug $$$^&^&del $$$') do (
set op=%%i
set op=!op:-= !
echo e!op:~5,53! 2>nul>>"%~n1.cmd"
)
echo rcx>>"%~n1.cmd"
call:DEC_HEX %~z1 >nul
echo %FILE_SIZE%>>"%~n1.cmd"
echo n$tmp$>>"%~n1.cmd"
echo w>>"%~n1.cmd"
echo q>>"%~n1.cmd"
goto :EOF
:DEC_HEX
set FILE_SIZE=
set PATTERN=123456789ABCDEF
set dec=%1
:WHILE
set /a res=%dec%%%16-1
set /a dec/=16
set res=!PATTERN:~%res%,1!
set FILE_SIZE=%res%%FILE_SIZE%
if "%dec%" neq "0" goto WHILE
goto:eof
:usage
echo.================================================
echo You did not specify the file to be processed or the specified file does not exist...
echo.
echo Usage:
echo %~n0 fileName
echo.================================================
goto:eof
:NOT_SUPPORT
echo The specified file is too large, the script (%~nx0) cannot process it...
pause
goto:eof
Recent Ratings for This Post
( 4 in total)
Click for details
Attachments

