1. Press the down arrow on the toolbar button for New and select "Generic PB program" from the dropdown menu that is shown.
A new document with a template skeleton code will be created, ready for insertion of some working code.
Some explanations for the template code:
#COMPILE EXE tells the compiler to compile to an .exe program.
#DIM ALL tells the compiler all variables must be declared with DIM, LOCAL, STATIC or GLOBAL before use. Declaring all variables before use saves the programmer from making simple mistakes like misspelling a variable name, which can result in some very-hard-to-find runtime errors.
FUNCTION PBMAIN is the program's entry point
END FUNCTION is its exit point.
at the insertion point inside FUNCTION PBMAIN and save the document as for
3. Compile and Execute (Run) the code. And here's the result!
A complete, stand-alone 32-bit Windows program, Prog1.exe, with a total size of only 5,632 bytes (as compiled using PBWin 8.01).