中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-17 09:34
47,813 主题排行 / 349,904 发帖 / 今日 1 篇 / 48,259 会员排行
DOS疑难解答 & 问题讨论 (解答室) » (已结)DOS显示多少行多少列以及字符、字母和汉字的关系
可打印版本  1,322 / 5
第1楼 F60 发表于 2005-08-12 13:50
初级用户 发帖 15 积分 31
(已结)DOS显示多少行多少列以及字符、字母和汉字的关系
一个字符是一个 英文字母吗?

一个汉字是两个字符吗?

---------- Edited by willsort 18:54 2005-8-13 ---------
字符、字母和汉字的关系见6楼
屏幕的行列数与显示模式相关,见5楼和6楼
---------- Edited by willsort 18:54 2005-8-13 ----------


[ Last edited by willsort on 2005-8-13 at 19:06 ]
第2楼 GOTOmsdos 发表于 2005-08-12 13:54
铂金会员 发帖 1,827 积分 5,154
DOS显示25行80列
一个字符是包括 英文字母和符号
一个汉字占两个字符
第3楼 F60 发表于 2005-08-12 14:37
初级用户 发帖 15 积分 31
谢谢~~
第4楼 JonePeng 发表于 2005-08-12 15:49
金牌会员 发帖 1,883 积分 4,562 来自 广东广州
字符除了字母和符号以外,还有数字以及32个控制符。
第5楼 fdsiuha 发表于 2005-08-12 21:44
高级用户 发帖 302 积分 587
半角英文字符,确实是ASCII中所定义的。编码0-255,占1个字节(8位=2^8=256)的空间。
对于一个汉字字符来说,不仅字符点阵捉襟见肘,而且编码也是远远不够的,所以汉字采用了两个字节来编码一个汉字,两个ASCII大小的点阵组成一个汉字图形点阵的方式。所以可以说汉字(所有全角字符)确实可以称为双字节字符。

另外的显示模式的问题,一般而言DOS确实使用25*80(ASCII)的显示模式,这种显示模式是早期CGA所支持,但是这个是可以变化的,分两种情况。
1 是汉字操作系统,启动后ASCII字体与之前有不同,可以看出屏幕在显示正常部分以外下方还多了几行。这是一种情况。
2 使用MODE命令显示模式,具体的使用方法可以参考DOS命令手册。这种情况属于调用BIOS的0x0A号的标准字符显示模式,对于一般常见的VESA显卡,我们不仅可以获得早期的40*25的模式,而且可以使用更高的132*25的VESA字符模式。(另外要说明一点,如果花屏--DOS下的状况--可以使用MODE 80命令,恢复正常80*25的显示模式,有的时候退出汉字系统的时候需要使用到)

[ Last edited by fdsiuha on 2005-8-13 at 20:36 ]
第6楼 willsort 发表于 2005-08-13 18:23
元老会员 发帖 1,512 积分 4,432
Re F60:

  字符代表屏幕上可显示的符号,它不仅可以是一个英文字母,也可以数字、标点和其他键盘上的可打印字符,它还可以是一个中文字,一个阿拉伯字母或者任意的一个多国语言符号,甚至它可以是一个图形(当然,它需要有对应的编码与字模)。

  一个汉字是一个字符,只是在很多汉字编码(例如GB 2312)中它占用两个字节,它通常在DOS屏幕显示占用两个英文字符的位置,所以很多材料中近似的把双字节编码的字符看作两个“字符”。在Windows或其它新型的操作环境和应用程序中,汉字都已作为一个字符看待,比如编程语言VB或者CMD命令set。

Re fdsiuha:

  赞同你的见解,现补充一篇Qbasic关于屏幕显示模式的文档:

------------------------------------------------------------------------------
The following table summarizes screen modes:

----------MDPA, CGA, Hercules, Olivetti, EGA, VGA, or MCGA Adapters-----------
SCREEN 0: Text mode only
- 40 x 25, 40 x 43, 40 x 50, 80 x 25, 80 x 43, or 80 x 50 text format,
8 x 8 character box (8 x 14, 9 x 14, or 9 x 16 with EGA or VGA)
- 16 colors assigned to any of 16 attributes (with CGA or EGA)
- 64 colors assigned to any of 16 attributes (with EGA or VGA)
- Depending on the text resolution and adapter, 8 video memory pages
(0-7), 4 pages (0-3), 2 pages (0-1), or 1 page (0)

-----------------------CGA, EGA, VGA, or MCGA Adapters------------------------
SCREEN 1: 320 x 200 graphics
- 40 x 25 text format, 8 x 8 character box
- 16 background colors and one of two sets of 3 foreground colors
assigned using COLOR statement with CGA
- 16 colors assigned to 4 attributes with EGA or VGA
- 1 video memory page (0)
SCREEN 2: 640 x 200 graphics
- 80 x 25 text format, 8 x 8 character box
- 16 colors assigned to 2 attributes with EGA or VGA
- 1 video memory page (0)

---------------------Hercules, Olivetti, or AT&T Adapters---------------------
SCREEN 3: Hercules adapter required, monochrome monitor only
- 720 x 348 graphics
- 80 x 25 text format, 9 x 14 character box
- Usually 2 video memory pages (0-1); 1 page (0) if a second color
display adapter is installed
- PALETTE statement not supported
- Invoke the Hercules driver MSHERC.COM before using screen mode 3
SCREEN 4:
- Supports Olivetti Personal Computers models M24, M240, M28, M280,
M380, M380/C, and M380/T and AT&T Personal Computers 6300 series
- 640 x 400 graphics
- 80 x 25 text format, 8 x 16 character box
- 1 of 16 colors assigned as the foreground color (selected by the
COLOR statement); background is fixed at black
- 1 video memory page (0)
- PALETTE statement not supported

-----------------------------EGA or VGA Adapters------------------------------
SCREEN 7: 320 x 200 graphics
- 40 x 25 text format, 8 x 8 character box
- Assignment of 16 colors to any of 16 attributes
- If 64K EGA adapter memory, 2 video memory pages (0-1); otherwise,
8 pages (0-7)
SCREEN 8: 640 x 200 graphics
- 80 x 25 text format, 8 x 8 character box
- Assignment of 16 colors to any of 16 attributes
- If 64K EGA adapter memory, 1 video memory page (0); otherwise,
4 pages (0-3)
SCREEN 9: 640 x 350 graphics
- 80 x 25 or 80 x 43 text format, 8 x 14 or 8 x 8 character box
- 16 colors assigned to 4 attributes (64K adapter memory), or
64 colors assigned to 16 attributes (more than 64K adapter memory)
- If 64K EGA adapter memory, 1 video memory page (0); otherwise,
2 pages (0-1)

-----------------EGA or VGA Adapters, Monochrome Monitor Only-----------------
SCREEN 10: 640 x 350 graphics, monochrome monitor only
- 80 x 25 or 80 x 43 text format, 8 x 14 or 8 x 8 character box
- Up to 9 pseudocolors assigned to 4 attributes
- 2 video memory pages (0-1), 256K adapter memory required

-----------------------------VGA or MCGA Adapters-----------------------------
Screen 11 (VGA or MCGA)
- 640 x 480 graphics
- 80 x 30 or 80 x 60 text format, 8 x 16 or 8 x 8 character box
- Assignment of up to 256K colors to 2 attributes
- 1 video memory page (0)
Screen 12 (VGA)
- 640 x 480 graphics
- 80 x 30 or 80 x 60 text format, 8 x 16 or 8 x 8 character box
- Assignment of up to 256K colors to 16 attributes
- 1 video memory page (0)
Screen 13 (VGA or MCGA)
- 320 x 200 graphics
- 40 x 25 text format, 8 x 8 character box
- Assignment of up to 256K colors to 256 attributes
- 1 video memory page (0)


[ Last edited by willsort on 2005-8-13 at 19:04 ]
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023