khi mình viết mã này cho c++ nhấn f7 thi bao lỗi segment too large có ai biết cách khác phục không chỉ mình với
unsigned char mang[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
unsigned char mang1[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
unsigned char ma[]={ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xFF,0x3C,0x3C,0x00,0x00,0x3C,0x3C,0xFF,
0xFF,0x00,0x00,0xFC,0xFC,0xFC,0xFC,0xFF ,
0xFF,0x81,0x7E,0x7E,0x7E,0x81,0xFF,0xFF ,
0xFF,0x03,0x01,0xFC,0xFC,0x01,0x03,0xFF ,
0xFF,0x00,0x00,0x24,0x24,0x24,0xFF,0xFF ,
0xFF,0x01,0x00,0xFC,0xFC,0x00,0x01,0xFF ,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
};
void tre(long time)
{ while(time--)
{;}}
void quet(unsigned char x)
{
unsigned int i,t;
for(i=0;i<8;i++)
{
t=x;
t=t&0x80;
if(t==0x80)
DATA=1;
else
DATA=0;
x*=2;
SCK=1;
SCK=0;
}
LACH=1;
LACH=0;
}
unsigned char mang[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
unsigned char mang1[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
unsigned char ma[]={ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xFF,0x3C,0x3C,0x00,0x00,0x3C,0x3C,0xFF,
0xFF,0x00,0x00,0xFC,0xFC,0xFC,0xFC,0xFF ,
0xFF,0x81,0x7E,0x7E,0x7E,0x81,0xFF,0xFF ,
0xFF,0x03,0x01,0xFC,0xFC,0x01,0x03,0xFF ,
0xFF,0x00,0x00,0x24,0x24,0x24,0xFF,0xFF ,
0xFF,0x01,0x00,0xFC,0xFC,0x00,0x01,0xFF ,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
};
void tre(long time)
{ while(time--)
{;}}
void quet(unsigned char x)
{
unsigned int i,t;
for(i=0;i<8;i++)
{
t=x;
t=t&0x80;
if(t==0x80)
DATA=1;
else
DATA=0;
x*=2;
SCK=1;
SCK=0;
}
LACH=1;
LACH=0;
}
Comment