File:  [gforth] / gforth / model
Revision 1.5: download - view: text, annotated - select for diffs
Tue Nov 7 18:06:55 1995 UTC (28 years, 1 month ago) by anton
Branches: MAIN
CVS tags: v0-4-0, v0-3-0, v0-2-1, v0-2-0, gforth-0_1beta, HEAD
added copyright headers
changes to loadfilename & co. to make savesystem transparent to
 assertions and ~~

This file describes the implementation model of Gforth. The things
described herein are valid in all implementations of Gforth.
!! needs updating

\ Copyright (C) 1995 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
\ 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.

The instruction pointer (ip) is post-incremented.

Branches are relative:
offset:	target - offset
target:	...

The top-of return stack is in memory

The top of data stack need not be in memory. Other data stack items
are in memory.

The stacks grow downward

flags are represtented by 0 and -1

The loop control parameters are the index on the top of return stack
and the limit on the second item.

Everything except the virtual machine registers (ip, sp, etc.) is

The return address on the return stack occupies one cell.

There is a floating point stack
The floating point numbers are the same as C's double numbers

The error returns of the file word set are FALSE or TRUE. (or should
we use errno? Does this work with stdio functions?)

No assumptions can be made about the order of fetching the xt of the
next word wrt the other operations in a forth word. This makes a
difference only if you want to execute code lying on the stack or if
you store into the very next word that is executed.

FreeBSD-CVSweb <>