请问 如何把字符 “古”的内码取出
/***************************************************
*MSB 表示汉字内码GBCode的高8bits
*LSB 表示汉字内码GBCode的低8bits
*Addr[0]字库芯片最高地址字节
*Addr[1]字库芯片其次地址字节
*Addr[2]字库芯片低地址字节
****************************************************/
FLAG Get_GB15x16_Addr(BYTE MSB,BYTE LSB,BYTE *Addr)
{
u32 Address=0;
FLAG ReVal=TRUE;
if(MSB == 0xA9&& LSB >=0xA1)
Address =(282+ (LSB-0xA1))*32+BaseAdd15x16;
else if(MSB >=0xA1 && MSB <= 0xA3&& LSB >=0xA1)
Address =((MSB-0xA1) * 94 + (LSB-0xA1))*32+ BaseAdd15x16;
else if(MSB >=0xB0 && MSB <= 0xF7 && LSB >=0xA1)
Address = ((MSB-0xB0) * 94 + (LSB-0xA1)+ 846)*32+ BaseAdd15x16;
else
ReVal=FALSE;
Addr[0]=(BYTE)((Address>>16)&0xff);
Addr[1]=(BYTE)((Address>>8)&0xff);
Addr[2]=(BYTE)(Address&0xff);
return(ReVal);
} |