中国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-25 23:43
47,812 topics / 349,910 posts / today 0 new / 48,264 members
DOS批处理 & 脚本技术(批处理室) » Chinese display for 16-bit programs not supported under XP command line?
Printable Version  5,309 / 17
Floor1 willsort Posted 2004-02-06 00:00
元老会员 Posts 1,512 Credits 4,432
To All:

My XP is the 2002 SP1 version. But whether I go into COMMAND or CMD, after running old 16-bit programs, Chinese cannot be displayed. For example, DEBUG and the like.

Does anyone have a solution?

[ Last edited by willsort on 2005-9-27 at 19:12 ]
Floor2 ssclose Posted 2004-02-06 00:00
初级用户 Posts 7 Credits 133
I saw this method in a newspaper: to use turbo c under xp, enter in cmd
start/separate path\program name
separate means opening up a separate space in memory to run the 16-bit program
there is also a parameter, shared, which starts a 16-bit program in shared memory space; I haven't tried that one
Give it a try
Floor3 Wengier Posted 2004-02-08 00:00
系统支持 Posts 10,521 Credits 27,736
Floor4 willsort Posted 2004-02-08 00:00
元老会员 Posts 1,512 Credits 4,432
Re ssclose:

Many thanks for the reply!

I have tried this method, but overall, it is not really satisfactory.

I wrote a simple test batch file:

@echo off
echo Chinese display
pause
debug
echo display Chinese

I made a number of changes to the DEBUG line.
ECHO Q>QUIT.ASD
DEBUG 〈 QUIT.ASD
If I don't use START, there are problems with Chinese; if I do use START, there are even more problems. It seems the pipe symbol has a big effect on START, or rather START has a big effect on the pipe symbol. In addition, opening a new window, waiting for the program to execute, and using all those parameters made my XP reboot three times.

Looks like I'd better just stick honestly with my own 98 and DOS6.
Floor5 willsort Posted 2004-02-08 00:00
元老会员 Posts 1,512 Credits 4,432
Re Wengier:

Very regrettably, I can't consider your method. Just to run a simple batch file, I'd need to run a Chinese character support system; even without considering compatibility issues, the cost is too high.
Floor6 Wengier Posted 2004-02-08 00:00
系统支持 Posts 10,521 Credits 27,736
Then you'd better just stick honestly with a pure DOS system. But neither 98 nor DOS6 is very practical. MS-DOS 7.10 still has the best compatibility and is also the newest; after all, it's already 2004 now, not 1993-1994 when DOS6 came out!
Floor7 pizigao Posted 2004-02-09 00:00
银牌会员 Posts 292 Credits 1,063
What a pity!
Floor8 骨灰龙 Posted 2004-02-19 00:00
中级用户 Posts 22 Credits 206
Can only say it's a pity. Hopefully in the future someone can make some kind of patch.
But you could also try it through a virtual machine.
Floor9 willsort Posted 2005-04-08 00:00
元老会员 Posts 1,512 Credits 4,432
To All:

  In some tests not long ago, I found a temporary workaround:

  1. Enter XP's DOS console through command, then use graftabl 936; at that point Chinese can be used in 16-bit programs;
  2. Enter through cmd, then use chcp 437 and graftabl 936 respectively; at that point Chinese can also be used in 16-bit programs;

  Also, testing mem in cmd only shows blank lines, but once you use debug in it and exit, mem returns to normal. Other similar old 16-bit DOS programs have the same problem; that is to say, mem needs a certain environment, but only by calling a 16-bit program like Debug can that environment be activated. It is very likely the 16-bit sub-environment of ntvdm, in other words the environment activated by command. But why mem itself does not activate it, and some other programs don't either, is another question.

  Also, what exactly are the differences and connections between the 16-bit environment and the 32-bit environment? From testing, the following differences are known so far; everyone can look for more:

  1. Code page: cmd is 936, command is 437;
  2. Environment variables: cmd has more than command, but command has the sound card blaster;
  3. Startup configuration: command enables config.nt and autoexec.nt;
  4. Shell depth: closing command gives a prompt that it cannot be ended; only after using exit to leave one level of shell can it be closed normally; cmd does not have this problem;
  5. Window title: cmd is 命令提示符, while command is Command Prompt;

[ Last edited by willsort on 2005-9-27 at 19:13 ]
Floor10 willsort Posted 2005-09-27 19:03
元老会员 Posts 1,512 Credits 4,432
To All:

  Interestingly, for some unknown reason recently, when I enter cmd in “Run” to start the command line, the code page changes to English 437, and running mem no longer has the blank-line flashing problem either. But the version LOGO shown at startup is still XP, only now displayed in English, not the DOS version shown by command. And even if I enter cmd.exe or c:\windows\system32\cmd.exe, the result is the same.

  But if I click the “Command Prompt” shortcut in the Accessories menu under Start, or directly click cmd.exe under system32, the code page displays Chinese normally.

