You can add your own initialization to the startup sequence through the deferred word
'cold
-- gforth "tick-cold"
'cold
is invoked just before the image-specific command line
processing (by default, loading files and evaluating (-e
) strings)
starts.
A sequence for adding your initialization usually looks like this:
:noname Defers 'cold \ do other initialization stuff (e.g., rehashing wordlists) ... \ your stuff ; IS 'cold
You can make a turnkey image by letting 'cold
execute a word
(your turnkey application) that never returns; instead, it exits Gforth
via bye
or throw
.