360480 , 256


, , 256 360480 . E256HRES, 360480 ( 4.18):

4.18. E256HRES.C

#include <conio.h>

#include <stdlib.h>

#include <stdio.h>

#include <dos.h>

#include "vga_new.h"

//

void main( void );

void SetVideoMode(unsigned char);

// EVGAH.ASM

void __pascal __far Set360x480Mode( void );

void __pascal __far FullScrH(unsigned char);

void __pascal __far

WritePixelH(unsigned, unsigned, unsigned char);

unsigned char __pascal __far

ReadPixelH(unsigned, unsigned, unsigned char);

//

void main( void ){

unsigned i;

char ch = 13;

// 360480 , 256

Set360x480Mode();

// VGA

// LoadVGA256();

for(i = 0; i < 480; i++)

WritePixelH(180, (unsigned) i, (unsigned char)(i%256));

for(i = 0; i < 360; i++)

WritePixelH((unsigned) i, 240, (unsigned char)(i%256));

ch = getch();

if( ch == 27 ) exit(1);

for(i = 0; i < 360; i++)

WritePixelH((unsigned) i, (unsigned) i,

(unsigned char) (i % 256) );

ch = getch();

for(i = 0; ((i < 256) && (ch != 27)); i++) {

FullScrH( (unsigned char) i );

ch = getch();

}

//

SetVideoMode(3);

printf("\n (C) Frolov G.V., 1992\n\n");

}

//===========================================================

// ,

// vmode

//===========================================================

void SetVideoMode( unsigned char vmode ) {