BIOS 级编程与图形绘制全解析
1. BIOS 级编程基础程序
在 BIOS 级编程中,有几个基础的程序过程值得关注,它们在处理光标移动、屏幕清空等操作时非常有用。
-
AdvanceCursor 过程
:该过程用于将光标向右移动指定的列数,且不会换行。它接收
CX作为要移动的列数,具体代码如下:
AdvanceCursor PROC
;
; Advances the cursor n columns to the right.
; (Cursor does not wrap around to the next line.)
; Receives: CX = number of columns
; Returns: nothing
;--------------------------------------------------
pusha
L1:
push
cx
; save loop counter
mov
ah,3
; get cursor position
mov
bh,0
; into DH, DL
int
10h
; changes CX register!
inc
dl
; increment column
mov
ah,2
; set cursor position
int
10h
pop
cx
; restore loop counter
loop
L1
; next column
popa
ret
AdvanceCursor ENDP
-
Gotoxy 过程
:此过程用于设置视频页面 0 上的光标位置,接收
DH和DL分别作为行和列的坐标,代码如下:
Gotoxy PROC
;
; Sets the cursor position on video page 0.
; Receives: DH,DL = row, column
; Returns: nothing
;---------------------------------------------------
pusha
mov
ah,2
; set cursor position
mov
bh,0
; video page 0
int
10h
popa
ret
Gotoxy ENDP
- Clrscr 过程 :该过程用于清空屏幕,并将光标定位到视频页面 0 的第 0 行第 0 列,代码如下:
Clrscr PROC
;
; Clears the screen (video page 0) and locates the
; cursor at row 0, column 0.
; Receives: nothing
; Returns: nothing
;-------------------------------------------------------
pusha
mov
ax,0600h
; scroll entire window up
mov
cx,0
; upper left corner (0,0)
mov
dx,184Fh
; lower right corner (24,79)
mov
bh,7
; normal attribute
int
10h
; call BIOS
mov
ah,2
; locate cursor at 0,0
mov
bh,0
; video page 0
mov
dx,0
; row 0, column 0
int
10h
popa
ret
Clrscr ENDP
2. INT 10h 图形绘制基础
INT 10h
是 BIOS 中用于视频服务的中断调用,在图形绘制方面有重要作用。在使用它绘制像素之前,需要将视频适配器设置为标准图形模式之一,不同的图形模式有不同的分辨率和颜色数量,如下表所示:
| Mode | Resolution (Columns X Rows, in Pixels) | Number of Colors |
| ---- | ---- | ---- |
| 6 | 640 × 200 | 2 |
| 0Dh | 320 × 200 | 16 |
| 0Eh | 640 × 200 | 16 |
| 0Fh | 640 × 350 | 2 |
| 10h | 640 × 350 | 16 |
| 11h | 640 × 480 | 2 |
| 12h | 640 × 480 | 16 |
| 13h | 320 × 200 | 256 |
| 6Ah | 800 × 600 | 16 |
2.1 INT 10h 像素相关函数
- Write Graphics Pixel (0Ch) :当视频控制器处于图形模式时,该函数用于在屏幕上绘制一个像素。不过,它的执行速度较慢,尤其是在绘制大量像素时。其接收参数和使用示例如下:
INT 10h Function 0Ch
Description
Write graphics pixel
Receives
AH = 0Ch
AL = pixel value
BH = video page
CX = x-coordinate
DX = y-coordinate
Returns
Nothing
Sample Call
mov ah,0Ch
mov al,pixelValue
mov bh,videoPage
mov cx,x_coord
mov dx,y_coord
int 10h
需要注意的是,视频显示必须处于图形模式,像素值和坐标范围取决于当前的图形模式。如果
AL
的第 7 位被设置,则新像素将与当前像素内容进行异或运算,可用于擦除像素。
-
Read Graphics Pixel (0Dh)
:该函数用于从屏幕上指定的行和列位置读取一个图形像素,并将像素值返回在
AL
中,使用示例如下:
INT 10h Function 0Dh
Description
Read graphics pixel
Receives
AH = 0Dh
BH = video page
CX = x-coordinate
DX = y-coordinate
Returns
AL = pixel value
Sample Call
mov ah,0Dh
mov bh,0 ; video page 0
mov cx,x_coord
mov dx,y_coord
int 10h
mov pixelValue,al
2.2 DrawLine 程序示例
DrawLine
程序通过
INT 10h
切换到图形模式,在屏幕上写入程序名称文本,并绘制一条水平直线。以下是完整的程序代码:
TITLE DrawLine Program (DrawLine.asm)
; This program draws text and a straight line in graphics mode.
INCLUDE Irvine16.inc
;------------ Video Mode Constants -------------------
Mode_06 = 6
; 640 X 200, 2 colors
Mode_0D = 0Dh
; 320 X 200, 16 colors
Mode_0E = 0Eh
; 640 X 200, 16 colors
Mode_0F = 0Fh
; 640 X 350, 2 colors
Mode_10 = 10h
; 640 X 350, 16 colors
Mode_11 = 11h
; 640 X 480, 2 colors
Mode_12 = 12h
; 640 X 480, 16 colors
Mode_13 = 13h
; 320 X 200, 256 colors
Mode_6A = 6Ah
; 800 X 600, 16 colors
.data
saveMode BYTE ?
; save the current video mode
currentX WORD 100
; column number (X-coordinate)
currentY WORD 100
; row number (Y-coordinate)
COLOR = 1001b
; line color (cyan)
progTitle BYTE "DrawLine.asm"
TITLE_ROW = 5
TITLE_COLUMN = 14
; When using a 2-color mode, set COLOR to 1 (white)
.code
main PROC
mov
ax,@data
mov
ds,ax
; Save the current video mode.
mov
ah,0Fh
int
10h
mov
saveMode,al
; Switch to a graphics mode.
mov
ah,0
; set video mode
mov
al,Mode_6A
int
10h
; Write the program name, as text.
mov
ax,SEG progTitle
; get segment of progTitle
mov
es,ax
; store in ES
mov
bp,OFFSET progTitle
mov
ah,13h
; function: write string
mov
al,0
; mode: only character codes
mov
bh,0
; video page 0
mov
bl,7
; attribute = normal
mov
cx,SIZEOF progTitle
; string length
mov
dh,TITLE_ROW
; row (in character cells)
mov
dl,TITLE_COLUMN
; column (in character cells)
int
10h
; Draw a straight line.
LineLength = 100
mov
dx,currentY
mov
cx,LineLength
; loop counter
L1:
push
cx
mov
ah,0Ch
; write pixel
mov
al,COLOR
; pixel color
mov
bh,0
; video page 0
mov
cx,currentX
int
10h
inc
currentX
;inc
color
; enable to see a multi-color line
pop
cx
Loop
L1
; Wait for a keystroke.
mov
ah,0
int
16h
; Restore the starting video mode.
mov
ah,0
; set video mode
mov
al,saveMode
; saved video mode
int
10h
exit
main ENDP
END main
通过修改
mov al,Mode_6A
这一行代码,可以尝试不同的图形模式。
2.3 Cartesian Coordinates 程序示例
该程序用于绘制笛卡尔坐标系的 X 轴和 Y 轴,交点位于屏幕坐标
X = 400
和
Y = 300
处。程序将视频适配器设置为
Mode 6Ah
(800 × 600,16 色),包含
DrawHorizLine
和
DrawVerticalLine
两个重要过程,以下是完整代码:
TITLE Cartesian Coordinates (Pixel2.asm)
; This program switches into 800 X 600 graphics mode and
; draws the X and Y axes of a Cartesian coordinate system.
; Switch to full-screen mode before running this program.
; Color constants are defined in Irvine16.inc.
INCLUDE Irvine16.inc
Mode_6A = 6Ah
; 800 X 600, 16 colors
X_axisY = 300
X_axisX = 50
X_axisLen = 700
Y_axisX = 400
Y_axisY = 30
Y_axisLen = 540
.data
saveMode BYTE ?
.code
main PROC
mov
ax,@data
mov
ds,ax
; Save the current video mode
mov
ah,0Fh
; get video mode
int
10h
mov
saveMode,al
; Switch to a graphics mode
mov
ah,0
; set video mode
mov
al,Mode_6A
; 800 X 600, 16 colors
int
10h
; Draw the X-axis
mov
cx,X_axisX
; X-coord of start of line
mov
dx,X_axisY
; Y-coord of start of line
mov
ax,X_axisLen
; length of line
mov
bl,white
; line color (see IRVINE16.inc)
call
DrawHorizLine
; draw the line now
; Draw the Y-axis
mov
cx,Y_axisX
; X-coord of start of line
mov
dx,Y_axisY
; Y-coord of start of line
mov
ax,Y_axisLen
; length of line
mov
bl,white
; line color
call
DrawVerticalLine
; draw the line now
; Wait for a keystroke
mov
ah,10h
; wait for key
int
16h
; Restore the starting video mode
mov
ah,0
; set video mode
mov
al,saveMode
; saved video mode
int
10h
exit
main endp
;------------------------------------------------------
DrawHorizLine PROC
;
; Draws a horizontal line starting at position X,Y with
; a given length and color.
; Receives: CX = X-coordinate, DX = Y-coordinate,
; AX = length, and BL = color
; Returns: nothing
;------------------------------------------------------
.data
currX WORD ?
.code
pusha
mov
currX,cx
; save X-coordinate
mov
cx,ax
; loop counter
DHL1:
push
cx
; save loop counter
mov
al,bl
; color
mov
ah,0Ch
; draw pixel
mov
bh,0
; video page
mov
cx,currX
; retrieve X-coordinate
int
10h
inc
currX
; move 1 pixel to the right
pop
cx
; restore loop counter
loop
DHL1
popa
ret
DrawHorizLine ENDP
;------------------------------------------------------
DrawVerticalLine PROC
;
; Draws a vertical line starting at position X,Y with
; a given length and color.
; Receives: CX = X-coordinate, DX = Y-coordinate,
; AX = length, BL = color
; Returns: nothing
;------------------------------------------------------
.data
currY WORD ?
.code
pusha
mov
currY,dx
; save Y-coordinate
mov
currX,cx
; save X-coordinate
mov
cx,ax
; loop counter
DVL1:
push
cx
; save loop counter
mov
al,bl
; color
mov
ah,0Ch
; function: draw pixel
mov
bh,0
; set video page
mov
cx,currX
; set X-coordinate
mov
dx,currY
; set Y-coordinate
int
10h
; draw the pixel
inc
currY
; move down 1 pixel
pop
cx
; restore loop counter
loop
DVL1
popa
ret
DrawVerticalLine ENDP
END main
3. 笛卡尔坐标与屏幕坐标的转换
笛卡尔坐标系中的点与 BIOS 图形系统使用的绝对坐标并不对应。屏幕坐标从屏幕左上角的
sx = 0, sy = 0
开始,
sx
值向右增长,
sy
值向下增长。可以使用以下公式将笛卡尔坐标
X, Y
转换为屏幕坐标
sx, sy
:
-
sx = (sOrigX + X)
-
sy = (sOrigY - Y)
其中,
sOrigX
和
sOrigY
是笛卡尔坐标系原点的屏幕坐标。例如,在
Cartesian Coordinates
程序中,直线交点位于
sOrigX = 400
和
sOrigY = 300
,将原点置于屏幕中央。以下是一些笛卡尔坐标转换为屏幕坐标的示例:
| Cartesian (X, Y) | (400 + X, 300 - Y) | Screen (sx, sy) |
| ---- | ---- | ---- |
| (0, 100) | (400 + 0, 300 - 100) | (400, 200) |
| (100, 0) | (400 + 100, 300 - 0) | (500, 300) |
| (0, -100) | (400 + 0, 300 - (-100)) | (400, 400) |
| (-100, 0) | (400 + (-100), 300 - 0) | (300, 300) |
4. 内存映射图形
使用
INT 10h
绘制像素除了最基本的图形输出外,速度非常慢,因为每次 BIOS 绘制像素时都会执行大量代码。下面介绍一种更高效的图形绘制方法,即通过输入 - 输出端口将图形数据直接写入视频 RAM(VRAM)。
4.1 Mode 13h:320 × 200,256 色
Mode 13h
是内存映射图形中最容易使用的模式。屏幕像素被映射为一个二维字节数组,每个像素占用 1 个字节。数组从屏幕左上角的像素开始,第一行有 320 个字节,偏移量为 320 的字节对应屏幕第二行的第一个像素,以此类推。最后一个字节对应屏幕右下角的像素。每个像素使用一个字节是因为该字节保存了 256 种不同颜色值的引用。
在
Mode 13h
中,使用
OUT
指令将像素和颜色值传输到视频适配器硬件。
OUT
指令将 16 位端口地址分配给
DX
,要发送到端口的值在
AL
、
AX
或
EAX
中。例如,视频调色板位于端口地址
3C8h
,以下指令将值
20h
发送到该端口:
mov
dx,3c8h
; port address
mov
al,20h
; value to be output
out
dx,al
; send value to port
4.2 颜色索引与 RGB 颜色
在
Mode 13h
中,每个颜色整数并不直接表示颜色,而是表示一个颜色表(调色板)中的索引。调色板中的每个条目由三个整数值(0 到 63)组成,即 RGB(红、绿、蓝)。调色板中的条目 0 控制屏幕的背景颜色。通过这种方案可以创建 262,144 种不同的颜色(64³),但在给定时间只能显示 256 种不同的颜色,不过程序可以在运行时修改调色板以改变显示颜色。现代操作系统如 Windows 和 Linux 提供(至少)24 位颜色,其中每个 RGB 值的范围是 0 到 255,可提供 256³(1670 万)种不同的颜色。
RGB 颜色基于光的加法混合,与混合液体颜料的减法方法相反。例如,通过将所有颜色强度级别保持为零可以创建黑色,将所有颜色级别设置为 63(最大值)可以创建白色。当三个级别相等时,会得到不同深浅的灰色,以下是一些颜色示例:
| Red | Green | Blue | Color |
| ---- | ---- | ---- | ---- |
| 0 | 0 | 0 | black |
| 20 | 20 | 20 | dark gray |
| 35 | 35 | 35 | medium gray |
| 50 | 50 | 50 | light gray |
| 63 | 63 | 63 | white |
| 63 | 0 | 0 | bright red |
| 10 | 0 | 0 | dark red |
| 30 | 0 | 0 | medium red |
| 63 | 40 | 40 | pink |
| 0 | 30 | 30 | cyan |
| 30 | 30 | 0 | yellow |
| 30 | 0 | 30 | magenta |
| 40 | 0 | 63 | lavender |
4.3 Memory-Mapped Graphics 程序示例
Memory-Mapped Graphics
程序使用直接内存映射在
Mode 13h
下在屏幕上绘制一行 10 个像素。主程序调用了设置视频模式、设置屏幕背景颜色、绘制一些彩色像素以及恢复视频适配器初始模式的过程。以下是完整的程序代码:
; Memory Mapped Graphics, Mode 13 (Mode13.asm)
INCLUDE Irvine16.inc
VIDEO_PALLETE_PORT = 3C8h
COLOR_SELECTION_PORT = 3C9h
COLOR_INDEX = 1
PALLETE_INDEX_BACKGROUND = 0
SET_VIDEO_MODE = 0
GET_VIDEO_MODE = 0Fh
VIDE0_SEGMENT = 0A000h
WAIT_FOR_KEYSTROKE = 10h
MODE_13 = 13h
.data
saveMode BYTE ?
; saved video mode
xVal WORD ?
; x-coordinate
yVal WORD ?
; y-coordinate
msg BYTE "Welcome to Mode 13!",0
.code
main PROC
mov
ax,@data
mov
ds,ax
call
SetVideoMode
call
SetScreenBackground
; Display a greeting message.
mov
edx,OFFSET msg
call
WriteString
call
Draw_Some_Pixels
call
RestoreVideoMode
exit
main ENDP
;------------------------------------------------
SetScreenBackground PROC
;
; Sets the screen's background color. Video
; palette index 0 is the background color.
;------------------------------------------------
mov
dx,VIDEO_PALLETE_PORT
mov
al,PALLETE_INDEX_BACKGROUND
out
dx,al
; Set the screen background color to dark blue.
mov
dx,COLOR_SELECTION_PORT
mov
al,0
; red
out
dx,al
mov
al,0
; green
out
dx,al
mov
al,35
; blue (intensity 35/63)
out
dx,al
ret
SetScreenBackground endp
;-----------------------------------------------
SetVideoMode PROC
;
; Saves the current video mode, switches to a
; new mode, and points ES to the video segment.
;-----------------------------------------------
mov
ah,GET_VIDEO_MODE
int
10h
mov
saveMode,al
; save it
mov
ah,SET_VIDEO_MODE
mov
al,MODE_13
; to mode 13h
int
10h
push
VIDE0_SEGMENT
; video segment address
pop
es
; ES points to video segment
ret
SetVideoMode ENDP
;---------------------------------------------
RestoreVideoMode PROC
;
; Waits for a key to be pressed and restores
; the video mode to its original value.
;----------------------------------------------
mov
ah,WAIT_FOR_KEYSTROKE
int
16h
mov
ah,SET_VIDEO_MODE
; reset video mode
mov
al,saveMode
; to saved mode
int
10h
ret
RestoreVideoMode ENDP
;-----------------------------------------------
Draw_Some_Pixels PROC
总结
通过上述内容,我们详细介绍了 BIOS 级编程中的基础程序,如光标移动和屏幕清空过程,以及使用
INT 10h
进行图形绘制的方法,包括像素的读写、不同图形模式的设置和使用,还有笛卡尔坐标与屏幕坐标的转换。同时,还介绍了更高效的内存映射图形方法,特别是
Mode 13h
模式下的颜色索引和 RGB 颜色的使用。这些知识对于深入理解计算机图形编程和 BIOS 级操作具有重要意义。
展望
在未来的图形编程中,可以进一步探索更复杂的图形算法和技术,如使用内存映射图形实现动画效果、绘制更复杂的图形形状等。同时,结合现代操作系统的特性,优化图形绘制的性能和用户体验。
流程图示例
graph TD;
A[开始] --> B[保存当前视频模式];
B --> C[切换到图形模式];
C --> D[写入程序名称文本];
D --> E[绘制直线];
E --> F[等待按键];
F --> G[恢复初始视频模式];
G --> H[结束];
以上就是关于 BIOS 级编程与图形绘制的详细介绍,希望对大家有所帮助。
BIOS 级编程与图形绘制全解析
5. 内存映射图形程序详细分析
上一部分介绍了
Memory-Mapped Graphics
程序的整体框架,下面对其中的各个过程进行详细分析。
5.1 SetVideoMode 过程
该过程用于保存当前视频模式,切换到新的视频模式(
Mode 13h
),并将
ES
指向视频段。具体代码如下:
;-----------------------------------------------
SetVideoMode PROC
;
; Saves the current video mode, switches to a
; new mode, and points ES to the video segment.
;-----------------------------------------------
mov
ah,GET_VIDEO_MODE
int
10h
mov
saveMode,al
; save it
mov
ah,SET_VIDEO_MODE
mov
al,MODE_13
; to mode 13h
int
10h
push
VIDE0_SEGMENT
; video segment address
pop
es
; ES points to video segment
ret
SetVideoMode ENDP
操作步骤如下:
1. 使用
INT 10h
功能号
0Fh
获取当前视频模式,并将其保存到
saveMode
变量中。
2. 使用
INT 10h
功能号
0
将视频模式切换到
Mode 13h
。
3. 将视频段地址
0A000h
压入栈中,然后弹出到
ES
寄存器,使
ES
指向视频段。
5.2 SetScreenBackground 过程
此过程用于设置屏幕的背景颜色,通过修改调色板的索引 0 来实现。代码如下:
;------------------------------------------------
SetScreenBackground PROC
;
; Sets the screen's background color. Video
; palette index 0 is the background color.
;------------------------------------------------
mov
dx,VIDEO_PALLETE_PORT
mov
al,PALLETE_INDEX_BACKGROUND
out
dx,al
; Set the screen background color to dark blue.
mov
dx,COLOR_SELECTION_PORT
mov
al,0
; red
out
dx,al
mov
al,0
; green
out
dx,al
mov
al,35
; blue (intensity 35/63)
out
dx,al
ret
SetScreenBackground endp
操作步骤如下:
1. 将视频调色板端口地址
3C8h
赋给
DX
,将调色板索引 0 赋给
AL
,使用
OUT
指令将索引 0 发送到调色板端口,选择要修改的调色板条目。
2. 将颜色选择端口地址
3C9h
赋给
DX
,依次将红色、绿色和蓝色的强度值(这里设置为暗蓝色)发送到该端口。
5.3 Draw_Some_Pixels 过程(待完善)
虽然原代码中
Draw_Some_Pixels
过程没有给出完整实现,但我们可以推测其功能是在屏幕上绘制一些像素。一般来说,在
Mode 13h
下,可以通过计算像素在视频 RAM 中的偏移地址,直接将颜色值写入该地址来绘制像素。以下是一个简单的示例:
;-----------------------------------------------
Draw_Some_Pixels PROC
mov cx, 10 ; 绘制 10 个像素
mov dx, 0 ; 起始行
mov bx, 0 ; 起始列
DrawLoop:
mov ax, dx
mul WORD PTR 320 ; 计算行偏移
add ax, bx ; 加上列偏移
mov es:[ax], COLOR_INDEX ; 将颜色索引写入视频 RAM
inc bx ; 列偏移加 1
loop DrawLoop
ret
Draw_Some_Pixels ENDP
操作步骤如下:
1. 初始化循环计数器
CX
为 10,表示要绘制 10 个像素。
2. 初始化行偏移
DX
和列偏移
BX
为 0。
3. 在循环中,计算当前像素在视频 RAM 中的偏移地址:先将行号乘以每行的像素数(320),再加上列号。
4. 将颜色索引
COLOR_INDEX
写入计算得到的偏移地址。
5. 列偏移加 1,继续循环直到绘制完 10 个像素。
5.4 RestoreVideoMode 过程
该过程用于等待用户按键,然后将视频模式恢复到初始值。代码如下:
;---------------------------------------------
RestoreVideoMode PROC
;
; Waits for a key to be pressed and restores
; the video mode to its original value.
;----------------------------------------------
mov
ah,WAIT_FOR_KEYSTROKE
int
16h
mov
ah,SET_VIDEO_MODE
; reset video mode
mov
al,saveMode
; to saved mode
int
10h
ret
RestoreVideoMode ENDP
操作步骤如下:
1. 使用
INT 16h
功能号
10h
等待用户按键。
2. 使用
INT 10h
功能号
0
将视频模式恢复到之前保存的
saveMode
。
6. 常见问题解答
为了帮助大家更好地理解和应用上述知识,下面列出一些常见问题及解答。
| 问题 | 解答 |
|---|---|
| 如何选择合适的视频模式? |
根据需要的分辨率和颜色数量来选择。如果需要高分辨率和多种颜色,可以选择
Mode 6Ah
(800 × 600,16 色);如果对颜色要求不高,且希望简单处理,可以选择
Mode 13h
(320 × 200,256 色)。
|
使用
INT 10h
绘制像素速度慢怎么办?
|
可以使用内存映射图形的方法,直接将图形数据写入视频 RAM,如在
Mode 13h
下操作,能显著提高绘制速度。
|
| 如何修改屏幕的背景颜色? |
在
Mode 13h
下,可以通过修改调色板的索引 0 来设置背景颜色。先将调色板索引 0 发送到端口
3C8h
,然后依次将 RGB 颜色值发送到端口
3C9h
。
|
| 笛卡尔坐标与屏幕坐标转换有什么实际应用? | 在绘制笛卡尔坐标系相关图形时,需要将笛卡尔坐标转换为屏幕坐标。例如,绘制函数图像、物理模拟中的坐标映射等。 |
7. 总结与回顾
本文全面介绍了 BIOS 级编程与图形绘制的相关知识,包括以下几个方面:
1.
BIOS 级编程基础程序
:如
AdvanceCursor
、
Gotoxy
和
Clrscr
等过程,用于处理光标移动和屏幕清空等操作。
2.
INT 10h 图形绘制
:介绍了
INT 10h
的像素相关函数(
0Ch
和
0Dh
),不同图形模式的设置和使用,以及
DrawLine
和
Cartesian Coordinates
等程序示例。
3.
笛卡尔坐标与屏幕坐标转换
:给出了转换公式,并通过示例展示了如何将笛卡尔坐标转换为屏幕坐标。
4.
内存映射图形
:重点介绍了
Mode 13h
模式下的内存映射图形方法,包括颜色索引、RGB 颜色和
Memory-Mapped Graphics
程序示例。
通过掌握这些知识,我们可以更深入地理解计算机图形编程的底层原理,实现更高效、更复杂的图形绘制。
8. 流程图示例
graph TD;
A[开始] --> B[SetVideoMode];
B --> C[SetScreenBackground];
C --> D[Draw_Some_Pixels];
D --> E[RestoreVideoMode];
E --> F[结束];
这个流程图展示了
Memory-Mapped Graphics
程序的主要执行流程,从设置视频模式开始,依次进行屏幕背景设置、像素绘制,最后恢复视频模式。
希望本文能为大家在 BIOS 级编程和图形绘制方面提供有价值的参考,大家可以根据这些知识进行更多的实践和探索。
超级会员免费看
3

被折叠的 条评论
为什么被折叠?



