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 04:26
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Problems with int 10h View 1,764 Replies 8
Original Poster Posted 2009-04-10 11:59 ·  中国 山东 青岛 电信
初级用户
Credits 33
Posts 13
Joined 2009-03-11 11:33
17-year member
UID 141009
Gender Male
Status Offline
(In pure DOS) After a program calls int 10h and outputs English characters on the screen, where is the location of this character library? Is it in the BIOS?

If now the UCDOS Chinese program is loaded, when outputting Chinese characters on the screen, what is the difference between calling int 10h and the previous pure DOS English output calling int 10h?

Thank you!
Floor 2 Posted 2009-04-10 23:07 ·  中国 广东 广州 电信
中级用户
★★
Credits 282
Posts 126
Joined 2006-05-17 22:29
20-year member
UID 55724
Status Offline
INT 10h的‘1101h功能可以读取显卡的字库地址


--------V-101101-----------------------------
INT 10 - 视频 - 文本模式字符生成 - 加载ROM单色图案(PS、EGA、VGA)
AX = 1101h
BL = 要加载的块
返回:无
注意:(另见AX=1100h)
此功能将导致模式设置,完全重置视频环境,但不清除视频缓冲区
“单色”图案的大小为8x14像素
另见:AX=1100h,AX=1102h,AX=1103h,AX=1104h,AX=1111h,AH=1Bh,AX=CD10h
另见:内存0040h:0084h
索引:文本模式;字体|文本模式;屏幕行数
--------V-101103-----------------------------
INT 10 - 视频 - 文本模式字符生成 - 设置块说明符(PS、EGA、VGA)
AX = 1103h
BL = 块说明符(见#00020)
返回:无
注意:(另见AX=1110h)
此功能允许双字符集同时出现在屏幕上
另见:AX=1100h,AX=1101h,AX=1102h,AX=1104h,AH=1Bh,AX=CD10h
另见:内存0040h:0084h
索引:文本模式;字体|文本模式;屏幕行数

块说明符的位域:
位(s) 描述 (表00020)
---EGA/MCGA---
0,1 由属性位3为0的字符选择的块
2,3 由属性位3为1的字符选择的块
---VGA---
0,1,4 由属性位3为0的字符选择的块
2,3,5 由属性位3为1的字符选择的块
--------V-101120-----------------------------
INT 10 - 视频 - 图形模式字符生成 - 设置用户8x8图形字符(PS、EGA、VGA)
AX = 1120h
ES:BP -> 用于INT 1F的用户表
返回:无
注意:此功能应在模式设置后立即调用;在其他时间调用结果不可预测
另见:AX=1121h,AX=1122h,AX=1123h,AX=1124h,AX=1129h,INT 1F“系统数据”
另见:INT 43“视频数据”
--------V-101130-----------------------------
INT 10 - 视频 - 获取字体信息(EGA、MCGA、VGA)
AX = 1130h
BH = 指针说明符
00h INT 1Fh指针
01h INT 43h指针
02h ROM 8x14字符字体指针
03h ROM 8x8双点字体指针
04h ROM 8x8双点字体(高128个字符)
05h ROM alpha备用(9x14)指针(EGA、VGA)
06h ROM 8x16字体(MCGA、VGA)
07h ROM备用9x16字体(仅VGA)(见#00021)
11h(UltraVision v2+)8x20字体(VGA)或8x19字体(自动同步EGA)
12h(UltraVision v2+)8x10字体(VGA)或8x11字体(自动同步EGA)
返回:ES:BP = 指定指针
CX = 屏幕上字体的每个字符的字节数(不是请求的字体!)
DL = 屏幕上最高的字符行
注意:对于UltraVision v2+,备用9xN字体在ES:BP+256N处跟随相应的8xN字体
错误:IBM EGA和一些其他EGA卡返回DL为屏幕上的行数,而不是最高行号(最高行号少1)
另见:AX=1100h,AX=1103h,AX=1120h,INT 1F“系统数据”,INT 43“视频数据”

备用字体表的格式:
偏移量 大小 描述 (表00021)
00h BYTE 要替换的字符(00h = 表结束)
01h N BYTEs 字符的图形数据,每行一个字节
人类存在的目的就是试图理解人类为何存在
Floor 3 Posted 2009-04-10 23:10 ·  中国 广东 广州 电信
中级用户
★★
Credits 282
Posts 126
Joined 2006-05-17 22:29
20-year member
UID 55724
Status Offline
UCDOS will replace the interrupt routine of int 10h. When the program calls int 10h to output text, it actually calls the routine of UCDOS. UCDOS analyzes the Chinese characters in the text and draws them on the screen.
人类存在的目的就是试图理解人类为何存在
Floor 4 Posted 2009-04-12 09:35 ·  中国 陕西 宝鸡 电信
初级用户
Credits 33
Posts 13
Joined 2009-03-11 11:33
17-year member
UID 141009
Gender Male
Status Offline
Thanks zyl910. It seems that the font library for the int10h call is located on the graphics card. Then, does DOS necessarily need to call int10h to output characters on the screen? For example, PC-DOS 2000.
Floor 5 Posted 2009-04-12 10:33 ·  中国 广东 广州 电信
中级用户
★★
Credits 282
Posts 126
Joined 2006-05-17 22:29
20-year member
UID 55724
Status Offline
There are two methods to output text on the screen -
1. int 10h
2. Directly write to the video memory of the text area

Chinese platforms such as UCDOS not only replace int 10h but also detect changes in the video memory of the text area and output Chinese characters according to the changes
人类存在的目的就是试图理解人类为何存在
Floor 6 Posted 2009-04-12 14:09 ·  中国 福建 厦门 电信
高级用户
★★★
Credits 741
Posts 366
Joined 2007-07-25 19:11
19-year member
UID 94024
Gender Male
Status Offline
Simply put, UCDOS is effective for both calling INT 10H to write to the screen and directly accessing the video memory (segment BXXX), because it monitors the text mode video memory using a timer interrupt. Precisely because of this, UCDOS is not suitable for use in control systems that require a timer interrupt and real-time systems with strict timing requirements (UCDOS has already occupied a relatively long timer interrupt time, which is prone to the problem of timer interrupt reentrancy).
Floor 7 Posted 2009-04-13 01:47 ·  中国 山东 青岛 电信
初级用户
Credits 33
Posts 13
Joined 2009-03-11 11:33
17-year member
UID 141009
Gender Male
Status Offline
Thanks again to zyl910. What you said about the second point "directly writing to the video memory of the text area" means that is the font library in the video memory of the text area? Can you explain it in more detail? I don't understand. Which functions does pcdos 2000 use to output English characters and Chinese characters after loading ucdos?

Netwinxp said that real-time systems are not suitable for using ucdos. Then what is generally used? I have installed a real-time system software on my pcdos 2000. After I load ucdos, I echo Chinese characters in autoexec.bat, and Chinese characters can be displayed on the screen. But the text characters in the real-time software (I changed the ASCII code of every two English letters to the ASCII code of one Chinese character, such as 4546 to b2be), but all corresponding on the screen are garbled. (Each Chinese character position is an L, so four Chinese characters are LLLL). Why is this?

Thanks
Floor 8 Posted 2009-04-13 08:53 ·  中国 广东 广州 电信
中级用户
★★
Credits 282
Posts 126
Joined 2006-05-17 22:29
20-year member
UID 55724
Status Offline
In order to make CPU operation convenient, the video memory (RAM) and the video card's BIOS (ROM) will be mapped to the system memory space. Generally:
The A0000h ~ AFFFFh of the system memory space: graphic video memory (RAM)
The B0000h ~ BFFFFh of the system memory space: text video memory (RAM)
The C0000h ~ C7FFFFh of the system memory space: video card's BIOS (ROM)

The character font of the video card is generally placed in the video card BIOS, but the specific address is only known by the video card BIOS, so the address of the video card's character font should be obtained using the 1101h function of int 10h

After loading ucdos, all text output is captured by ucdos, regardless of English or Chinese characters
人类存在的目的就是试图理解人类为何存在
Floor 9 Posted 2009-04-13 09:47 ·  中国 福建 厦门 电信
高级用户
★★★
Credits 741
Posts 366
Joined 2007-07-25 19:11
19-year member
UID 94024
Gender Male
Status Offline
The font library of the graphics card is placed in the BIOS of the graphics card, but this part of the space is not mapped to the BIOS segment of the main memory (many BIOSes of expansion cards will have part of them mapped to the memory ROM segment). For detailed technology, you can refer to the technology of the Great Wall 0520H hard font library.

***In fact, the motherboard BIOS will not only map part of it to the 1M ROM segment, but also map part of it to the memory segment close to 1G (mainly ACPI-related tables), and the same is true for PCI cards***

The graphics video memory is mapped to the A0000H segment only corresponding to VGA mode (and a small number of early SVGA, mainly TVGA). High-resolution modes are generally mapped to one or more small segments in D0000000~EFFFFFFF and each segment has multiple page depths (specific addresses can be seen according to the resources occupied by the graphics card). The specific amount depends on the value of AGPURE SIZE in the BIOS (the smaller this is set, the more available RAM space of 4G will be, but the page depth of the video memory will be deeper, which will slightly affect the display performance).

Simply put, the Chinese character capture of UCDOS is only valid for VGA text (and a small number of early SVGA text modes), and invalid for SVGA text modes; in addition, the text mode in UCDOS is actually a pseudo-text mode controlled by UCDOS. In fact, the real mode is already a graphics mode, so it is easy to have a bunch of flashing characters after exiting UCDOS. You need to do CLS to be clear.

[ Last edited by netwinxp on 2009-4-13 at 09:52 ]
Forum Jump: