|
qb45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『楼 主』:
显示汉字的源程序
使用 LLM 解释/回答一下
本程序需要UCDOS的汉字库,文件名:HZK16
如果要在自己的程序中使用,可以提取部分字模在程序中使用!
以下是程序代码:
OPEN "asc16" FOR BINARY AS #2
OPEN "hzk16" FOR BINARY AS #1
IF LOF(1) = 0 THEN PRINT "没有汉字库! ":END
SCREEN 12
hz1$ = "微软专用操作系统安装工具"
hz 1, 100, hz1$, 11
SUB hz (x0, y0, hz.word$, hzcol)
REM 显示汉字的子程序
savex0 = x0: savey0 = y0
FOR now = 1 TO LEN(hz.word$)
qu = ASC(MID$(hz.word$, now, 1))
IF qu >= 161 THEN
now = now + 1
IF now > LEN(hz.word$) THEN EXIT FOR
wei = ASC(MID$(hz.word$, now, 1))
ps& = ((qu - 161) * 94& + wei - 161) * 32& + 1
SEEK #1, ps&
zimo$ = INPUT$(32, 1)
num = 1
FOR y = 0 TO 15
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
LINE (x0, y0 + y)-STEP(15, 0), hzcol, , CVI(chr3$)
NEXT y
x0 = x0 + 16
ELSE
SEEK #2, qu * 16
zimo$ = INPUT$(16, 2)
FOR y = 1 TO 16
zmchr$ = CHR$(0) + MID$(zimo$, y, 1)
LINE (x0, y0 + y)-STEP(15, 0), hzcol, , CVI(zmchr$)
NEXT y
x0 = x0 + 8
END IF
NEXT now
x0 = savex0: y0 = savey0
END SUB
This program requires the Chinese character library of UCDOS, with the file name: HZK16. If you want to use it in your own program, you can extract part of the character patterns for use in the program!
The following is the program code:
OPEN "asc16" FOR BINARY AS #2
OPEN "hzk16" FOR BINARY AS #1
IF LOF(1) = 0 THEN PRINT "No Chinese character library! ":END
SCREEN 12
hz1$ = "Microsoft Dedicated Operating System Installation Tool"
hz 1, 100, hz1$, 11
SUB hz (x0, y0, hz.word$, hzcol)
REM Subroutine to display Chinese characters
savex0 = x0: savey0 = y0
FOR now = 1 TO LEN(hz.word$)
qu = ASC(MID$(hz.word$, now, 1))
IF qu >= 161 THEN
now = now + 1
IF now > LEN(hz.word$) THEN EXIT FOR
wei = ASC(MID$(hz.word$, now, 1))
ps& = ((qu - 161) * 94& + wei - 161) * 32& + 1
SEEK #1, ps&
zimo$ = INPUT$(32, 1)
num = 1
FOR y = 0 TO 15
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
LINE (x0, y0 + y)-STEP(15, 0), hzcol, , CVI(chr3$)
NEXT y
x0 = x0 + 16
ELSE
SEEK #2, qu * 16
zimo$ = INPUT$(16, 2)
FOR y = 1 TO 16
zmchr$ = CHR$(0) + MID$(zimo$, y, 1)
LINE (x0, y0 + y)-STEP(15, 0), hzcol, , CVI(zmchr$)
NEXT y
x0 = x0 + 8
END IF
NEXT now
x0 = savex0: y0 = savey0
END SUB
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2003-9-23 00:00 |
|
|
QB45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
UCDOS 的HZK16字库是一个16*16的点阵,每个字模32个字节,如果把他化成二进制排成16行,你会看到一个汉字的雏形。
算了,不写了。。。。。。。。。。。。。搞原创真累!!!!!!!!!!
又没人回铁
!
The HZK16 font in UCDOS is a 16*16 dot matrix, and each character pattern is 32 bytes. If you convert it into binary and arrange it in 16 rows, you will see the outline of a Chinese character.
Forget it, I won't write anymore... It's really tiring to do original work!!!!!
No one is replying, hey!
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2003-9-30 00:00 |
|
|
pfox
银牌会员
    
