{
    int i;
    //int x=0, y=0;
    //int w, h;
    char string[4]={0,};

    printf("ascii[95] display\n");
    for(i=32; i<127; i++)
    {
        string[0] = i;
        printf("[0x%02x]%s\n", string[0], string);
    }

    printf("hangul_wan[2350] test\n");
    for(i=0xb0a0; i<=0xc8fe; i++)
    {
        char third=(i>>4)&0x000f;
        if(third < 10)    continue;    //두번째 바이트의 상위 nibble은 A~F의 값을 가진다.

        string[0] = i>>8;
        string[1] = i&0x00ff;

        if(string[1]==0xa0 || string[1]==0xff)    continue;    //두번째 바이트의 값이 0xa0 이거나 0xff인 경우 한글 코드 존재하지 않음
        printf("[%#.04x]%s\n", i, string);

/*
        LCD_GetTextSize(string, &w, &h);       
        if(x >= (LCD_WIDTH_PIXEL-w))
        {
            x = 0;
            y += h;
        }

        if(y >= (LCD_HEIGHT_PIXEL-h))
        {
            y = 0;
            KBD_GetCh();
            LCD_Clear();
        }

        LCD_GotoXY(x, y);
        LCD_PutCh(i);
        LCD_Where((unsigned int*)&x, (unsigned int*)&y);
*/
    }
}

'c' 카테고리의 다른 글

리눅스 IP충돌 체크  (0) 2022.09.08
리눅스 정규식을 이용한 IP / Email 주소 체크  (0) 2022.09.06
구조체 배열 인자로 넘겨서 채우기  (0) 2022.08.11
리눅스 usb mount 예제  (0) 2021.07.20
C관련Etc...  (0) 2021.06.17
Posted by afewgood
,