void main(void)
{
int i, j, n;
- unsigned char xsize, ysize, tcol, inpos = 0;
+ unsigned char xsize, ysize, tcol, bgcol, inpos = 0;
clrscr();
screensize(&xsize, &ysize);
cputsxy(0, 2, "Colors:" );
tcol = textcolor(0); /* remember original textcolor */
+ bgcol = bgcolor(0); /* remember original background color */
for (i = 0; i < 3; ++i) {
gotoxy(i,3 + i);
for (j = 0; j < 16; ++j) {
}
}
textcolor(tcol);
+ bgcolor(bgcol);
cprintf("\n\n\r Screensize is: %dx%d", xsize, ysize );
inpos = (inpos - 1) & 7;
} else if (i == CH_CURS_RIGHT) {
inpos = (inpos + 1) & 7;
+ } else if (i == CH_F7) {
+ bgcol = (bgcol + 1) & 0x0f;
+ bgcolor(bgcol);
+ } else if (i == CH_F8) {
+ bgcol = (bgcol - 1) & 0x0f;
+ bgcolor(bgcol);
} else {
cputc(i);
inpos = (inpos + 1) & 7;