积分 1451
发帖 446
注册 2002-10-20
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
以下是引用QB45在2003-9-30 0:42:59的发言:
UCDOS 的HZK16字库是一个16*16的点阵,每个字模32个字节,如果把他化成二进制排成16行,你会看到一个汉字的雏形。
算了,不写了。。。。。。。。。。。。。搞原创真累!!!!!!!!!!
又没人回铁
!
简体字库有部分是16*15的点阵字库,能否制作一个提取16*15点阵字库的16进制点阵信息的程序?最好能够提供16进制及2进制两种提取方法。
The following is a quote from QB45 on 2003-9-30 0:42:59:
The HZK16 font in UCDOS is a 16*16 dot matrix, with each character pattern being 32 bytes. If you convert it to binary and arrange it into 16 rows, you will see the outline of a Chinese character.
Well, I won't write anymore... It's really tiring to do original work!!!!!
No one is replying, huh!
Some simplified Chinese character fonts have part of the 16*15 dot matrix font. Can a program be made to extract the hexadecimal dot matrix information of the 16*15 dot matrix font? It is best to provide both hexadecimal and binary extraction methods.
|

我的下载空间 |
|
2003-9-30 00:00 |
|
|
lemonhall
高级用户
    OS/2女孩
积分 639
发帖 183
注册 2003-6-14
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
支持原创,可是这些源程序在DOS下都有源程序代码,而且
QB45啊,我明白你喜欢BASIC的心情。但是,将很多C源码
翻译成QB码好象有些。。。。。。
毕竟用QB45直接去显示汉字是超超超慢的。。。。。
特别是在我的4M486上跑你的程序。
这些低级的调用还是建议写C代码,改进原来代码的可移植性
和可靠性,封装成LIB或者使用C++增加它的复用性都是不错
的方向。
Support original, but these source programs all have source code under DOS, and QB45, I understand your mood of liking BASIC. But, translating a lot of C source code into QB code seems a bit...
After all, using QB45 to display Chinese characters directly is extremely, extremely slow...
Especially when running your program on my 4M486.
It is suggested to write C code for these low-level calls, improve the portability and reliability of the original code, encapsulating it into LIB or using C++ to increase its reusability are all good directions.
|

REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章 |
|
2003-10-2 00:00 |
|
|
lemonhall
高级用户
    OS/2女孩
积分 639
发帖 183
注册 2003-6-14
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
另外表示支持的是:
好象你写的这些程序是可以用来开发安装程序的,对吧?
如果真的那么喜欢QB45也无妨,毕竟今天像我还使用486的人不多了。
那么请在源程序上加些注释吧,将函数封装起来,写上INCLUDE文件,
以后当你没有耐心再开发这个安装系统的时候,其他人可以轻松接手啊!
另外的一个建议就是,尽早使用RCS类似的版本控制工具,为明天的工作
打下基础。加油啊!!!!!!!!!!!!!!!!!!!!!!!!!
In addition, the support is:
It seems that the programs you wrote can be used to develop installation programs, right?
If you really like QB45 so much, it's okay. After all, today there are not many people like me who still use 486.
Then please add some comments to the source code, encapsulate the functions, write INCLUDE files.
In the future, when you are not patient enough to continue developing this installation system, others can easily take over!
Another suggestion is to use version control tools similar to RCS as soon as possible to lay the foundation for tomorrow's work. Come on!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|

REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章 |
|
2003-10-2 00:00 |
|
|
cn_archer
元老会员
         农民
积分 2903
发帖 991
注册 2003-7-23 来自 福建省
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
支持支持!老兄如果有原创发表,偶一定回帖。:)
Support!Dude, if you have original posts, I'll definitely reply. :)
|

艰难奋长戟,万古用一夫
中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
|
|
2003-10-2 00:00 |
|
|
iceboy
银牌会员
    
