\ Revised to operate properly -- Following toggle.fth as a template \ Delays using ms to avoid shifting input to hex from decimal Variable Testvar 2 Testvar ! create cogAstack 80 allot \ allots an 80 byte or 40 16bit cell stack space create cogAreturn 80 allot \ allots an 80 byte or 40 16bit cell stack space : ReadTestvar Begin 25 ms Testvar @ . cr crset again ; : StartcogA forth @ cogAconfig cognew ; \ used to start an empty Cog : SetTestvar 1 Testvar ! ; : UnsetTestvar 0 Testvar ! ; : Startcogloop begin 100 ms SetTestvar 1f 100 unsetTestvar again ; create cogAconfig ' Startcogloop >body , cogAstack , cogAstack , cogAreturn , cogAreturn , : StartAll StartcogA ReadTestvar ; \ use to start cogA and to get Terminal to report via Cog1