Code:
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<stdlib.h>
void savevdo(int sr,int er,int sc,int ec,int *imager);
void showvdo(int sr,int er,int sc,int ec,int imager[]);
int *buffer;
main()
{
printf("hello");
getch();
savevdo(1,1,15,15,buffer);
clrscr();
showvdo(1,1,15,15,buffer);
getch();
}
void savevdo(int sr,int er,int sc,int ec,int *imager)
{
int i,j;
char far *vid;
int count=0;
for(i=sr;i<=er;i++)
{for(j=sc;j<=ec;j++)
{
vid=(char far*)0xB8000000+i*160+j*2;
*(imager+count)=*vid;
*(imager+count+1)=*(vid+1);
count+=2;
}}
}
void showvdo(int sr,int er,int sc,int ec,int imager[])
{
int i,j;
char far *vid;
int count=0;
for(i=sr;i<=er;i++)
{for(j=sc;j<=ec;j++)
{
vid=(char far*)0xB8000000+i*160+j*2;
*vid=*(imager+count);
*(vid+1)=*(imager+count+1);
count++;
}}
}
this is not working i mean.......the screen is not at all copied and later displaye......plz help wid dis.......





......i u look i have given the initial row and the final row as the same in the first part of the code which made all the difference...