积分 1681
发帖 512
注册 2003-8-2
状态 离线
|
『第 7 楼』:
我把它简单地封装了一下...
使用 LLM 解释/回答一下
我把它简单地封装了一下,加入了自动换行,自动改变当前 POS... 可以和 PRINT 语句混用而不会导致字符重叠... 语句名称 PRINTH,直接调用,不过不能用分号...
文件为 QBASIC 程序,扩展名是 BAS,不过是两个 SUB
调用语法:
PRINTH "要输入的汉字"
打开附件
I simply encapsulated it, added automatic line wrapping, automatically changed the current POS... can be used together with PRINT statements without causing character overlap... The statement name is PRINTH, call directly, but cannot use semicolons...
The file is a QBASIC program, with the extension BAS, but it is two SUBs.
Call syntax:
PRINTH "Chinese characters to input"
Open the attachment
|

Somehow somewhere I've got to choose.
No matter if it is win or lose. |
|
2003-10-3 00:00 |
|
|
lemonhall
高级用户
    OS/2女孩
积分 639
发帖 183
注册 2003-6-14
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
支持,如果是安装用的PRINTH,,如果能有几个常用的
颜色宏定义,那么就可以进入单元测试了,最后封成LIB,
供所有BASIC开发者使用(不清楚UCDOS的DK里有没有现成的??)
Support. If it's the PRINTH for installation,, if there are several commonly used color macro definitions, then unit testing can be entered. Finally, it's packaged into a LIB for all BASIC developers to use (not sure if there is a ready-made one in the DK of UCDOS??)
|

REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章 |
|
2003-10-4 00:00 |
|
|
QB45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
以下是引用lemonhall在2003-10-2 18:17:46的发言:
支持原创,可是这些源程序在DOS下都有源程序代码,而且
QB45啊,我明白你喜欢BASIC的心情。但是,将很多C源码
翻译成QB码好象有些。。。。。。
C语言我根本不会啊,不过我很想学阿。我只会BASIC。
在486的电脑上要提高显示速度可以采取一些技术手段,如:直接写显存,或者将字模读入内存,加载磁盘缓冲。
The following is a quote from lemonhall on 2003-10-2 18:17:46:
Support original works, but these source programs all have source code in DOS, and
QB45, I understand your mood of liking BASIC. But, translating many C source codes
into QB code seems a bit...
I don't know C language at all, but I really want to learn it. I only know BASIC.
On a 486 computer, to improve the display speed, some technical means can be taken, such as: directly writing to video memory, or reading character patterns into memory, and loading disk buffers.
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2003-10-8 00:00 |
|
|
xy_god
中级用户
   疯狂的流浪者
积分 276
发帖 56
注册 2003-9-25
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
我以前看过一个QB的显示汉字的程序的,不过我还是希望QB45赶快学会C,不用多长时间的
,我就是从QB转向C的,但是最重要的是明白微机原理,其实我觉得明白微机原理后,用BASIC开发操作系统也是可行的,呵呵!真的,不是危言耸听哦!
I used to see a program for displaying Chinese characters in QB, but I still hope QB45 can quickly learn C. It won't take too long. I switched from QB to C, but the most important thing is to understand microcomputer principles. Actually, I think it's feasible to develop an operating system with BASIC after understanding microcomputer principles. Hehe! Really, it's not alarmist!
|

临河居士
http://www.xygod.pc5.org |
|
2003-10-8 00:00 |
|
|
QB45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
以下是引用pfox在2003-9-30 10:01:51的发言:
简体字库有部分是16*15的点阵字库,能否制作一个提取16*15点阵字库的16进制点阵信息的程序?最好能够提供16进制及2进制两种提取方法。
我这里没有16*15的点阵字库,有的话,我可以试试,你能提供这个字库吗??
The following is the statement of pfox on 2003-9-30 10:01:51:
There are some simplified Chinese character libraries with 16*15 dot matrix character libraries. Can a program be made to extract the 16 - bit dot matrix information of the 16*15 dot matrix character library? It is best to be able to provide both 16 - bit and 2 - bit extraction methods.
I don't have a 16*15 dot matrix character library here. If I had one, I could try. Can you provide this character library?
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2003-10-13 00:00 |
|
|
pfox
银牌会员
    
