// # Include <io8515v. h>
# Include <iom8515v. h>
# Include <math. h>
# Include <stdio. h>
# Include <macros. h>
Void defor ()
{Int I, j, k;
For (I = 0; I <= 20; I ++)
{For (j = 0; j <= 250; j ++)
{K = 0 ;}
}
}
// Void defor ()
//{
// Int I, j, k;
// For (I = 0; I <= 20; I ++ ){
// For (j = 0; j <= 250; j ++ ){
// K = 0 ;}
//}
Char dujian ()
{Char tt;
Char kn [4] = {0x10, 0x20, 0x40, 0x80 };
Int I, k;
I = 1;
// PORTA = 0x0f;
// If (PIND! = 0x0f)
//{//
PORTA = 0x01;
// Defor ();
// Defor ();
For (I = 0; I <= 3; I ++)
{// Defor ();
// Defor ();
PORTA = PORTA * 2;
// Defor ()
//
If (PIND! = 0x0F)
{Defor ();
If (PIND = 0X0E)
{
While (PIND = 0X0E)
{Tt = 0x01 + (kn [I]);
// Defor ();
}
Break;
}
If (PIND = 0X0D)
{
While (PIND = 0X0D)
{Tt = 0x02 + (kn [I]);
// Defor ();
}
Break;
}
If (PIND = 0X0B)
{
While (PIND = 0X0B)
{Tt = 0x04 + (kn [I]);
// Defor ();
}
Break;
}
If (PIND = 0X07)
{
While (PIND = 0X07)
{Tt = 0x08 + (kn [I]);
// Defor ();
}
Break;
}
}
//}
Else
{Tt = 0x00;
}
}
//}
// PORTA =! PORTA;
Return tt;
}
Char fanyi (char tt)
{Char kt [4] [4] = {0x37,0x34,0x31, 0x2e}, {0x38,0x35,0x32,0x30 }, {0x39,0x36,0x33, 0x3d}, {0x2f, 0x2a, 0x2d, 0x2b }};
Int I;
Char mm;
Int j;
If (tt = 0x00)
{Mm = 0x00 ;}
Else
{
For (I = 0; I <= 3; I ++)
{
If (tt & 0x0f)>