Creating ProBoard Executables (PEX-files)

To create your own ProBoard executable (.PEX file), you first create a source file, say MYPROG.C. When ProBoard loads a PEX file, it executes the function main() in your program. This function is defined as:

void main(int argc,char *argv[])
{
...
}

The parameters 'argc' & 'argv' contain optional data that can be given to your program at load time (exactly like C's argc and argv parameters). Creating this main() function is the only thing you need to do to write a valid ProBoard executable. From this point on, it's just like writing a regular C program. Most of the ANSI standard library functions are available, plus many ProBoard- specific functions and global variables, used for interfacing between your program and the ProBoard environment. As in a regular executable, you can build your program from several source files.

This is a tiny sample ProBoard program:

#include "pb_sdk.h"
void main()
{
printf( "You have %d minutes left.\n", TimeLeft() );
AddTime( 10 );
printf( "Now you have %d minutes left.\n", TimeLeft() );
}

Included with ProBoard are a few example programs (in source form of course).