TPL file format

The TPL extension is used for template scripts by RadASM. Generally it is easier to use the Create Template function from the project menu to create a template script.

All template files must be in the \RadASM\[ASSEMBLER]\Template folder.

Beginner's guide to the Template file

Step 1
The first entries in a tpl script describe the file to the RadASM template selector in the New Project wizard.
Line 1 : indicate the type of application which you want the template listed for
Line 2 : the working name of the application in the script (this is replaced by the name you give your app)
Line 3 : A brief description of the template.

Step 2
Next the actual project is generated, this is signaled by the following command

[*BEGINPRO*]

Step 3
You can optionally create a definition section that will define certain default parameters for your template, the allowable sections in the DEF part of the script correspond to entries in the RAP file

[*BEGINDEF*]
[makedef]; this is the same as the makedef section of your project file
[VerInf]
[Resource]
etc...

End the RAP file definition with the following command :
[*ENDDEF*]

Step 4
The main project file is the first one to be created, you can add text to the file by specifying :

[*BEGINTXT*]
Line 1 : always contains the name of the file, if this is the main file use the working name specified in line 2 above (+ extension)

The actual file contents follow the filename and continue until
[*ENDTXT*]

To create another file use [*BEGINTXT*] again and repeat the process.

Step 5
You can include binary data in a TPL file with the following syntax, this will create a binary file named Test.bin and write the specified data into it.

[*BEGINBIN*]
Test.bin ; Name of the file
6400000001000000; hex data to be included (bytes)
[*ENDBIN*]

Step 6
The project ends when it encounters :
[*ENDPRO*]

You can add files after the ENDPRO command using BEGINTXT or BEGINBIN, this is generally used for generated RC files that RadASM would generate at compile time such as the RC for a dialog or string table.