Title: C:\windows\system32\cmd.exe
=====================
Microsoft Windows XP
(C) Copyright 1985-2001 Microsoft Corp.
=====================
The command line window obtained by entering cmd in “Run”

Title: 命令提示符
=====================
Microsoft Windows XP
(C) 版权所有 1985-2001 Microsoft Corp.
=====================
The command line window obtained by directly clicking the shortcut

Title: Command Prompt
=====================
Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.
=====================
The command line window obtained by entering command in “Run”

Please note that their copyright date ranges are also different.

[ Last edited by willsort on 2005-9-27 at 19:15 ]
Floor11 willsort Posted 2005-10-15 11:31
元老会员 Posts 1,512 Credits 4,432
Re All:

As for the code page issue in post #10, it has been verified that it is caused by some item in the registry being modified, as follows:


"CodePage"=dword:000001b5


The 1b5 there is the hexadecimal notation for 437 (OEM United States).

As for the problem mentioned in post #9 where executing mem in cmd shows blank lines, the specific behavior is as follows:

If you enter the command line window by running CMD or by clicking the Command Prompt in the menu, then directly execute mem or some other older 16-bit DOS program, it will immediately switch the chcp code page to 437. This switching action clears the screen, then shows 11 blank lines. But if you directly execute mem>mem.txt, the switching action still occurs, only the number of blank lines displayed becomes 1, while mem.txt shows 11 lines of text.


Invalid keyboard code specified


655360 bytes total conventional memory
655360 bytes available to MS-DOS
633664 largest executable program size

1048576 bytes total contiguous extended memory
0 bytes available contiguous extended memory
941056 bytes available XMS memory
MS-DOS resident in High Memory Area


Therefore the following guesses can be made:

1. Those 11 blank lines in the former case are exactly the contents of mem.txt.
2. The Invalid sentence on the first line of mem.txt indicates that the program uses a Keyboard Code incompatible with the current Windows, and according to testing, no 16-bit DOS program has yet been found that can solve this compatibility problem.
3. The forced Code Page switch may originate from this invalid Keyboard Code.
4. And since after the code page switch the program output still cannot be displayed normally, that means the program output is still not compatible with this code page, while DEBUG can make adjustments.
5. According to the hint from Wengier in http://www.cn-dos.net/forum/viewthread.php?tid=1019, after switching the command line window to full screen and then executing programs like mem, the problem pointed out in guess 4 will not appear, so this kind of switching should have performed a corresponding adjustment action just like the piece of code in debug.

[ Last edited by willsort on 2005-10-15 at 12:32 ]
Floor12 不得不爱 Posted 2005-10-15 12:09
超级版主 Posts 2,044 Credits 5,310 From 四川南充
Originally posted by willsort at 2005-9-27 19:03:
To All:

  Interestingly, for some unknown reason recently, when I enter cmd in “Run” to start the command line, the code page changes to English 437, and running m..

That was caused by you changing cmd's properties! If you can change the properties back to normal, there won't be any problem!
Floor13 willsort Posted 2005-10-15 12:32
元老会员 Posts 1,512 Credits 4,432
Re qwe1234567:

Then try modifying cmd's code page property manually instead of through the registry, and make that change apply to all command line windows opened afterward. I could never find where the manual option for this change was. But after deleting that registry branch, the command line window had already returned to normal.

----------------------------------------------------------------------------------------------------
Sorry! After I made this post and went to look again, I unexpectedly found this option entry.

After opening the command line window, press Alt+Space, D in sequence to enter the “Console Window Properties” dialog box, then on the “Options” tab adjust the “Default code page”. I used to always press Alt+Space, D, but the result was always entering the “C:\windows\system32\cmd.exe” Properties dialog box, where the code page cannot be adjusted.

However, this option modifies the code page for all consoles, and the corresponding registry branch is:


"CodePage"=dword:000003a8

As for the original , I don't know how it was created.


[ Last edited by willsort on 2005-10-15 at 12:50 ]
Floor14 不得不爱 Posted 2005-11-03 21:26
超级版主 Posts 2,044 Credits 5,310 From 四川南充
Another way is to write a REG file and import it whenever CMD has problems!
Floor15 electronixtar Posted 2007-02-11 14:28
铂金会员 Posts 2,672 Credits 7,493


http://www.cn-dos.net/forum/viewthread.php?tid=26795

Brother WillSort really was amazing!!! Miss him ing...
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023