[gforth] / gforth / model  

gforth: gforth/model


1 : anton 1.1 $Id: model,v 1.3 1992/09/11 12:13:54 anton Exp $
2 :     Copyright 1992 by the ANSI figForth Development Group
3 :    
4 :     This file describes the implementation model of ANSI figForth. The things
5 :     described herein are valid in all implementations of ANSI figForth.
6 :    
7 :     The instruction pointer (ip) is post-incremented.
8 :    
9 :     Branches are relative:
10 :     branch
11 :     offset: target - offset
12 :     ...
13 :     target: ...
14 :    
15 :     The top-of return stack is in memory
16 :    
17 :     The top of data stack need not be in memory. Other data stack items
18 :     are in memory.
19 :    
20 :     The stacks grow downward
21 :    
22 :     flags are represtented by 0 and -1
23 :    
24 :     The loop control parameters are the index on the top of return stack
25 :     and the limit on the second item.
26 :    
27 :     Everything except the virtual machine registers (ip, sp, etc.) is
28 :     addressable.
29 :    
30 :     The return address on the return stack occupies one cell.
31 :    
32 :     There is a floating point stack
33 :     The floating point numbers are the same as C's double numbers
34 :    
35 :     The error returns of the file word set are FALSE or TRUE. (or should
36 :     we use errno? Does this work with stdio functions?)
37 :    
38 :     No assumptions can be made about the order of fetching the xt of the
39 :     next word wrt the other operations in a forth word. This makes a
40 :     difference only if you want to execute code lying on the stack or if
41 :     you store into the very next word that is executed.

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help