File:  [gforth] / gforth / kernel / vars.fs
Revision 1.2: download - view: text, annotated - select for diffs
Fri Jun 6 17:28:17 1997 UTC (24 years, 1 month ago) by anton
Branches: MAIN
CVS tags: HEAD
Environmental query "gforth" now returns the version-string
dictionary-end and unused moved into the kernel/basics.fs
Minor gforth.el bug fixes
Major rewrite of objects.fs (not yet done)
fixed -trailing bug (with test in test/other.fs)
optimization of fields with offset 0 in struct.fs and compat/struct.fs
other changes in compat/struct.fs (not yet done)
added ansreports to compat/*.fs
documentation changes
allot now checks for dict overflow
named [IS] (compilation semantics of IS).
minor changes

    1: \ VARS.FS      Kernal variables
    2: 
    3: \ Copyright (C) 1995 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: hex \ everything now hex!                               11may93jaw
   22: 
   23: \ important constants                                  17dec92py
   24: 
   25: \ dpANS6 (sect 3.1.3.1) says 
   26: \ "a true flag ... [is] a single-cell value with all bits set"
   27: \ better definition: 0 0= constant true ( no dependence on 2's compl)
   28:  -1 Constant true               \ see starts looking for
   29:                                 \ primitives after this word!
   30:   0 Constant false
   31: 
   32: 1 cells Constant cell ( -- u ) \ gforth
   33: 1 floats Constant float ( -- u ) \ gforth
   34: 
   35: 20 Constant bl \ used by docon:, must be constant
   36: 
   37: FF Constant /line
   38: 
   39: 40 Constant c/l
   40: 10 Constant l/s
   41: 400 Constant chars/block
   42: 
   43: $20 8 2* cells + 2 + cell+ constant word-pno-size ( -- u )
   44: 84 constant pad-minsize ( -- u )
   45: 
   46: \ that's enough so long
   47: 
   48: \ User variables                                       13feb93py
   49: 
   50: \ initialized by COLD
   51: 
   52: Create main-task  100 cells allot
   53: main-task tup H ! minimal
   54: 
   55: Variable udp \ used by dovar:, must be variable
   56: 
   57: AUser next-task        main-task next-task !
   58: AUser prev-task        main-task prev-task !
   59: AUser save-task        0 save-task !
   60: AUser s0 \ used by douser:, must be user
   61: AUser r0
   62: AUser f0
   63: AUser l0
   64: AUser handler
   65: \ AUser output
   66: \ AUser input
   67: 
   68: AUser errorhandler
   69: 
   70: AUser "error            0 "error !
   71: 
   72:  User tibstack
   73:  User >tib
   74:  User #tib
   75:  User >in               0 >in !
   76:  User blk               0 blk !
   77:  User loadfile          0 loadfile !
   78: 
   79:  User loadfilename#	0 loadfilename# !
   80: 
   81:  User loadline          \ number of the currently interpreted
   82:                         \ (in TIB) line if the interpretation
   83:                         \ is in a textfile
   84:                         \ the first line is 1
   85: 
   86: 2User linestart         \ starting file postition of
   87:                         \ the current interpreted line (in TIB)
   88: 
   89:  User base              A base !
   90:  User dpl               -1 dpl !
   91: 
   92:  User state             0 state !
   93: AUser normal-dp		\ the usual dictionary pointer
   94: AUser dpp		normal-dp dpp !
   95: 			\ the pointer to the current dictionary pointer
   96:                         \ ist reset to normal-dp on (doerror)
   97:                         \  (i.e. any throw caught by quit)
   98: AUser LastCFA
   99: AUser Last
  100: 
  101: User locals-size \ this is the current size of the locals stack
  102: 		 \ frame of the current word
  103: 
  104: 

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