User`s manual

Dynamic C Users Manual digi.com 15
3. QUICK TUTORIAL
Sample programs are provided in the Dynamic C Samples folder, which is in the root directory where
Dynamic C was installed. The Samples folder contains many subfolders, as shown in Figure 3.1. Sample
programs are provided in source code format. You can open the source code file in Dynamic C and read
the comment block at the top of the sample program for a description of its purpose and other details.
Comments are also provided throughout the source code. This documentation, provided by the software
engineers, is a rich source of information.
Figure 3.1 Screenshot of Samples Folder
The subfolders contain sample programs that illustrate the use of the various Dynamic C libraries. For
example, the subfolders “Cofunc” and “Costate” have sample programs illustrating the use of
COFUNC.LIB and COSTATE.LIB, libraries that support cooperative multitasking using Dynamic C lan-
guage extensions. Besides its subfolders, the Samples folder also contains some sample programs to dem-
onstrate various aspects of Dynamic C. For example, the sample program Pong.c demonstrates output
to the Stdio window.
In the rest of this chapter we examine four sample programs in some detail.