keil c51出现LCD.C(12): error C129: missing ';' before 'code'怎么改

typedef unsigned int uint;
# include<reg52.h>
# define LLCD_CMD_WR PBYTE[0x10] //LCD左半部分写命令 rs=0 wr=0
# define LLCD_CMD_RD PBYTE[0x11] //读命令rs=0 wr=1
# define LLCD_DATA_WR PBYTE[0x12] //写数据rs=1 wr=0
# define LLCD_DATA_RD PBYTE[0x13] //读数据rs=1 wr=1
# define RLCD_CMD_WR PBYTE[0x20] //LCD右半部分的读写命令
# define RLCD_CMD_RD PBYTE[0x21]
# define RLCD_DATA_WR PBYTE[0x22]
# define RLCD_DATA_RD PBYTE[0x23]
sbit busy=P0^7;
uchar code hanzi[]={
/*"河"*/
0x00,0x00,0x40,0x88,0x18,0x30,0xA0,0xA0,0xA0,0x90,0x10,0xF0,0x10,0x10,0x10
,0x00,0x00,0x00,0x00,0x30,0x0C,0x00,0x03,0x02,0x02,0x03,0xC0,0x7F,0x00,0x00
,0x00,0x00,
/*"南"*/
0x00,0x00,0x00,0x00,0x00,0x20,0x20,0xF0,0x2C,0x10,0x90,0x80,0x80,0x80,0x00
,0x00,0x00,0x00,0x01,0x7F,0x01,0x15,0x17,0x7C,0x0B,0x09,0x08,0xC0,0xE0,0x1F
,0x00,0x00,
/*"理"*/
0x00,0x00,0x20,0x20,0xE0,0x20,0x70,0x90,0x10,0xF0,0x48,0x08,0xF8,0x10,0x00
,0x00,0x00,0x00,0x20,0x11,0x1F,0x89,0x81,0x83,0x52,0x7F,0x4A,0x4A,0x41,0x40
,0x40,0x00,
/*"工"*/
0x00,0x00,0x00,0x00,0x00,0x40,0x20,0x20,0xE0,0x20,0x20,0x20,0x00,0x00,0x00
,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x10,0x1F,0x10,0x10,0x10,0x10,0x10
,0x10,0x00,
/*"大"*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x80,0x80,0x80,0x80,0x80,0x00,0x00
,0x00,0x00,0x00,0x00,0x41,0x41,0x21,0x1D,0x07,0x08,0x10,0x60,0x40,0x40,0x40
,0x00,0x00,
/*"学"*/
0x00,0x00,0x80,0x60,0x48,0x50,0x40,0x58,0xA0,0x30,0x2C,0xA0,0x60,0x40,0x00
,0x00,0x00,0x00,0x09,0x08,0x08,0x09,0x85,0x85,0x7E,0x05,0x04,0x04,0x04,0x04
,0x00,0x00,
};

最后一个"学"字代码最后一行结尾处多出一个".".
温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-12-02
typedef unsigned char uchar; 有么????追问

加了这条语句 错误更多

追答

Error:LCD.C(12): error C129: missing ';' before 'code'
首先错误提示在第12行的code前面有错,那uchar在你贴的代码中没看到,我用你的代码编译了下,加上typedef unsigned char uchar; 编译通过了,你的不通过可以再把错误代码贴上来大家一起解决,还有头文件要放到最前面,这样写规范些

本回答被提问者采纳
相似回答