• 新規テキストファイルを作る
  • 全て半角で「ク Lヘ!」と入力する(改行は不要)
  • ファイル名を「ret.com」に変更する

B8 20 4C	MOV	AX,4C20H
CD 21		INT	21H
 

test.bat
@echo off
ret
echo %errorlevel%
if errorlevel 33 goto label33
if errorlevel 32 goto label32
echo "errorlevel<32"
goto end
 
:label33
echo "errorlevel>32"
goto end
 
:label32
echo "errorlevel==32"
 
:end
 

出力
32
"errorlevel==32"
最終更新:2014年04月08日 11:25