COMPAT.TXT      Compatibility problems in F88        by Tom Zimmer


  F88 is a Forth system which moves the LIST portion of a ":" COLON
definition into another segment.  The technique used in F88 to
accomplish this causes very few problems with compatibility, but
there are a few, so here are the ones I know about.

        EXECUTION ARRAYS

  A popular  F83 programming technique for creating a table of
execution vectors is as follows:

        CREATE mytable ]
        func0   func1   func2   func3   func4   func5   func6
        func7   func8   func9   func10  [

        : domytable     ( n1 --- )
                        2* mytable + PERFORM ;

  It works like this, a number n1 is passed to DOMYTABLE, which
causes function number n1 to be performed from the table MYTABLE.

  F88 has a problem with the above technique, as the CREATE creates
MYTABLE in CODE space, and the FUNC's are compiled in LIST space.
That is, in another segment. Since MYTABLE will return an address in
CODE space, DOMYTABLE will misfunction.

  To deal with this type of problem, F88 provides a function called
EXEC: which I obtained from Charles Curley with this definition:

        : EXEC:         ( n1 --- )
                        2* R> + XPERFORM ;

  EXEC: is used as follows:

        : domytable     ( n1 --- )
                        EXEC:
        func0   func1   func2   func3   func4   func5   func6
        func7   func8   func9   func10  ;

  I think you will agree that this is a reasonable solution, The word
EXEC: can infact be implimented on a normal F83 system, using PERFORM
instead of XPERFORM, to provide the same functionality with complete
portability of code across systems.  As you can see the definiton
MYTABLE was not even needed, and the definition above is just a
normal COLON definition which can be debugged, decompiled ect.


