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-08-01 06:49
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Source code for displaying Chinese characters in text mode View 1,976 Replies 11
Original Poster Posted 2003-10-30 00:00 ·  中国 湖北 武汉 联通
高级用户
★★
Credits 677
Posts 194
Joined 2003-09-13 00:00
22-year member
UID 9778
Gender Male
Status Offline
Floor 2 Posted 2003-10-30 00:00 ·  中国 湖南 长沙 雨花区 电信
初级用户
★★
Credits 255
Posts 54
Joined 2003-10-24 00:00
22-year member
UID 11864
Gender Male
Status Offline
Floor 3 Posted 2003-10-31 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
I wonder which Chinese characters this program can display? It shouldn't be all Chinese characters, right..
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 4 Posted 2003-10-31 00:00 ·  中国 湖北 武汉 联通
高级用户
★★
Credits 677
Posts 194
Joined 2003-09-13 00:00
22-year member
UID 9778
Gender Male
Status Offline
It can display all Chinese characters, but you need to make a tool yourself to extract the fonts.
You can modify the source code for displaying Chinese characters a bit so it can extract the fonts!
Just replace the data inside DATA, and it can display other Chinese characters.
But the number of Chinese characters that can be displayed on the same screen is limited, because there are only 128 extended characters!
Floor 5 Posted 2003-10-31 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Then is there any ready-made compatible tool for extracting fonts?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 6 Posted 2003-11-03 00:00 ·  中国 湖北 武汉 联通
高级用户
★★
Credits 677
Posts 194
Joined 2003-09-13 00:00
22-year member
UID 9778
Gender Male
Status Offline
''Please do not enter English letters
OPEN "hzk16" FOR BINARY AS #1
input "Please enter the Chinese characters to convert = ",hz1$
hz 100, 100, hz1$, 7
PRINT "Font extraction successful ok!!!"
SUB hz (x0, y0, hz.word$, hzcol)
leng = LEN(hz.word$)
now = 1
OPEN "hz.dat" FOR OUTPUT AS #3 ''The font file is named HZ.DAT
PRINT #3, hz.word$
PRINT #3, "data";
DO
qu = ASC(MID$(hz.word$, now, 1))
now = now + 1
wei = ASC(MID$(hz.word$, now, 1))
now = now + 1
IF qu > 161 AND wei > 161 THEN
ps& = ((qu - 161) * 94& + wei - 161) * 32& + 1
SEEK #1, ps&
zimo$ = INPUT$(32, 1)
num = 1
FOR i = 1 TO 2
FOR y = 0 TO 15
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
IF i = 2 THEN chr1$ = chr2$
IF y < 15 THEN PRINT #3, ASC(chr1$); ","; ELSE PRINT #3, ASC(chr1$)
'' LINE (x0, y0 + y)-STEP(15, 0), hzcol, , ASC(chr1$)
NEXT y
num = 1
x0 = x0 + 8
PRINT #3, "data";

NEXT i
END IF
LOOP UNTIL now = leng + 1

END SUB




Floor 7 Posted 2003-12-29 00:00 ·  中国 上海 闵行区 电信
初级用户
Credits 109
Posts 2
Joined 2003-11-05 00:00
22-year member
UID 12485
Gender Male
Status Offline
You're using the interrupt for self-drawn fonts under DOS, right? Why do it in text mode? If you switch to graphics mode
and draw the Chinese characters on the screen, you can enlarge or shrink them and position them however you want, much more flexible.
Floor 8 Posted 2003-12-30 00:00 ·  中国 湖北 武汉 联通
高级用户
★★
Credits 677
Posts 194
Joined 2003-09-13 00:00
22-year member
UID 9778
Gender Male
Status Offline
Because there are still some advantages in text mode! 、
I had already made Chinese character drawing several years ago, but I've only managed to do it in text mode now! Technically it's harder, it's not about the length of the code!
Floor 9 Posted 2004-01-08 00:00 ·  中国 浙江 杭州 华数宽带
初级用户
Credits 111
Posts 5
Joined 2003-12-01 00:00
22-year member
UID 13634
Gender Male
Status Offline
Floor 10 Posted 2004-03-17 00:00 ·  中国 广东 深圳 罗湖区 电信
中级用户
★★
Credits 223
Posts 52
Joined 2004-03-07 00:00
22-year member
UID 19481
Gender Male
Status Offline
When compiling it says: type not define, at DIM InRegs AS RegTypeX. Why?
Floor 11 Posted 2004-03-19 00:00 ·  中国 湖北 武汉 联通
高级用户
★★
Credits 677
Posts 194
Joined 2003-09-13 00:00
22-year member
UID 9778
Gender Male
Status Offline
When starting QB, please use QB/L. If you want to know the details, please go to the QBASIC forum for programming enthusiasts. There are detailed posts about interrupt calls and tutorials on how to compile BAS files!
Floor 12 Posted 2004-03-21 00:00 ·  中国 吉林 白城 大安市 联通
初级用户
Credits 106
Posts 3
Joined 2004-03-21 00:00
22-year member
UID 20657
Gender Male
Status Offline
Really nice!
Forum Jump: