中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 10:23
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » Repost: Solving DOS command version incompatibility problems
Printable Version  1,385 / 0
Floor1 MYS Posted 2003-04-09 00:00
元老会员 Posts 1,637 Credits 5,170 From 广东佛山
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.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023