?unsigned int id[5];
?//unsigned char id[5];
? id[0] = CBYTE[0x3FFA];
? id[1] = CBYTE[0x3FFC];
? id[2] = CBYTE[0x3FFD];
? id[3] = CBYTE[0x3FFE];
? id[4] = CBYTE[0x3FFF];
?讀出??[1~4] 都是0xFF?? ?
?unsigned int id[5];
?//unsigned char id[5];
? id[0] = CBYTE[0x3FFA];
? id[1] = CBYTE[0x3FFC];
? id[2] = CBYTE[0x3FFD];
? id[3] = CBYTE[0x3FFE];
? id[4] = CBYTE[0x3FFF];
?讀出??[1~4] 都是0xFF?? ?
#define???? LAST????? (*(UINT16 code *)(0x3FFA))?? /* 0x3FFB 是保留字 */
#define???? FIRST???? (*(UINT16 code *)(0x3FFC))
#define???? SECOND??? (*(UINT16 code *)(0x3FFE))
LAST??????= 0x61D2, FIRST?????= 0xFFFF, SECOND= 0xFFFF
怎么這么奇怪。。。
這個讀的不對呀。
關鍵在于MOVC的訪問方式,也就是加上code。
還可以換個方式,都是一樣的。
????????? printf("ID0 = %02x %02x \n",(UINT16)*(PUINT8C)(0x3FFA),(UINT16)*(PUINT8C)(0x3FFB));
????????? printf("ID1 = %02x %02x \n",(UINT16)*(PUINT8C)(0x3FFC),(UINT16)*(PUINT8C)(0x3FFD));
????????? printf("ID2 = %02x %02x \n",(UINT16)*(PUINT8C)(0x3FFE),(UINT16)*(PUINT8C)(0x3FFF));