TIGCC Tools Suite - HowTo's | (c) TI-Chess Team
Using Compressed Executables | Anno Domini 2000

## IMPORTANT NOTE

> Since version 0.9 TIGCC supports exe-packing directly. This document is therefore obsolete. Read the TIGCC documentation about commandline flag "-pack".

## Introduction

> The TIGCC Tools Suite supports a technology called ExePack. This technology may be used to save memory on the calculator.
> ExePack uses a compressed executable in combination with a start utility which decompresses the program temporary during the startup.
> I have chosen TI-Chess 3.01 as an example how to generate a compressed executable and how to use it. The original executable has a size of 48609 bytes and the compressed version will just take up 27373 bytes. By using the compressed executable we will save about 20kB of memory!
> IMPORTANT NOTE: Only NOSTUB executables can be used with ExePack !!

## How to generate a compressed Executable

> To make the process simple I have implemented a tiny tool called ttppggen which processes all necessary steps in sequence. Suppose we have the TI89 executable of tichess (tichess.89z) and the result should be a calculator variable with name "tic" which holds the packed executable.
> ttppggen tichess.89z tic
> This short line will generate a file tic.89y which will show up on the calculator as file tic with extension ppg.
> To start the packed executable on the calculator you can use the ttstart() utility which comes with the TIGCC Tools Suite like this:
> ttstart("tic")
> If you want a custom start utility which doesn't need any commandline parameter, read on!

## How to generate a custom start utility

> Suppose we want a custom start utility which doesn't need a commandline parameter. The start utility should be named mystart and the packed executable is named myprog. To build this custom start utility just go to directory src/calctools and compile ttstart.c like this:
> tigcc -o mystart -Os -DCUSTOM_NAME=myprog ttstart.c
> That's all. When you start mystart() on your calculator it will look for myprog automatically.
> NOTE: Of course you must have the TIGCC environment already installed on your computer.

Thomas Nussbaumer Graz,Austria 30/09/2000