File:  [gforth] / gforth / kernel / doers.fs
Revision 1.2: download - view: text, annotated - select for diffs
Tue Dec 8 22:03:09 1998 UTC (25 years, 4 months ago) by anton
Branches: MAIN
CVS tags: v0-4-0, HEAD
updated dates in copyright messages
inserted copyright messages in most files that did not have them
removed outdated files engine/32bit.h engine/strsig.c

    1: \ run-time code for defining words
    2: 
    3: \ Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
    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
   19: \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   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
   29: .( Do-Fillers: )
   30: 
   31: : (does>) ;    
   32: 
   33: doer? :dofield 0= [IF] .( DOFIELD )
   34: | : (Field)  DOES> @ + ;
   35: [THEN]
   36: 
   37: doer? :dodefer 0= [IF] .( DODEFER )
   38: | : Defer ( "name" -- ) DOES> @ execute ;
   39: [THEN]
   40: 
   41: | : 2Constant ( w1 w2 "name" -- ) \ double
   42:     DOES> ( -- w1 w2 )
   43:         2@ ;
   44: 
   45: doer? :docon 0= [IF] .( DOCON )
   46: | : (Constant)  DOES> @ ;
   47: [THEN]
   48: 
   49: doer? :douser 0= [IF] .( DOUSER )
   50: | : User DOES> @ up @ + ;
   51: [THEN]
   52: 
   53: doer? :dovar 0= [IF] .( DOVAR )
   54: | : Create ( "name" -- ) \ core
   55:     DOES> ;
   56: 
   57: .( .)
   58: [THEN]
   59: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>