8.4.1Creation of Execution File

Application developers should develop programs using 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.

The following program shows only a part of the whole program which controls the backlight in the Windows Procedure.

#include <windows.h> #include “syslib.h”

....

case WM_CHAR:

switch (ch = wParam) { case '0':

case '1':

SYS_SetBackLight(ch - ‘0’); /* System Library function */ default:

break;

}

}

....

Next, create the execution file with the following procedure.

<Test.c>

C:￿SAMPLE>cl -c -G2sw -Zp -W3 -Otin -Ic:￿IT-2000￿include test.c

Microsoft (R) C/C++ Optimizing Compiler Version 8.03

Copyright (c) Microsoft Corp 1984-1995. All rights reserved.

test.c

C:￿SAMPLE>link /NOD /NOE /LI /m test,,,c:￿IT-2000￿lib￿libsysw,test.def

Microsoft ( R ) Segmented Executable Linker Version 5.63.2 20 Nov 29 1994

Copyright (C) Microsoft Corp 1984-1995. All rights reserved.

C:￿SAMPLE>

This example assumes that the SDK of the IT-2000 has been installed in C: IT-2000. If it is

installed in another directory, it is necessary to designate the location in which to store the header file and library file according to the development environment. These designation can be made using the environment variables INTCLUDE and LIB.

For more information refer to a compiler manual published separately by a third party.

146

Page 146
Image 146
Casio IT-2000W manual Creation of Execution File