version 1.5, 1997/07/06 14:42:14
|
version 1.7, 1998/12/08 22:02:52
|
Line 1
|
Line 1
|
\ Multitasker 19aug94py |
\ Multitasker 19aug94py |
|
|
\ Copyright (C) 1995-1997 Free Software Foundation, Inc. |
\ Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. |
|
|
\ This file is part of Gforth. |
\ This file is part of Gforth. |
|
|
Line 41 Create sleepers sleepers A, sleepers A,
|
Line 41 Create sleepers sleepers A, sleepers A,
|
lp! fp! rp! prev-task @ sleep ; |
lp! fp! rp! prev-task @ sleep ; |
|
|
\ USER' computes the task offset |
\ USER' computes the task offset |
: user' ( 'user' -- n ) |
:noname ' >body @ ; |
' >body @ postpone literal ; immediate |
:noname ' >body @ postpone literal ; |
interpretation: |
interpret/compile: user' ( 'user' -- n ) |
' >body @ ; |
|
|
|
\ NEWTASK creates a new, sleeping task |
\ NEWTASK creates a new, sleeping task |
: NewTask ( n -- Task ) dup 2* 2* udp @ + dup |
: NewTask ( n -- Task ) dup 2* 2* udp @ + dup |