Not bad, I'll give you points.
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!
DigestI
View 81,424 Replies 373
Preview: The next version's Chinese character replacement rules will be simplified to facilitate the merging of character patterns and text! More functions are being added! The name will be changed to VTFmagic.COM, the program structure will imitate DEBUG, and it will allow inline control codes to be added in Chinese character strings (such as font selection, underscore, horizontal expansion, inversion, etc.), support input and automatic replacement of text files, separation and integration of character pattern files and loading programs, even replacing character patterns directly without generating files, restoring extended ASCII characters with regular glyphs while maintaining the display mode, allowing on-site editing of glyphs, etc. Now, everything is just an idea, and it will take some time to be launched. During this period, please put forward various opinions and suggestions!
Moderator willsort's suggestions are very standard, meticulous, and inspiring, and we would like to express our special thanks here!!!In this version, the replacement is to split each Chinese character into two extended ASCII characters, respectively located in the left and right half-character model areas starting from C0h and 80h. So the new Chinese character internal code must be a combination of C0h + n and 80h + n (n = non-repeating Chinese character serial number).
Restore the extended ASCII characters of the regular glyphs under the premise of maintaining the display mode
@echo off
vthz1.com %1
echo 纮羴聜脙膭艆茊菄脙膭葓
echo Nei Ma = Gai Bian!
echo.
pause
::mode co80
vthz2.com %1
echo 不启动中文系统看中文!
echo Nei Ma = Bu Bian!
echo.
pause
::mode co80
└Ç┴ü┬é├â─ä┼à╞å╟ç├â─ä╚ê
Nei Ma = Gai Bian!
Press any key to continue . . .
▓╗╞⌠╢»╓╨╬─╧╡═│┐┤╓╨╬─úí
Nei Ma = Bu Bian!
Press any key to continue . . .
seg000:011D mov dl,
seg000:011F xor dh, dh
seg000:0121 int 10h
seg000:0124 add bp, 10h
seg000:0127 mov dl,
seg000:0129 int 10h
The principle of displaying Chinese characters or graphics in English text mode is: The characters in VGA03 mode are 8*16 dot matrix English characters. The font program generated by BT modifies the character shapes of ASCII codes 128 ̄255, changing the original English symbols to Chinese characters. Since Chinese characters are 16*16 dot matrix, two characters form one Chinese character. In this way, 64 Chinese characters can be displayed (128 characters). Although it is a bit less, it is enough in batch processing and does not occupy memory! BT can help you generate a COM file that can modify the character shape. As soon as you run it, it will modify the English symbols to Chinese characters or graphics.
The scanning resolution of VGA03 mode is 720X400, and the display character resolution is 80X25. So each character is actually 9X16 dot matrix, but with an 8X16 dot matrix font, the 9th vertical line of general characters is blank. For the English tab characters with ASC values 192 to 224, the 9th vertical line is the same as the 8th vertical line, which is to make the table continuous instead of in segments. We change the shapes from ASC192 to the first character of each Chinese character, and change the shapes from ASC128 to the second character of each Chinese character, so as to form one Chinese character, and there is a line gap between each Chinese character (the 9th vertical line of the second byte). Note that when the ASC value of a character exceeds 224, it is not a tab character. Therefore, when the number of input characters exceeds 32, there will be a vertical line between each Chinese character. BT will directly read the Chinese character shapes from the screen (this is to be compatible with Chinese systems such as Yitian). Therefore, you should enter the Chinese system first and then use BT to generate the.COM file for modifying the character shapes. You can use BTE M to restore the original character shapes.
Mode Display mode attributes
00H 40×25 16 colors Text
01H 40×25 16 colors Text
02H 80×25 16 colors Text
03H 80×25 16 colors Text
04H 320×200 4 colors
05H 320×200 4 colors
06H 640×200 2 colors
07H 80×25 2 colors Text
08H 160×200 16 colors
09H 320×200 16 colors
0AH 640×200 4 colors
0BH Reserved
0CH Reserved
0DH 320×200 16 colors
0EH 640×200 16 colors
0FH 640×350 2 (monochrome)
10H 640×350 4 colors
10H 640×350 16 colors
11H 640×480 2 colors
12H 640×480 16 colors
13H 640×480 256 colors