Files
templates/LABV11.CPP
2024-09-10 22:24:24 +03:00

41 lines
724 B
C++
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* Лабораторная работа 11
Видеоадаптер, графические режимы sVGA
*/
#include <dos.h>
#include <mem.h>
#include <conio.h>
void set_mode(int mode)
{
asm{
mov ax,0x4f02;
mov bx,mode ;
int 0x10;
}
}
void main(void)
{
set_mode(0x0112);
unsigned char c=0;
for (int i=2; i<640*4;i+=4)
{
asm {
mov ax,0xa000;
mov es,ax;
mov si,i
mov bh,c
mov bl,c
mov es:[si],bl
}
c++;
}
getch();
set_mode(0x3);
}
// Задание
//Определите в каком порядке кодируются цвета в 111 и 112 режимах
//Напишите программу вывода полутонового клина на Асс