Page 153 - C Programming
P. 153

do{


               if(kbhit())

                {   control=getch();


                     if(control= =45)


                       { del=del+10;

                           if(del>1500) del=1500;


                           textcolor(14);   gotoxy(28,14);  cprintf("Speed  Low = %.4d ",del); }

                      if(control= =43)


                        {  del=del-10;


                            if(del<30) del=30;

                             textcolor(12);   gotoxy(28,14);   cprintf("Speed High = %.4d ",del); }


                    }

                gotoxy(40-i,13); textcolor(2); cprintf("  <  ");


                outport(0x378,data[i]); delay(del);


                i++;    if(i>7) i=0;

               }while(control !=27);   outport(0x378,00);


          }
   148   149   150   151   152   153   154   155   156   157   158