Build scripts run a variety of external programs to assemble and link your program for a particular platform. When you create a new project, one or more default build scripts are created and saved in your project folder. You can then tailor them to your personal needs, or create whole new ones if the need arises.
Build scripts are attached to your project, and need to go into the Build project folder for them to appear on the build menu bar. They are, at heart, simple Windows batch scripts with the .CMD extension.
When you run a build script, Latenite passes information to it in the form of environment variables. These variables exist for as long as the script is running. You can access them by surrounding the name of the variable in percent (%) signs.
The environment variables are as follows:
Variable | Description | Example |
SOURCE_PATH | The full path to the source file to build. | C:\Directory\File.ext |
SOURCE_FILE | The filename of the source file to build. | File.ext |
SOURCE_DIR | The directory of the source file to build. | C:\Directory |
SOURCE_FILE_EXT | The extension of the source file to build. | ext |
SOURCE_FILE_NOEXT | The filename of the source file to build without the extension. | File |
BUILD_PATH | The full path to the build script. | C:\Directory\SuperPC.cmd |
BUILD_FILE | The filename of the build script. | SuperPC.cmd |
BUILD_DIR | The directory of the build script. | C:\Directory |
BUILD_FILE_EXT | The extension of the build script. | cmd |
BUILD_FILE_NOEXT | The filename of the build script without the extension. | SuperPC |
COMPILE_DIR | The default directory in which Latenite stores the assemblers/linkers. | C:\Latenite\Compile |
ERROR_LOG | Expected location of the error log when the build process is complete. | C:\Latenite\Compile\Errors.xml |
PROJECT_PATH | The full path to the project. | C:\Directory\Super.lnp |
PROJECT_FILE | The filename of the project. | Super.lnp |
PROJECT_DIR | The directory of the project. | C:\Directory |
PROJECT_NAME | The name of the project. | Super Doom 2 |
PROJECT_BINARY | The short name of the project. | SPRDOOM2 |
For example, one common task would be to add the Latenite compile directory to the system's PATH variable so that you can call the various assemblers/linkers packaged with Latenite without having to swap directories a lot. The build script would have to contain a line like this:
Knowledge of how to create Windows/DOS batch scripts is a must!
Latenite is pretty useless on its own - it's just a Z80 editor. The default projects and build scripts all require that there are a set of assemblers and linkers available to them. Please note that WLA-DX and TASM were not written by Ben Ryves. All the other tools are.
These are (a small!) part of Ville Helin's excellent WLA-DX assemblers, suitable for the Z80. You can get more information and download the latest version (source) from the WLA-DX homepage.
This is a shareware copy of Thomas N. Anderson's (Squak Valley Software) TASM, the most commonly used assembler for TI's Z80 series of calculator. As it is shareware, if you intend on using it beyond an evaluation period please consider registering it through the homepage.
This Latenite-specific tool converts TASM's output to an XML error log. By piping the output of TASM to the input of TASMERR you can then easily redirect the output straight to the log file like this:
(Where args refers to TASM's command-line arguments). Passing the optional command-line switch /o only outputs the errors and messages, not the XML header (potentially useful if you need to join multiple error logs togther, such as one from the assembler and one from the linker).
This is a simple (but quite powerful) 8XP/83P linker. It wraps a number of COM binaries into a single 8XP/83P file. The command-line syntax is this:
You can specify any number of binaries to link. Each binary you wish to link needs to be added in (parentheses). For example:
Command-line | Description |
8XPLINK (IN.BIN) OUT.8XP | Link IN.BIN to OUT.8XP as IN. |
8XPLINK (IN1.BIN) (IN2.BIN) OUT.8XG | Link IN1.BIN and IN2.BIN to OUT.8XG as IN1 and IN2. |
8XPLINK (IN1.BIN,PROG1) (IN2.BIN,PROG2) OUT.8XG | Link IN1.BIN and IN2.BIN to OUT.8XG as PROG1 and PROG2. |
8XPLINK (IN1.BIN,PROG1,5) (IN2.BIN) OUT.8XG | Link IN1.BIN and IN2.BIN to OUT.8XG as PROG1 (unlocked program) and IN2. |
This could be useful to, for example, link your program and an AppVar together.
Setting the switch /x makes the linker output an XML error log (using /o makes 8XP Linker only output the errors and messages, not the XML header). Setting the switch /3 outputs a TI-83 variable rather than a TI-83 Plus variable.
This very basic program is designed to help creating XML error logs. Syntax is very basic:
Passing in START echoes the start of an XML error log to the console. END echoes the end. It could be used like this: