#include<reg51.h>
#include<stdio.h>
#define uint unsigned int
#define uchar unsigned char
uchar data a[32]_at_0x30; //设定数组a的起始地址为30H
uint i_at_0x55; //将变量i放在地址55H
//延时程序
void DelayMS(uint ms)
{
uchar t;
while(ms--)for(t=0;t<120;t++);
}
//主程序
void main()
{
SP=0x60; //设定堆栈指针位置
SCON=0x52;
TMOD=0x20;
TH1=0xf3;
TR1=1; //此行及以上3行为Printf函数所必须
for(i=0;i<32;i++)
{
a[i]=i;
printf("It is :%d now.\n",i); //打印程序执行信息
DelayMS(20000);
}
while(1);
}
刚开始学习的单片机实验,出现2.3(1).C(5): error C129: missing ';' before '_at_0x30',应该是在第五行,求解答!!!!!!
|