, :
1 /, 2 , :
CGA mode 6 640*200
2 /, 4 , :
CGA mode 4 320*200
4 /, 16 , :
EGA mode 0Dh 320*200
EGA mode 0Eh 640*200
EGA mode 10h 640*350
VGA mode 12h 640*480
VESA mode 102h 800*600
VESA mode 104h 1024*768
VESA mode 106h 1280*1024
8 /, 256 , :
VGA mode 13h 320*200
VESA mode 100h 640*400
VESA mode 101h 640*480
VESA mode 103h 800*600
VESA mode 105h 1024*768
16 /, 65536 , ( 32768- ):
VESA mode 111h 640*480
VESA mode 114h 800*600
24 /, 16777216 , :
VESA mode 112h 640*480
4- (plane), .., (x,y), ,
Address = LineLength*y + Bits*x/8
LineLength - , , Bits - , .
CGA 4 6, .
4 . . , x,y
Address = LineLength*y + x/8
LineLength - , .
x,y 16- . .
CGA, EGA VGA BIOS. BIOS.
Pixel$
VGA Pixel$ . , , .. BIOS.
Pixel$ proc
; VGA.
; : x AX, y BX, CX
; :
mov DX,BX; y
xchg AX,CX;CX - x, AL -
sub BH,BH;0
mov AH,0Ch;
int 10h
ret
Pixel$ endp
VGA - 13h 256 320*200. 0...255 , , . VGApxl$ . , .
;:
VGA_seg dw 0A000h; VGA
VGApxl$ proc
; VGA 13h.
; : x AX, y BX, CX
; : AX BX
xchg BH,BL; y 256, BL=0
add AX,BX;AX = x+256y
shr BX,1; 256y
shr BX,1;BX = 256y/4 = 64y
add BX,AX;BX = x+320y
mov AX,ES; ES
mov ES,VGA_seg; VGA
mov ES:[BX],CL;
mov ES,AX; ES
ret
VGApxl$ endp