Generic start up





The file ARM\INITARM.FTH contains the generic vector table, Forth start up code and Forth initialisation tables. It must be the first file compiled that generates code unless you are compiling operating specific code, such as with an AIF header.

For CPUs such as the Atmel AT91 series which have a vectored interrupt controller, this file is not used, and a variant of this code will be included in a CPU and hardware specific file INITxxxx.FTH. Such files may be found in the HARDWARE directory e.g. Hardware\EB55\InitARM55800.fth is used for the EB55 board which has an AT91x55800A CPU.




Vectors

This code branches by loading the PC with an ABSOLUTE address contained in a location at a RELATIVE offset from the LDR instruction. This avoids the use of a relative branch which may be out of range if the execution address is high in memory.

For faster response speed, you may wish to place your FIQ handler here, replacing the ldr pc, FIQV instruction with the first instruction of the FIQ handler. This saves the ARM from the extra overhead of having to branch to the handler.

The following vectors usually end up in RAM after the EPROM/Flash is remapped into high memory and RAM is remapped to low memory.




Start of Forth system

This section contains initial values of Forth registers and the code to initialise and run Forth.