主题:刚开始用C51出错了,请教大虾
#include <reg52.h> //包含文件
#include <stdio.h>
void main(void) //主函数
{
SCON=0x52;
TMOD=0x20;
TH1=0xf3;
TR1=1; //此行及以上3行为PRINTF函数所必须
printf("Hello I am KEIL. \n"); //打印程序执行的信息
printf("I will be your friend.\n");
while(1);
}
Build target 'Target 1'
compiling Text1.c...
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(2): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(2): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(2): error C141: syntax error near '#'
C:\KEIL\C51\INC\REG52.H(2): error C129: missing ';' before '<'
Target not created
#include <stdio.h>
void main(void) //主函数
{
SCON=0x52;
TMOD=0x20;
TH1=0xf3;
TR1=1; //此行及以上3行为PRINTF函数所必须
printf("Hello I am KEIL. \n"); //打印程序执行的信息
printf("I will be your friend.\n");
while(1);
}
Build target 'Target 1'
compiling Text1.c...
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(1): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(2): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(2): error C100: unprintable character 0xA1 skipped
C:\KEIL\C51\INC\REG52.H(2): error C141: syntax error near '#'
C:\KEIL\C51\INC\REG52.H(2): error C129: missing ';' before '<'
Target not created