void setup() {
// put your setup code here, to run once:
volatile char *dirf=0x30,*dirk=0x107;;
*dirf=0xff;
*dirk=0x00;
}
void loop() {
// put your main code here, to run repeatedly:
volatile char num[10]={0x3f,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0X6F};
volatile char alph[26]={0x77,0x7c,0x39,0x5e,0x79,0x71,0x7d,0x76,0x06,0x1e,0x38,0x54,0x5c,0x73,0x67,0x50,0x6d,0x78,0x3e,0x6e,0x5b};
volatile char s[9]={0,1,2,4,8,16,32,64,128};
volatile char *outf=0x31;
volatile char *ink=0x106,i,k=9;
volatile long j;
*outf=num[k];
while(1)
{
if(*ink==0x02)
{
while(*ink==0x02);
k--;
if(k<0)
k=9;
*outf=num[k];
for(j=1;j<=100000;j++);
}
}
}