C Language Development Kit/Character maps and key codes/Character maps

From OptiWiki

Jump to: navigation, search

H 13 - OPH 100x - PHL xxxx - OPL 97xx - DCL 153x character map

The character map for the PHL xxxx, H 13, OPH 100x, OPL 97xx and DCL 153x terminals is shown below. The characters can be used in the various printing functions like printf(), putchar(), etc. These characters are available in all system fonts.

Character 0x7F on the H 13 & OPH 100x terminals is the € (euro sign).

Note that some characters like 0x0A or 0x0D can only be printed on the display by printsymbol().

File:Charmap PHL OPL.gif

DWT7133 character map

The character map for the DWT 7133 is shown below. The characters can be used in the various printing functions like printf(), putchar(), etc.

Note that some characters like 0x0A or 0x0D can only be printed on the display by printsymbol().

The characters 0x00 up to and including 0x07 can be set by the programmer with the definecharacter() function. Characters 0x08 - 0x0F will respectively have the same bitmap as the characters 0x00 - 0x07.

File:Charmap DWT.gif

Example program showing the character map

The following example is a small program that shows all characters 0x00 - 0xFF, 16 at a time. When you press an arbitrary key the next 16 characters will be displayed. This example also shows the use of the definecharacter() function for the DWT 7133.

// This example will show all characters 0x00 - 0xFF, 16 at a time.
// When you press an arbitrary key the next 16 characters will be displayed.
// The down-arrow symbol is defined by the definecharacter() function
 
#include "lib.h"
#include <stdio.h>
 
#ifdef DWT
 
// Explanation for bitmap of dwarrow[8]
//
//      5 4 3 2 1
//
// 0x04 . . X . .
// 0x04 . . X . .
// 0x04 . . X . .
// 0x15 X . X . X
// 0x1F X X X X X
// 0x0E . X X X .
// 0x04 . . X . .
// 0x00 . . . . .
 
// Note that only the lower 5 bits of each unsigned char byte are used.
// A symbol consists of 8 lines. Each line is 5 pixels wide.
// A '.' denotes the pixel is off. A 'X' denotes that the pixel is on.
 
const unsigned char dwarrow[8] = {0x04, 0x04, 0x04, 0x15, 0x1F, 0x0E, 0x04, 0x00};
 
#endif
 
void main( void )
{
#define STEP   16
#define SPACE  32
 
    int int i, j;
 
#ifdef DWT
    for(i=0;  i<8; i++)
        definecharacter(i, (unsigned char*)dwarrow);
#endif
 
    while(1)
    {
        for( i=0; i<256; i+= STEP )
        {
            for( j=0; j<STEP/2; j++ )
            {
                gotoxy(j,0);
                printsymbol(SPACE);
                if (i + j < 256)
                    printsymbol(i + j);
            }
 
            for( j=0; j<STEP/2; j++ )
            {
                gotoxy(j,1);
                printsymbol(SPACE);
                if (i + j + SPEP/2 < 256)
                    printsymbol(i + j + STEP/2);
            }
 
            gotoxy(12,0);
            printf("%03d", i);
            gotoxy(12,1);
            printf("%03d", i + STEP - 1);
 
            resetkey();
            while(!kbhit())
                idle();
        }
    }
}
Views
Personal tools