NEW VERSION- @echo off %老刘制作-数值递增相加%
- IF /i "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" (
- echo DEBUG和8086_ASM不支持64位的系统。
- Pause&Exit
- )
- %在此感谢netbenton斑竹的十进制转十六进制函数% set "d-h=setlocal enabledelayedexpansion&set/a dx=#a#&set xs=0123456789abcdef&(for /l %%z in (1,1,4) do set /a x%%z=dx%%16,dx=dx/16)&(for /f "tokens=1-4" %%1 in ("!x1! !x2! !x3! !x4!") do set hx=!xs:~%%4,1!!xs:~%%3,1!&(if !hx!==00 set hx=)&(for %%z in ("!hx!!xs:~%%2,1!!xs:~%%1,1!") do endlocal&set #a#=%%~z))"
- set /p NUM=Please input a Number:
- %d-h:#a#=NUM%
- For /f "tokens=2,3" %%a in (
- '^(ECHO E20:0 %NUM%^&MORE +13 "%~0"^)^|DEBUG^|FindSTR "0020:0000"'
- ) do set /a "num=0x%%a+0X%%b*0X100"
- Echo.%num%
- pause&exit/b
- A
- MOV AX,20
- MOV DS,AX
- MOV CL,BYTE PTR [0]
- INC DX
- ADD BX,DX
- LOOP 109
- MOV WORD PTR [0],BX
- INT 21H
-
- G
- D20:0 1
- Q
- Q
复制代码
|