#include
#define uchar unsigned char
#define uint unsigned int
sbit cs=P3^0;
sbit wr=P3^1;
void delayms(uint x)
{
uint y,z;
for(y=x;y>0;y--)
for(z=110;z>0;z--);
}
void main()
{
uchar temp;
cs=0;
wr=0;
while(1)
{
P2=temp;
delayms(25);
temp++;
}
}