[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tasking problem
From: |
Andrew Holt |
Subject: |
Tasking problem |
Date: |
Sat, 9 Nov 2019 14:22:52 +0000 |
Hi,
I have just built the current git version of gforth (Gforth 0.7.9_20191107)
and tun a simple tasker test.
I get the following error message:
in file included from *the terminal*:0:-94575174554671:
in file included from *the terminal*:-1:1:
in file included from /tmp/tasks.fth:2:9:
/usr/local/share/gforth/0.7.9_20191107/tasker.fs:61:18: error: Undefined
word
dup r@ user' >>>normal-dp<<< + dup >r !
Backtrace:
kernel/int.fs:534:33 0 $7F223757F4C8 throw
kernel/int.fs:538:59 1 $7F223757F588 '-error
kernel/int.fs:544:5 2 $7F223757F5C8 (')
/usr/local/share/gforth/0.7.9_20191107/tasker.fs:48:12 3 $7F22375FCA30 '
It looks like I need to include something else in my simple test (BTW this
woks in the release on ubuntu):
require tasker.fs
variable cnt1
variable cnt2
-1 value t1
-1 value t2
0 cnt1 !
0 cnt2 !
: delay ( n -- )
0 do 1 ms pause loop
;
: task1 ( str len -- )
100 NewTask dup to t1
0 swap pass
begin
." task1:" cr
10 delay
1 cnt1 +!
pause
again
;
: task2 ( str len )
100 NewTask dup to t2
0 swap pass
begin
." task2:"
cnt1 @ . cr
pause
again
;
: main
s" task1" task1
s" task2" task2
begin
pause
single-tasking?
until
;
\ main
Any tips ?
- Tasking problem,
Andrew Holt <=