功能:设置显示模式
入口参数:AH=00H
AL=显示模式
显示模式列表:
显示模式 显示模式属性
00H 40×25 16色 文本
01H 40×25 16色 文本
02H 80×25 16色 文本
04H 320×200 4色
05H 320×200 4色
06H 640×200 2色
07H 80×25 2色 文本
08H 160×200 16色
09H 320×200 16色
0AH 640×200 4色
0BH 保留
0CH 保留
0DH 320×200 16色
0EH 640×200 16色
0FH 640×350 2色(单色)
10H 640×350 4色
11H 640×480 2色
12H 640×480 16色
13H 320×200 256色
功能号01H
功能:设置光标形状
入口参数: AH=01H
CH低四位=光标的起始行
CL低四位=光标的终止行
出口参数: 无
功能号:02H
功能:用文本坐标下设置光标位置
入口参数: AH=02H
BH=显示页码
DH=行(Y坐标)
DL=列(X坐标)
出口参数: 无
功能号:03H
功能:在文本坐标下,读取光标各种信息
入口参数:AH=03H
BH=显示页码
出口参数:CH=光标的起始行
CL=光标的终止行
DH=行(Y坐标)
DL=列(X坐标)
功能号:04H
功能:获取当前状态和光笔位置
入口参数:AH=04H
出口参数:AH=00h—光笔未按下/未触发,01h—光笔已按下/已触发
BX=象素列(图形X坐标)
CH=象素行(图形Y坐标,显示模式:04H~06H)
CX=象素行(图形Y坐标,显示模式:0DH~10H)
DH=字符行(文本Y坐标)
DL=字符列(文本X坐标)
功能号:05H
功能:设置显示页,即选择活动的显示页
入口参数:AH=05H
AL=显示页
对于CGA、EGA、MCGA和VGA,其显示页如下表所列:
模式 页数 显示器类型
00H 01H 0~7 CGA、EGA、MCGA、VGA
02H 03H 0~3 CGA
02H 03H 0~7 EGA、MCGA、VGA
07H 0~7 EGA、VGA
0DH 0~7 EGA、VGA
0EH 0~3 EGA、VGA
0FH 0~1 EGA、VGA
10H 0~1 EGA、VGA
功能号:06H和07H
功能:初始化屏幕或滚屏
入口参数:AH=06H—向上滚屏,07H—向下滚屏
AL=滚动行数(0—清窗口)
BH=空白区域的缺省属性
(CH、CL)=窗口的左上角位置(Y坐标,X坐标)
(DH、DL)=窗口的右下角位置(Y坐标,X坐标)
出口参数: 无
功能号:08H
功能:读光标处的字符及其属性
入口参数:AH=08H
BH=显示页码
出口参数:AH=属性
AL=字符
功能号:09H
功能:在当前光标处按指定属性显示字符
入口参数:AH=09H
AL=字符
BH=显示页码
BL=属性(文本模式)或颜色(图形模式)
CX=重复输出字符的次数
出口参数:无
功能号:0AH
功能:在当前光标处按原有属性显示字符
入口参数:AH=0AH
AL=字符
BH=显示页码
BL=颜色(图形模式,仅适用于PCjr)
CX=重复输出字符的次数
出口参数:无
功能号:0BH
功能:设置调色板、背景色或边框
入口参数:AH=0BH
设置颜色:BH=00H,BL=颜色
选择调色板:BH=01H,BL=调色板(320×200、4种颜色的图形模式)
出口参数: 无
功能号:0CH
功能:写图形象素
入口参数:AH=0CH
AL=象素值
BH=页码
(CX、DX)=图形坐标列(X)、行(Y)
出口参数:无
功能号:0DH
功能描述:读图形象素
入口参数:AH=0DH
BH=页码
(CX、DX)=图形坐标列(X)、行(Y)
出口参数:AL=象素值
功能号:0EH
功能:在Teletype模式下显示字符
入口参数:AH=0EH
AL=字符
BH=页码
BL=前景色(图形模式)
出口参数: 无
功能号:0FH
功能:读取显示器模式
入口参数:AH=0FH
出口参数:AH=屏幕字符的列数
AL=显示模式(参见功能00H中的说明)
BH=页码
功能号:10H
功能描述:颜色中断。其子功能说明如下:
功能号 子功能名称 功能号 子功能名称
00H 设置调色板寄存器 01H 设置边框颜色
02H 设置调色板和边框 03H 触发闪烁/亮显位
07H 读取调色板寄存器 08H 读取边框颜色
09H 读取调色板和边框 10H 设置颜色寄存器
12H 设置颜色寄存器块 13H 设置颜色页状态
15H 读取颜色寄存器 17H 读取颜色寄存器块
1AH 读取颜色页状态 1BH 设置灰度值
功能号:11H
功能: 字体中断。其子功能说明如下:
子功能号 子功能名称
00H 装入用户字体和可编程控制器
10H 装入用户字体和可编程控制器
01H 装入8×14 ROM字体和可编程控制器
11H 装入8×14 ROM字体和可编程控制器
02H 装入8×8 ROM字体和可编程控制器
12H 装入8×8 ROM字体和可编程控制器
03H 设置块指示器
04H 装入8×16 ROM字体和可编程控制器
14H 装入8×16 ROM字体和可编程控制器
20H 设置INT 1Fh字体指针
21H 为用户字体设置INT 43h
22H 为8×14 ROM字体设置INT 43H
23H 为8×8 ROM字体设置INT 43H
24H 为8×16 ROM字体设置INT 43H
30H 读取字体信息
功能号:12H
功能:显示器的配置中断。其子功能说明如下:
功能号 功能名称
10H 读取配置信息
20H 选择屏幕打印
30H 设置扫描行
31H 允许/禁止装入缺省调色板
32H 允许/禁止显示
33H 允许/禁止灰度求和
34H 允许/禁止光标模拟
35H 切换活动显示
36H 允许/禁止屏幕刷新
功能号:13H
功能:在Teletype模式下显示字符串
入口参数:AH=13H
BH=页码
BL=属性(若AL=00H或01H)
CX=显示字符串长度
(DH、DL)=坐标(行、列)
ES:BP=显示字符串的地址 AL= 显示输出方式
0—字符串中只含显示字符,其显示属性在BL中。显示后,光标位置不变
1—字符串中只含显示字符,其显示属性在BL中。显示后,光标位置改变
2—字符串中含显示字符和显示属性。显示后,光标位置不变
3—字符串中含显示字符和显示属性。显示后,光标位置改变
出口参数: 无
功能号:1AH
功能:读取/设置显示组合编码,仅PS/2有效,在此从略
功能号:1BH
功能:读取功能/状态信息,仅PS/2有效,在此从略
功能号:1CH
功能:保存/恢复显示器状态,仅PS/2有效,在此从略
=====================================================================
INT 10h / AH = 00h - set video mode.
input:
AL = desired video mode.
These video modes are supported:
00h - Text mode 40x25, 16 colors, 8 pages.
03h - Text mode 80x25, 16 colors, 8 pages.
--------------------------------------------------------------------------------
INT 10h / AH = 01h - set text-mode cursor shape.
input:
CH = cursor start line (bits 0-4) and options (bits 5-7).
CL = bottom cursor line (bits 0-4).
When bits 6-5 of CH are set to 00, the cursor is visible, to hide a cursor set these bits to 01 (this CH value will hide a cursor: 28h - 00101000b). Bit 7 should always be zero.
--------------------------------------------------------------------------------
INT 10h / AH = 02h - set cursor position.
input:
DH = row.
DL = column.
BH = page number (0..7).
--------------------------------------------------------------------------------
INT 10h / AH = 03h - get cursor position and size.
input:
BH = page number.
return:
DH = row.
DL = column.
CH = cursor start line.
CL = cursor bottom line.
--------------------------------------------------------------------------------
INT 10h / AH = 05h - select active video page.
input:
AL = new page number (0..7).
the activated page is displayed.
--------------------------------------------------------------------------------
INT 10h / AH = 06h - scroll up window.
INT 10h / AH = 07h - scroll down window.
input:
AL = number of lines by which to scroll (00h = clear entire window).
BH = attribute used to write blank lines at bottom of window.
CH, CL = row, column of window's upper left corner.
DH, DL = row, column of window's lower right corner.
--------------------------------------------------------------------------------
INT 10h / AH = 08h - read character and attribute at cursor position.
input:
BH = page number.
return:
AH = attribute.
AL = character.
--------------------------------------------------------------------------------
INT 10h / AH = 09h - write character and attribute at cursor position.
input:
AL = character to display.
BH = page number.
BL = attribute.
CX = number of times to write character.
--------------------------------------------------------------------------------
INT 10h / AH = 0Ah - write character only at cursor position.
input:
AL = character to display.
BH = page number.
CX = number of times to write character.
--------------------------------------------------------------------------------
INT 10h / AH = 0Eh - teletype output.
input:
AL = character to write.
This functions displays a character on the screen, advancing the cursor and scrolling the screen as necessary. The printing is always done to current active page.
--------------------------------------------------------------------------------
INT 10h / AH = 13h - write string.
input:
AL = write mode:
bit 0: update cursor after writing;
bit 1: string contains attributes.
BH = page number.
BL = attribute if string contains only characters (bit 1 of AL is zero).
CX = number of characters in string (attributes are not counted).
DL,DH = column, row at which to start writing.
ES:BP points to string to be printed.
--------------------------------------------------------------------------------
INT 10h / AX = 1003h - toggle intensity/blinking.
input:
BL = write mode:
0: enable intensive colors.
1: enable blinking (not supported by emulator!).
BH = 0 (to avoid problems on some adapters).
=====================================================================
int 10h的‘1101h功能可以读取显卡的字库地址
CODE: [Copy to clipboard]
--------------------------------------------------------------------------------
--------V-101101-----------------------------
INT 10 - VIDEO - TEXT-MODE CHARGEN - LOAD ROM MONOCHROME PATTERNS (PS,EGA,VGA)
AX = 1101h
BL = block to load
Return: nothing
Notes: (see also AX=1100h)
This function will cause a mode set, completely resetting
the video environment, but without clearing the video buffer
the "monochrome" patters are 8x14 pixels in size
SeeAlso: AX=1100h,AX=1102h,AX=1103h,AX=1104h,AX=1111h,AH=1Bh,AX=CD10h
SeeAlso: MEM 0040h:0084h
Index: text mode;font|text mode;screen rows
--------V-101103-----------------------------
INT 10 - VIDEO - TEXT-MODE CHARGEN - SET BLOCK SPECIFIER (PS,EGA,VGA)
AX = 1103h
BL = block specifier (see #00020)
Return: nothing
Notes: (see also AX=1110h)
This function allows dual character sets to appear on screen
simultaneously
SeeAlso: AX=1100h,AX=1101h,AX=1102h,AX=1104h,AH=1Bh,AX=CD10h
SeeAlso: MEM 0040h:0084h
Index: text mode;font|text mode;screen rows
Bitfields for block specifier:
Bit(s) Description (Table 00020)
---EGA/MCGA---
0,1 block selected by characters with attribute bit 3 clear
2,3 block selected by characters with attribute bit 3 set
---VGA---
0,1,4 block selected by characters with attribute bit 3 clear
2,3,5 block selected by characters with attribute bit 3 set
--------V-101120-----------------------------
INT 10 - VIDEO - GRAPH-MODE CHARGEN - SET USER 8x8 GRAPHICS CHARS (PS,EGA,VGA)
AX = 1120h
ES:BP -> user table for INT 1F
Return: nothing
Note: this function is meant to be called immediately after a mode set;
results are unpredictable at other times
SeeAlso: AX=1121h,AX=1122h,AX=1123h,AX=1124h,AX=1129h,INT 1F"SYSTEM DATA"
SeeAlso: INT 43"VIDEO DATA"
--------V-101130-----------------------------
INT 10 - VIDEO - GET FONT INFORMATION (EGA, MCGA, VGA)
AX = 1130h
BH = pointer specifier
00h INT 1Fh pointer
01h INT 43h pointer
02h ROM 8x14 character font pointer
03h ROM 8x8 double dot font pointer
04h ROM 8x8 double dot font (high 128 characters)
05h ROM alpha alternate (9 by 14) pointer (EGA,VGA)
06h ROM 8x16 font (MCGA, VGA)
07h ROM alternate 9x16 font (VGA only) (see #00021)
11h (UltraVision v2+) 8x20 font (VGA) or 8x19 font (autosync EGA)
12h (UltraVision v2+) 8x10 font (VGA) or 8x11 font (autosync EGA)
Return: ES:BP = specified pointer
CX = bytes/character of on-screen font (not the requested font!)
DL = highest character row on screen
Note: for UltraVision v2+, the 9xN alternate fonts follow the corresponding
8xN font at ES:BP+256N
BUG: the IBM EGA and some other EGA cards return in DL the number of rows on
screen rather than the highest row number (which is one less).
SeeAlso: AX=1100h,AX=1103h,AX=1120h,INT 1F"SYSTEM DATA",INT 43"VIDEO DATA"
Format of alternate font table [array]:
Offset Size Description (Table 00021)
00h BYTE character to be replaced (00h = end of table)
01h N BYTEs graphics data for character, one byte per scan line