-=-=
тестит только на более 256 цветов
-=-=
Код
Var
yes :byte;
no :byte;
vesa_r:word;
lo :byte;
lo1 :byte;
Procedure GotoXY(x,y:Byte);assembler;
asm
mov ah,02
mov bh,0
mov dl,x
mov dh,y
int 10h
end;
Procedure WaitKey;assembler;
asm
mov ah,0
int 16h
mov ax,3
int 10h
end;
Procedure InitVesa(sc:word);assembler;
asm
mov ax,0a000h
mov es,ax
mov ax,4f02h
mov bx,sc
int 10h
end;
Procedure TestVesaYes;assembler;
label we,test_v,ok_vesa,no_vesa,cor,m,m1,m2;
asm
test_v:
cmp ax,004fh
jz ok_vesa
jmp no_vesa
ok_vesa:
mov bx,60000
mov ax,0f000h
mov es:[bx],ax
inc yes
jmp we
no_vesa:
inc no
we:
end;
BEGIN
vesa_r:=$10d;
for lo:=1 to 14 do begin
InitVesa(vesa_r);
TestVesaYes;
if yes=1 then begin
Write('Yes Graphic VESA this mode= ',vesa_r,'decimal');
gotoxy(2,2);
write('mov ax,4f02h');
gotoXY(2,3);
write('mov bx,',vesa_r);
gotoXY(2,4);
write('int 10h');
WaitKey;
yes:=0;
end;
if no=1 then begin
Write('No graphic VESA this mode= ',vesa_r,'decimal');
gotoxy(2,4);
write('mov ax,4f02h');
gotoXY(2,5);
write('mov bx,',vesa_r);
gotoXY(2,6);
write('int 10h');
WaitKey;
no:=0;
end;
asm
add vesa_r,01h
end;
end;
END.
yes :byte;
no :byte;
vesa_r:word;
lo :byte;
lo1 :byte;
Procedure GotoXY(x,y:Byte);assembler;
asm
mov ah,02
mov bh,0
mov dl,x
mov dh,y
int 10h
end;
Procedure WaitKey;assembler;
asm
mov ah,0
int 16h
mov ax,3
int 10h
end;
Procedure InitVesa(sc:word);assembler;
asm
mov ax,0a000h
mov es,ax
mov ax,4f02h
mov bx,sc
int 10h
end;
Procedure TestVesaYes;assembler;
label we,test_v,ok_vesa,no_vesa,cor,m,m1,m2;
asm
test_v:
cmp ax,004fh
jz ok_vesa
jmp no_vesa
ok_vesa:
mov bx,60000
mov ax,0f000h
mov es:[bx],ax
inc yes
jmp we
no_vesa:
inc no
we:
end;
BEGIN
vesa_r:=$10d;
for lo:=1 to 14 do begin
InitVesa(vesa_r);
TestVesaYes;
if yes=1 then begin
Write('Yes Graphic VESA this mode= ',vesa_r,'decimal');
gotoxy(2,2);
write('mov ax,4f02h');
gotoXY(2,3);
write('mov bx,',vesa_r);
gotoXY(2,4);
write('int 10h');
WaitKey;
yes:=0;
end;
if no=1 then begin
Write('No graphic VESA this mode= ',vesa_r,'decimal');
gotoxy(2,4);
write('mov ax,4f02h');
gotoXY(2,5);
write('mov bx,',vesa_r);
gotoXY(2,6);
write('int 10h');
WaitKey;
no:=0;
end;
asm
add vesa_r,01h
end;
end;
END.