spinix-hive/pfth/bye.fth

40 lines
1.0 KiB
Forth
Raw Normal View History

hex
create run_prog
a0bc65f0 , 08bc6e32 , 80fc6404 , 08bc7032 , 80fc6404 , 08bc6032 , 80fc6404 ,
08bc6232 , 80fc63ff , 28fc6209 , 08fc6600 , 00fc6804 , 083c6029 , 083c5c2a ,
083c582b , 08bc642b , 863c642c , 5c68000f , 80fc6001 , 80fc5d00 , 80fc5d00 ,
e4fc620c , 087c6600 , 007c6804 , 04fc6a08 , 04fc6c0a , a0bc6236 , 84bc6235 ,
28fc6202 , 083c5a35 , 80fc6a04 , e4fc621d , 083c5a36 , 80fc6c04 , 083c6e36 ,
80fc6c04 , 083c7036 , 0cfc6401 , 60fc6407 , 68bc5e32 , 0c7c5e02 , 00007fd8 ,
00007fdc , 00007fd4 , 00000072 , 00000000 , 00000000 , 0007c010 ,
create arg_list 0 , 0 , 7fa8 @ , 7fc4 @ ,
: lockset ( locknum ... ) 0cfc0006 cogx1 drop ;
: lockclr ( locknum ... ) 0cfc0007 cogx1 drop ;
: bye
\ Close files
7b close-file drop
7c close-file drop
\ Stop all the cogs except this one and the SD SPI cog
SPI_engine_cog @ 1 -
8 0 do
dup i <> i cogid <> and
if i cogstop then
loop drop
\ Clear and return all the locks
8 0 do i lockclr i lockret loop
\ Start run_prog in this cog
run_prog arg_list cogid coginit
;
decimal