Page 78
Epson Research and Development
Vancouver Design Center
S1D13503
Programming Notes and Examples
X18A-G-002-06
Issue Date: 01/01/30
Video = 0;
if (val & 0x08)
Video |= (color << 6);
if (val & 0x04)
Video |= (color << 4);
if (val & 0x02)
Video |= (color << 2);
if (val & 0x01)
Video |= color;
*+ = (unsigned char) Video;
CheckBank(pVideo, &bank);
pVideoFirst= BytesPerScanLine;
}
pVide= 2; // Point to next character
pVideoFirstColumn = pVideoStart;
}
break;
case 16:
color &= 0x0f;
while (*str != 0)
{
ch = *str++;
if ((ch < ' ') || (ch - ' ' > MAX_FONT-1))
ch = '.';
pFont = &font[ch - ' '][0];
for (y = 0; y < 8; ++y)
{
pVideo = pVideoFirstColumn;
Video = 0;
val = *pFont++;
//
// Since there are 16 colors/gray shades, each bit in the font will be
// represented in video memory as a four bit pixel.
//
if (val & 0x80)
Video |= (color << 4);
if (val & 0x40)
Video |= color;
electronic components distributor