115
7.4.1 Creation of Execution File
Application developers should develop programs using MS-DOS, IBM PC/AT BIOS and various
application development libraries. The following sample program is used to turn on and off the
backlight. With this program the backlight will be turned on or off if either "1" or "0", respectively,
is entered through the numeric keypad. This program can be terminated by the input of the ESC key.
#include <stdio.h>
#include "syslib.h"
void main()
{
char ch;
for (; ;) {
switch (ch = getch()) {
case '0':
case '1':
SYS_SetBackLight(ch-'0'); /* System Library function */
break;
case 0x1B:
exit(0);
default:
break;
}
}
} <Test.c>