Annotation of gforth/kernel/vars.fs, revision 1.7

1.1       anton       1: \ VARS.FS      Kernal variables
                      2: 
1.6       anton       3: \ Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
1.1       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
                     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: 
1.2       anton      43: $20 8 2* cells + 2 + cell+ constant word-pno-size ( -- u )
                     44: 84 constant pad-minsize ( -- u )
                     45: 
1.1       anton      46: \ that's enough so long
                     47: 
                     48: \ User variables                                       13feb93py
                     49: 
                     50: \ initialized by COLD
                     51: 
1.7     ! pazsan     52: Create main-task  has? OS [IF] 100 [ELSE] 40 [THEN] cells allot
1.3       jwilke     53: 
                     54: \ set user-pointer from cross-compiler right
                     55: main-task 
                     56: UNLOCK tup ! LOCK
1.1       anton      57: 
1.4       jwilke     58: Variable udp
1.1       anton      59: 
                     60: AUser next-task        main-task next-task !
                     61: AUser prev-task        main-task prev-task !
                     62: AUser save-task        0 save-task !
1.3       jwilke     63: AUser sp0      \ used by douser:, must be user
                     64:                ' sp0 Alias s0
                     65: AUser rp0      ' rp0 Alias r0
1.5       anton      66: AUser fp0       \ no f0, because this leads to unexpected results
1.3       jwilke     67: AUser lp0      ' lp0 Alias l0
                     68: AUser handler  \ pointer to last throw frame
1.1       anton      69: \ AUser output
                     70: \ AUser input
                     71: 
                     72: AUser errorhandler
                     73: 
                     74: AUser "error            0 "error !
                     75: 
1.3       jwilke     76: [IFUNDEF] #tib         \ in ec-Version we may define this ourself
                     77:  User tibstack         \ saves >tib in execute
                     78:  User >tib             \ pointer to terminal input buffer
                     79:  User #tib             \ chars in terminal input buffer
                     80:  User >in               0 >in ! \ char number currently processed in tib
                     81: [THEN]
1.7     ! pazsan     82: has? file [IF]
1.1       anton      83:  User blk               0 blk !
                     84:  User loadfile          0 loadfile !
                     85: 
                     86:  User loadfilename#    0 loadfilename# !
                     87: 
                     88:  User loadline          \ number of the currently interpreted
                     89:                         \ (in TIB) line if the interpretation
                     90:                         \ is in a textfile
                     91:                         \ the first line is 1
                     92: 
                     93: 2User linestart         \ starting file postition of
                     94:                         \ the current interpreted line (in TIB)
1.7     ! pazsan     95: [THEN]
1.1       anton      96: 
                     97:  User base              A base !
                     98:  User dpl               -1 dpl !
                     99: 
                    100:  User state             0 state !
                    101: AUser normal-dp                \ the usual dictionary pointer
                    102: AUser dpp              normal-dp dpp !
                    103:                        \ the pointer to the current dictionary pointer
                    104:                         \ ist reset to normal-dp on (doerror)
                    105:                         \  (i.e. any throw caught by quit)
                    106: AUser LastCFA
                    107: AUser Last
                    108: 
1.7     ! pazsan    109: has? glocals [IF]
1.1       anton     110: User locals-size \ this is the current size of the locals stack
                    111:                 \ frame of the current word
1.7     ! pazsan    112: [THEN]
1.1       anton     113: 

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