The application DOR is the definition of the menus, commands and help text for an application, together with general information about the application itself. The layout of this is rather rigid and inflexible; writing a DOR using an assembler is a tedious and error-prone process.
CamelForth comes with a set of utilities which make creating application DORs extremely easy. These are described in greater detail elsewhere; for now, I shall just point out the most common options that need to be set. The utilites take their default settings from CamelForth, so when generating applications written in Forth, most settings do not need to be altered.
Each application ROM should have its own unique ID. Unfortunately, a complete list of these no longer seems to be available. However, since most people can fix any clashes with ROMCombiner it shouldn't be too much of a problem. We'll set a card ID which seems to be unused by anyone else:
HEX 4557 TO CARDID DECIMAL
You will also need to specify the amount of RAM your application will use. This can generally be determined by the phrase HERE 8192 - U. immediately after loading your application source file, unless your application also allocates memory during execution.
If you use WORD for parsing, don't forget that you'll need to add some extra memory to your calculation (128 bytes will be enough), since WORD moves strings to HERE. In these cases, PARSE is usually preferable.
We'll set the size with the following phrase:
1172 BYTES TO RAM-SIZE
(the word BYTES converts the number of bytes into a number of 256-byte pages that RAM-SIZE requires).
Note that since we are creating bad applications here, the minimum amount of RAM that will actually be allocated is 8K.
The rest of the DOR definition is the name and letter of the application, the menus (with the two commands Quit & Restart) and some help. Download or view the following file:
Next section: Putting it all together
Previous section: Menus and Commands