积分 1451
发帖 446
注册 2002-10-20
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
以下是引用QB45在2003-10-13 19:22:14的发言:
我这里没有16*15的点阵字库,有的话,我可以试试,你能提供这个字库吗??
打开附件打开附件
这个就是16*15的点阵字库,麻烦你试一试。
The following is a quote from QB45 on 2003-10-13 19:22:14:
I don't have a 16*15 dot matrix font here. If I did, I could try it. Can you provide this font?
Open attachmentOpen attachment
This is the 16*15 dot matrix font. Please try it.
|

我的下载空间 |
|
2003-10-14 00:00 |
|
|
QB45
高级用户
   
积分 677
发帖 194
注册 2003-9-13
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
pfox, 你发的字库文件我已经分析过了,源程序如下所示,实际上这不是一个16*15 的点阵字库,而是14*14的点阵字库。由于你的误导,让我走了不少弯路!不知你从那里弄来的这个字库文件!他的顺序是按偏旁部首排列的!
下面是源程序
input "请输入16*15点阵字库的完整的路径与文件名_ ",file$
OPEN file$ FOR BINARY AS #1
SCREEN 12
FOR i1 = 0 TO 28
x0 = 0
FOR i = 1 TO 42
SEEK #1, 24709 + (i + i1 * 42) * 28
zimo$ = INPUT$(28, 1)
num = 1
y0 = i1 * 16
FOR y = 0 TO 13
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
LINE (x0, y0 + y)-STEP(14, 0), 7, , CVI(chr3$)
NEXT y
x0 = x0 + 15
NEXT i
NEXT i1
close
end
pfox, I have analyzed the font file you sent. The source code is as follows. Actually, this is not a 16*15 dot matrix font, but a 14*14 dot matrix font. Because of your misguidance, I took a lot of detours! I don't know where you got this font file! Its order is arranged according to radicals!
The following is the source code
input "Please enter the complete path and file name of the 16*15 dot matrix font_ ",file$
OPEN file$ FOR BINARY AS #1
SCREEN 12
FOR i1 = 0 TO 28
x0 = 0
FOR i = 1 TO 42
SEEK #1, 24709 + (i + i1 * 42) * 28
zimo$ = INPUT$(28, 1)
num = 1
y0 = i1 * 16
FOR y = 0 TO 13
chr1$ = MID$(zimo$, num, 1)
num = num + 1
chr2$ = MID$(zimo$, num, 1)
num = num + 1
chr3$ = chr2$ + chr1$
LINE (x0, y0 + y)-STEP(14, 0), 7, , CVI(chr3$)
NEXT y
x0 = x0 + 15
NEXT i
NEXT i1
close
end
|

我(QB45)的照片与简历
http://www.programfan.com/club/showbbs.asp?id=197280
|
|
2003-10-14 00:00 |
|
|
Roy
管理员
          專業島民
积分 4869
发帖 1633
注册 2002-12-10
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
以下是引用QB45在2003-10-13 19:22:14的发言:
我这里没有16*15的点阵字库,有的话,我可以试试,你能提供这个字库吗??
這個是et3中文系統的16*15(還是14*14呢?...)的点阵字库 打开附件
The following is a quote from QB45 on 2003-10-13 19:22:14:
I don't have a 16*15 dot matrix font here. If I did, I could try it. Can you provide this font?
This is a 16*15 (or is it 14*14?) dot matrix font of the et3 Chinese system Open the attachment
|

我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
 |
|
2003-10-14 00:00 |
|
|
Roy
管理员
          專業島民
积分 4869
发帖 1633
注册 2002-12-10
状态 离线
|
|
2003-10-14 00:00 |
|
|