
xdata char msg1[]="abc";
xdata char msg2[]="def";

void main()
{
   bit temp;

   init_8255();

   init_lcd();
   lcd_open_backlight();
   lcd_cursor_on();

   // print the first messages to the first row 
   // and beginning from column 10
   lcd_print(10, 0, msg1);
   lcd_print(10, 1, msg2);

   // here I'm waiting user confirmation
   // state_active_pin is a 8255 pin which is 
   // connected to a jumper. 
   // here I wait till the jumper is removed
   temp = state_active_pin;
   while (state_active_pin == temp);

   // in this version of code
   // do not use strcpy()
   // copy by hand
   msg1[0]='0';msg1[1]='1';msg1[2]='2';msg1[3]=0;
   msg2[0]='9';msg2[1]='8';msg2[2]='7';msg2[3]=0;

   // print to column 0
   lcd_print(0, 2, msg1);
   lcd_print(0, 3, msg2);

   while(1);
}
