With BIOS interrupt 13 AH = 00 we're ably to change the current screen resolution (See below). Al (hex) video mode
0
1
2
3
4
5
6
7
...
F
10
11
12
text 40 x 25 16 grey
text 40 x 25 16 color
text 80 x 25 16 grey
text 80 x 25 16 color
graph (CGA) 320 x 200 color
graph (CGA) 320 x 200 black / white
graph (CGA) 640 x 200 black / white
text 80 x 25 black / white (MDA, Hercules)
...
graph (EGA,VGA) 640x350 grey
graph (EGA,VGA) 640x350 16 colors
graph (VGA) 2 colors
graph (VGA) 16 colors
In the next paragraphs we'll discuss meanly the standard VGA resolution (12h) These days most VGA-boards has "Super VGA" resolutions, in the next table you'll find the information to change to a "VESA Super VGA"
然后我们来做个小实验
第一个文件:
.MODEL SMALL
.CODE
start:
mov ax,12h ;VGA mode
int 10h ;640 x 480 16 colors.
mov ax,0A000h
mov es,ax ;ES points to the video memory.
mov dx,03C4h ;dx = indexregister
mov ax,0F02h ;INDEX = MASK MAP,
out dx,ax ;write all the bitplanes.
mov di,0 ;DI pointer in the video memory.
mov cx,38400 ;(640 * 480)/8 = 38400
mov ax,0AAh ;write to every pixel.
rep stosb ;fill the screen
mov ax,4c00h ;go back
int 21h ; to DOS.
END start
目的是在vga 的 16色模式下填满屏幕
第二个小程序
是在屏幕中写一行字
“汇编语言(第三版)王爽著(实验十)编写子程序”
第三个小程序很短
.MODEL SMALL
.CODE
start:
mov ax,3h ;
int 10h ;
mov ax,4c00h ;go back
int 21h ; to DOS.
END start
切回文字模式
那么测试结果:
dosxbox默认可以运行2.
当运行了1以后,屏幕切了模式,无法运行2,显示字。这时候再运行3,再运行2,就可以显示了。
0
1
2
3
4
5
6
7
...
F
10
11
12
text 40 x 25 16 grey
text 40 x 25 16 color
text 80 x 25 16 grey
text 80 x 25 16 color
graph (CGA) 320 x 200 color
graph (CGA) 320 x 200 black / white
graph (CGA) 640 x 200 black / white
text 80 x 25 black / white (MDA, Hercules)
...
graph (EGA,VGA) 640x350 grey
graph (EGA,VGA) 640x350 16 colors
graph (VGA) 2 colors
graph (VGA) 16 colors
In the next paragraphs we'll discuss meanly the standard VGA resolution (12h) These days most VGA-boards has "Super VGA" resolutions, in the next table you'll find the information to change to a "VESA Super VGA"
然后我们来做个小实验
第一个文件:
.MODEL SMALL
.CODE
start:
mov ax,12h ;VGA mode
int 10h ;640 x 480 16 colors.
mov ax,0A000h
mov es,ax ;ES points to the video memory.
mov dx,03C4h ;dx = indexregister
mov ax,0F02h ;INDEX = MASK MAP,
out dx,ax ;write all the bitplanes.
mov di,0 ;DI pointer in the video memory.
mov cx,38400 ;(640 * 480)/8 = 38400
mov ax,0AAh ;write to every pixel.
rep stosb ;fill the screen
mov ax,4c00h ;go back
int 21h ; to DOS.
END start
目的是在vga 的 16色模式下填满屏幕
第二个小程序
是在屏幕中写一行字
“汇编语言(第三版)王爽著(实验十)编写子程序”
第三个小程序很短
.MODEL SMALL
.CODE
start:
mov ax,3h ;
int 10h ;
mov ax,4c00h ;go back
int 21h ; to DOS.
END start
切回文字模式
那么测试结果:
dosxbox默认可以运行2.
当运行了1以后,屏幕切了模式,无法运行2,显示字。这时候再运行3,再运行2,就可以显示了。