Annotation of gforth/kernel/doers.fs, revision 1.6
1.2 anton 1: \ run-time code for defining words
2:
1.5 anton 3: \ Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc.
1.2 anton 4:
5: \ This file is part of Gforth.
6:
7: \ Gforth is free software; you can redistribute it and/or
8: \ modify it under the terms of the GNU General Public License
9: \ as published by the Free Software Foundation; either version 2
10: \ of the License, or (at your option) any later version.
11:
12: \ This program is distributed in the hope that it will be useful,
13: \ but WITHOUT ANY WARRANTY; without even the implied warranty of
14: \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: \ GNU General Public License for more details.
16:
17: \ You should have received a copy of the GNU General Public License
18: \ along with this program; if not, write to the Free Software
1.6 ! anton 19: \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
1.1 pazsan 20:
21:
22: \ If we leave out the compiler we need the runtime code for our defining
23: \ words. This file defines the defining words without the
24: \ interpretative/compiling part.
25:
26: has? compiler 0= [IF]
27:
28: \ fillers for interpreter only mode
1.3 jwilke 29: \D compileddofillers .( Do-Fillers: )
1.1 pazsan 30:
31: : (does>) ;
32:
1.3 jwilke 33: doer? :dofield 0= [IF] \D compileddofillers .( DOFIELD )
1.1 pazsan 34: | : (Field) DOES> @ + ;
35: [THEN]
36:
1.3 jwilke 37: doer? :dodefer 0= [IF] \D compileddofillers .( DODEFER )
1.1 pazsan 38: | : Defer ( "name" -- ) DOES> @ execute ;
39: [THEN]
40:
1.3 jwilke 41: \D compileddofillers .( DO2CON )
42: | : 2Constant ( w1 w2 "name" -- )
1.1 pazsan 43: DOES> ( -- w1 w2 )
44: 2@ ;
45:
1.3 jwilke 46: doer? :docon 0= [IF] \D compileddofillers .( DOCON )
1.1 pazsan 47: | : (Constant) DOES> @ ;
48: [THEN]
49:
1.3 jwilke 50: doer? :douser 0= [IF] \D compileddofillers .( DOUSER )
1.4 jwilke 51: | : User DOES> @ [IFDEF] up@ up@ [ELSE] up @ [THEN] + ;
1.1 pazsan 52: [THEN]
53:
1.3 jwilke 54: doer? :dovar 0= [IF] \D compileddofillers .( DOVAR )
1.1 pazsan 55: | : Create ( "name" -- ) \ core
56: DOES> ;
57:
1.3 jwilke 58: \D compileddofillers .( .)
1.1 pazsan 59: [THEN]
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>