version 1.2, 1996/05/07 16:15:23
|
version 1.4, 1997/05/21 20:39:42
|
Line 1
|
Line 1
|
\ Multitasker 19aug94py |
\ Multitasker 19aug94py |
|
|
|
\ Copyright (C) 1995-1997 Free Software Foundation, Inc. |
|
|
|
\ This file is part of Gforth. |
|
|
|
\ Gforth is free software; you can redistribute it and/or |
|
\ modify it under the terms of the GNU General Public License |
|
\ as published by the Free Software Foundation; either version 2 |
|
\ of the License, or (at your option) any later version. |
|
|
|
\ This program is distributed in the hope that it will be useful, |
|
\ but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
\ GNU General Public License for more details. |
|
|
|
\ You should have received a copy of the GNU General Public License |
|
\ along with this program; if not, write to the Free Software |
|
\ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
|
Create sleepers sleepers A, sleepers A, 0 , |
Create sleepers sleepers A, sleepers A, 0 , |
|
|
\ LINK-TASK links task1 into the task chain of task2 |
\ LINK-TASK links task1 into the task chain of task2 |
Line 24 Create sleepers sleepers A, sleepers A,
|
Line 42 Create sleepers sleepers A, sleepers A,
|
|
|
\ USER' computes the task offset |
\ USER' computes the task offset |
: user' ( 'user' -- n ) |
: user' ( 'user' -- n ) |
' >body @ state @ IF postpone Literal THEN ; immediate |
' >body @ postpone literal ; immediate |
|
interpretation: |
|
' >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 |