#include #include void main() { int quit=0; int chr; int x=1; int y=1; int i=0; int j=0; char data[10]; InitLib(); InitLCD(); LcdSetCursorOn(); /* Display cursor */ // *LcdShowKey = 1; while(!quit) { chr=Getch(); if(y==9) { /*LCD line(y)<=8*/ ClrScrn(); y=1; } // data[0] = (char)chr; if(chr=='q') quit=1; else if(chr<0x80) Print("%c",chr); /*print input letter*/ Print("[%d]",chr);/*print ASCII code*/ if (j==10) j=0; //count input data[j]=(char)chr; Print(" %c @LCD(%d,%d) [%d]\r\n",data[j],x,y,j+1); j=j+1; if (chr==8) { // backspace control x=x-1; TextOutAt(x, y, (char *)&chr); //print on LCD x=x-1; } else TextOutAt(x, y, (char *)&chr); //print on LCD x=x+1; if(x==17) { //LCD wide(x)<=16 x=1; y=y+1; } }//while loop CloseLCD(); }