Building Applications with CamelForth

7. Putting it all together

We've now done all the work required to create our application; all that remains is to load the source files and save the images of the ROM banks.

The application generation utilities provide words to generate bank images for four types of application:

Standalone applications include the CamelForth bank as their bank 63, and so if you use just the ROM2 region, your application will be 32K; "big" applications also using ROM1 will be 48K. Client applications use the Packages system to bind in the CamelForth bank when they start up, and hence are 16K smaller. This requires that the user has Installer v2.00+ and the exact version of CamelForth used to compile your application present on their Z88; if this is not the case then an error message will be shown and the application will terminate without running. Therefore, you should always generate both a client and standalone version of your application to cater for all users.


Creating your application is now a matter of loading the source files in the correct order (application source, appgen.fth, application DOR) and then using the appropriate words to generate your bank images. It's generally easier to create a makefile and simply load this (using, for example, S" pyramid-app.mak" INCLUDED). A suitable makefile for our sample application is downloadable below.


Making a RAM-Installable application

By default, the tools now produce files for RAM-installable applications, and you only need create a simple .app file using the APPMaker.bas program from the Installer Toolkit. A standard ROM application can be created by renaming the generated files appropriately (eg .ap0->.63, .ap1->.62, .ap2->.61).


Puzzle Of The Pyramid

Finally, here's all the source files required to generate the example application. The finished application can also be downloaded if you wish.


Previous section: Creating the application DOR


More on CamelForth

Other ROMs

Back to the Z88 home page