PropellerForth tidbit: running a word at boot time
INTERACTIVE. This displays the version screen, enables multitasking, and drops into the Forth interpreter by calling the standard word
Once you've built an application and burned it to EEPROM using
savemem, you may not want PropellerForth to be interactive anymore! Alternatively, you might define a new version of
INTERACTIVEthat does some additional setup -- SD card initialization, for example -- and then calls the old
I neglected to provide an easy way to run your own words on boot in v8.01, so here it is:
\ The address of a variable containing the first word to run.
140 constant 'boot
\ Sets a word to run at startup.
\ Example: BOOT MYSTARTUP
: boot ( "name" -- )
' 'boot ! ;
You can simulate a reboot -- assuming you haven't started any other tasks -- by invoking an arcane Propeller machine instruction:
32 0 coginit
Once you're satisfied,