Hello Tristan,
I need to look into my stuff, but that won't happen before next week. If I understand you correctly, you want to "shut down the output of the task, no matter what." I think, I have done this somewhere ... but I do not remember the details. You need to place " ' drop " in the correct field in the task control block. Something like this ... I'll check this out next week. :-) Cheers, Erich Tristan Williams writes: > Hello, > > I have been trying to redirect emit from within a task in a forth > multitasking setup. Redirection works perfectly for me in a word run > from the interpreter but when I try to do it from a task I fail to get > it to work. Below is a stripped down example which aims to redirect > emit to drop - so nothing should be output. The result of go! is > either a mcu reset or a hang. Without the redirection line, the task > runs and I can use the interpreter. Any ideas as to where I am going > wrong very gratefully received. > > Regards, > Tristan > > \ include ms.frt \ with pause > \ include avr-values.frt > \ include multitask.frt > > ' emit defer@ Evalue emit.amforth > ' emit? defer@ Evalue emit?amforth > > : +noop ['] drop is emit ['] true is emit? ; > : -noop emit.amforth is emit emit?amforth is emit? ; > > $20 $20 0 task: task1 > > : tx1.ex > > task1 tib>tcb activate > > begin > +buzz 1000 ms > \ uncomment one of three lines below > \ 1 +noop . -noop \ works in the interpreter > 1 +noop . -noop \ resets the mcu in task > \ +noop -noop \ does not reset mcu in task > -buzz 1000 ms > again > ; > > : go! > > buzz.init > > task1 task-init > > tx1.ex > > onlytask > task1 tib>tcb alsotask > multi > > ; > > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amforth-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amforth-devel -- May the Forth be with you ... _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel