
The below things are wrong in your program. 

============Where is AT898252.h? Did you mean REG8252.h?========
//      #include<AT898252.h> 
        #include<REG8252.h
============lcdacess.c should be included in this thread========
// 	I have to include the file lcdacess.c which is 
//	working. Don't mind these two statements
//      lcd_write(1,B); 
//      lcd_write(1,ACC); 
============flag is not defined in your program=================
//      if(flag)  
