\ ############################################################################ \ # Copyright (c) 2013 Dave Hein \ # MIT Licensed \ ############################################################################ \ This word will be run at startup : startup file_info_1 to file_info 0 file_opened ! 0 file_dirty ! file_info_2 to file_info 0 file_opened ! 0 file_dirty ! hostcwd zcount cd-path 1 30 lshift dup outa! dira! pfthversion type cr 7 1 do i process-arg loop ; \ Set up the cog config struct : setupconfig 496 cog@ \ Get config struct address from PAR dup 16 + @ \ Get the address of the return stack 4 + over 12 + ! \ Add four and set initial address of return stack ['] interpret >body \ Get the address of the Forth interpreter over 16 + @ ! \ Write it to the return stack ['] startup >body \ Get the address of the startup word swap ! \ Write it to the intial value of the program counter ; \ Spinix Spin app header create header char S c, char P c, char I c, char N c, 98 c, \ Save the hub RAM to an SD file : sdsave bl word count 0 create-file drop setupconfig header over 5 swap write-file drop 5 over 8 w@ 5 - swap write-file drop close-file ;