China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 14:39
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Repost: Solving DOS command version incompatibility problems View 1,270 Replies 0
Original Poster Posted 2003-04-09 00:00 ·  中国 广东 佛山 禅城区 电信
元老会员
★★★★
Credits 5,170
Posts 1,637
Joined 2002-10-16 00:00
23-year member
UID 8
Gender Male
From 广东佛山
Status Offline
Solving DOS version incompatibility
Posted on: NetEase Virtual Community (Mon Aug 9 22:12:11 1999), on-site message

I once saw in a newspaper a method for solving DOS version incompatibility:
C:\PAHT\DEBUG.COM PROGRAM
Using the R command, you can get the values of registers BX and CX,
then use the statement (S B4 30) to obtain one or more values;
disassemble the obtained , and you can find lines similar to the following:
DS:IP B430 MOV AH,30
DS:IP CD21 INT 21
DS:IP 3Dxxxx CMP AX,XXXX <- XXXX is the version number, for example 1E03 is ver.
30
DS:IP ..... JZ XXXX can be modified to another version yourself.
^^ Here 03 is the major version, 1E is the minor version
This 30
Or use A | hex code yourself. 3Dxxxx then com-
pare AX
instruction modify the condition shift | whether the value inside is 031E.
move statement. |

Later, I found this method too troublesome, so I changed it like this:
DS:IP B430 MOV AH,30 <- change to MOV AH,XXXX
DS:IP CD21 INT 21 <- change to NOP
DS:IP 3Dxxxx CMP AX,XXXX
DS:IP ..... JZ XXXX
The principle is the same. The first method changes the conditional statement, the second changes getting the version into directly putting in the version number.
Later still, using DEBUG was really too much work, so I used a hex editor to modify it:
Search for the string “B4 30 CD 21”. If it is followed by a string like “0A 07” (the DOS version of WIN98 is 7.10) or
“16 06” (the DOS version is 6.22), then change the string “B4 30 CD 21” to “B8 0A 07 90”
(a WIN98 program) or “B8 16 06 90” (a DOS622 program); sometimes after changing it this way, when running it you instead get a
DOS version error message, then you should change “B8 0A 07 90” or “B8 16 06 90” to “B
8 07 0A 90” or “B8 06 16 90”, and then it will definitely succeed.
In fact, this method and the second method are essentially the same.
我的网志
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos
Forum Jump: