void setup()
{
volatile char *dirf,*outf;
volatile char *dirk,*ink;
dirf=0x30; outf=0x31;
dirk=0x107; ink=0x106;
*dirf=0xFF; *ink=0x00;
volatile char switches;
volatile long arr[]={63,6,91,79,102,109,125,7,127,111};
volatile long i,j,k,count=1;
loop:while(1)
{
*outf=arr[0];
while(1)
{
switches=*ink;
if((switches & 1) == 1)
{
*outf=arr[count];// to display numbers
for(j=0;j<=200000;j++);//dealy
count++;//incrementing count to read value in array
if(count==10) count=1; // reintializing count to 1
goto loop;
}
}
}
}
void loop()
{
}