来大大帮我看看这里的三个错误,我是个新生

#include<reg51.h>
#include<intrins.h>

#define uchar unsigned char
#define uint unsigned int

uchar code DSY_CODE[]={
0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90
};

void DelayMS(uint x)
{
uchar t;
while(x--)
for(t=0;t<120;t++);
}

void main()
{
uchar i;
wei=Ox80;
while(1)
{
for(i=0;i<8;i++)
{
P0=0xff;
P0=DSY_CODE[i];
wei=crol(wei,l);
P2=wei;
DelayMS(2);
}
}
}

wei、P0、P2变量都没有定义就使用了。

#include<reg51.h>
#include<intrins.h>

#define uchar unsigned char
#define uint unsigned int

uchar code DSY_CODE[]={
0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90
};

void DelayMS(uint x)
{
uchar t;
while(x--)
for(t=0;t<120;t++);
}

void main()
{
uchar i,wei,P0,P2;
wei=Ox80;
while(1)
{
for(i=0;i<8;i++)
{
P0=0xff;
P0=DSY_CODE[i];
wei=crol(wei,l);
P2=wei;
DelayMS(2);
}
}
}