-- Notes for vsn 4.0.627 -----------------------------------------------------------------------------------

This is the second (Christmas 2010) release of iForth32/64 (32/64-bits iForth).

Significant improvements and changes.

1. Various problems installing version 4.0 were solved. Hanno Schwalm's
   snapshot generator removes the problem with incorrect file permissions on 
   non-Windows OSs. A problem with the database file used by locate.frt has
   been solved. This release will have an official evaluation version with
   less examples and loadable utilities than the full system.

2. Version 4.0 could only print FP numbers with 18 digits of precision, max.
   The new release is accurate upto 22 digits. 
   Note that some exactly representable FP numbers need hundreds of digits 
   to print in decimal -- iForth cannot do this. C-based Forths solve this
   problem by using a large-integer package inside of printf etc.. However,
   this won't work on MS-Windows because iForth uses the long double (80-bits) 
   FP type which Microsoft stubbornly refuses to support. There are no GNU-based 
   64-bit compilers for 64-bit Windows (yet). Therefore iForth does all formatting 
   in Forth itself. 
   Input of FP numbers uses BCD numbering and rounds with even ties to full 
   80-bit precision, regardless of the number of digits input. Although the 
   scheme works efficiently and precisely, it is *not* IEEE-conformant. 

   Note that it is possible to input floating-point number in hexadecimal, 
   using the hexfloat.frt loadable extension. Hexfloat has been extended 
   so that it can read the hex output of most C compilers.

3. On MS-Windows, the graphics system is now almost fully compatible with 
   Linux/OSX graphics. The aspect ratio for variable-sized windows is changed
   to be always 1:1, and circles are round and stay that way.
   Hanno Schwalm's Jack GUI works perfectly on Linux, and almost correctly
   on Windows (almost -- Hanno has/wants no Windows system to test on).
   Check new environment variables IFORTH_GWIDTH, IFORTH_GHEIGHT, IFORTH_GNAME,
   IFORTH_GXSIZE, and IFORTH_GYSIZE.
   Interesting application examples: SDL 32/64 has been ported to iForth. There
   is also a DICOM viewer.

4. The EXTERN: mechanism has gotten a nice sugary coating and now looks a lot
   more like the one offered by MPE (FLAG initiative). Note that iForth's
   EXTERN: is 32 *and* 64-bit (future) proof and upwards compatible.

5. The optimizer now handles POSTPONE in a better way. Words like:
   : FIELD2 ( offset size -- new-offset ) 
	>r >r : r@ postpone literal postpone + postpone ; r> r> + ;
   may now compile to faster code.

	FORTH> 8 16 field2 x::  ok
	[1]FORTH> . 24  ok
	FORTH> : test 0 x:: @ ;  ok
	FORTH> see test
	Flags: TOKENIZE, ANSI
	: test  0 x:: @ ;  ok
	FORTH> ' test idis
	$01242E80  : [trashed]
	$01242E8A  push          8 qword-offset
	$01242E90  ;

6. The mouse-coordinates delivered by wmouse.frt were full-screen (not application window
   based) and origin and size were weird.
 
7. The Linux $DFWFORTH/config has become ~/config,
   The Linux $DFWFORTH/config64 has become ~/config64,
   The Linux filenamedatabase.dat has moved from $DFWFORTH/dataf to ~/config[64]

8. Linux "#!" now works for iForth, but I/O redirection on the command line 
   still has problems.
   Paste the following text in file test1 (no dashed lines):

   -- -----------------------------------------------------------
   #! /home/marcel/dfwforth/iflinux/linux-bin/iforth include
   CR .( HELLO WORLD!) 
   CR .( 3 + 4 = ) 3 4 + .
   BYE
   -- -----------------------------------------------------------

   Make the file executable with "chmod +x test1" (no quotes).

   Now do:

   marcel@hyperius:~> ./test1

   HELLO WORLD!
   3 + 4 = 7
   marcel@hyperius:~>

   The essential tricks here are:

      0. Set up the environment variables IFORTH IFORTHBIN IFORTH_VERBOSE
         globally (normally this is done by the i4 script for the duration
         of iForth's runtime)

      1. At least one space between #! and /home/...

      2. An absolute path to the iForth executable (not a script!)

      3. The word "include" after the executable


   If you need the iforth.prf file to execute, just do

   -- -----------------------------------------------------------
   #! /home/marcel/dfwforth/iflinux/linux-bin/iforth include
   INCLUDE iforth.prf
   CR .( HELLO WORLD!) 
   CR .( 3 + 4 = ) 3 4 + .
   BYE
   -- -----------------------------------------------------------

   This is not so nice, as the modules announce being loaded, which
   might not be wanted for this application. The only solution I see 
   now is to revector TYPE with 2DROP temporarily.


 9. The 64-bit assembler now allows a number of 32-bit register and 
    addressing manipulations. Some more bugs were fixed in the assembler.

10. The }fmins function in gaussj.frt works correctly.

11. Fixed a bug in FILE-STATUS, FORTH-PROCESS and 2+!. FILE-STATUS now returns
    useful information.	Also disabled an optimization on n RSHIFT m LSHIFT that did
    not reproduce the cleared bits that are generated as a side-effect.

12. Dumps of the return stack in case of error can now be turned off: 
    __rstackdump__  ON | OFF

13. FLNP1 was wrong on iForth32. Also fixed FASINH .

iForth is not free. It can be ordered through Kagi 
( http://store.kagi.com/cgi-bin/store.cgi?storeID=AMP_LIVE&currency=EUR )

The iForth development team

(Marcel Hendrix, Hanno Schwalm and Charles Turner)

-- Notes for vsn 4.0.0 -------------------------------------------------------------------------------------
This is the first release of iForth32/64 (32/64-bits iForth).
The version number has been bumped up to 4.0. 

The release is available for Windows (tested for XP Professional 32 and 
64 bit), Linux x86_32 or x86_64, and Mac OSX (Intel hardware only, tested 
for both 32 and 64 bits).

Significant improvements and changes for this first 32/64 bit release ...

1. Internally, this iForth uses 80-bit floats (again). 
   The reasons to use 64-bit floats were efficiency (80-bit floats are slower 
   to fetch and store, and the instruction does not have the special memory 
   accesses that are there for 32/64 bit IEEE floats), and the fact that all 
   OS code and libraries use 64-bit exclusively (probably because SSE2 *only* 
   knows 32/64 bit instructions).

   With the current efforts to get IEEE-compatible floating-point, I anticipated
   problems for the iForth model (80-bit calculations but 64-bit memory float stack 
   and default F@ / F! of 64 bits). I decided to evaluate the speed decrease 
   and inconvenience of going to 80-bits first. Unexpectedly, my tests showed 
   that speed would not suffer (the special 32/64 float instructions are
   only shorter, not faster), and that inconvenience was not really an issue -- 
   all the code that I inspected explicitly used DF@ etc. when calling the OS or
   libraries. I did fix a few problem (mm_old.frt., mm.frt) and introduced 
   DFLOCALS| because locals have an address, and this address is sometimes 
   used by !, F@, DF! etc..

   A consequence of this change is that FCONSTANT, FVARIABLE and FVALUE are now
   80-bits. This will sometimes show up in much higher default accuracy (i.e
   a standard Forth benchmark or utility will be 1000 * more accurate than the
   author claims, even if they wrote it assuming 64-bit precision and 
   accordingly limited the size of power series etc.).

2. Improvements to floating-point input and output words so that they are 
   bit-accurate for 80-bit words. Upgraded FALOG and F** .

   This was a lot of work, because printing an 80-bit float using 80-bit instructions
   is a lot harder than print a 64-bit datum using 80-bit instructions.

   Made more consistent:  12e FALOG   and   10e 12e F**  and  1e12 result in
   the same bit patterns ( PAD F! PAD 12 DUMP ).
 
3. Speed improvement of locals
   A local can be very slow, and I decided to investigate why. It took a huge
   amount of time in experimenting, but it seems to be an alignment issue. 
   Putting the locals stack at a very specific location (alignment) increases
   speed by almost a factor of 3. I can do this for the main task's locals,
   but for threads the programmer must (re)locate it by himself (if he cares).
   I can not guarantee the alignment I chose is hardware-independent, but it
   does work on all of my 32/64 machines (Athlon X64, Intel PIV, Intel Core2 Duo).

4. IEEE word set (no exceptions yet).
   See David Williams' CLF postings. His 'reasonable' word proposals have flown
   into iForth. The most difficult to write were (S/D/X)FNEXTUP. Also wrote 
   ./dfwforth/include/hexfloat.frt which works for 32 and 64bit Forth alike.
   The IEEE exception wordset proposal has not been implemented yet. 

5. OS-level threads and callbacks for each supported platform (32/64 bit),
   where an arbitrary mix of integer and floating-point parameters is 
   supported. The interface is a superset of MPE's EXTERN: interface,
   as donated to the FLAG (Forth Library Action Group) initiative.
   
   There is no limit on what threads and callbacks are allowed to do: 
   floating-point arithmetic, execution of complete SPICE jobs, multiple 
   invocations of external programs, even compilation of thread-local Forth 
   code -- it will all work.

   Threads and callbacks have private stacks (data, return,
   floating-point, system, and locals), plus a private USER area and
   dictionary. Semaphored I/O is supported for threads, and Forth-level 
   interactive debugging of parallel code (.S ABORT etc.) is possible.

6. The OpenGL driver has been removed. An effort is underway to restore
   the lost functionality through externally linking FreeGLUT. 

7. fJACK, a multi-threaded, real-time, sound interface (Jack), is now fully 
   functional on all platforms.

8. Second generation installation programs for Windows, Linux and Mac OSX are 
   available. However, be warned that iForth is definitely not for beginners!

9. iForth32/64 comes with 9,926 example and documentation files (some zipped). 
   The release is distributed through an internet server, so that the typical 
   delivery time from Kagi-to-disk is one day.
   
10. An evaluation version of iForth32/64 is available. It does not include server
    source code for OSX/Linux and the number of examples is severely limited. Also,
    specialized floating-point and other libraries are missing. However, the full
    power of the interpreter and compiler is available.

11. Minor fix: DOES> works interpretively. 

12. There is a new LOCATE facility that automatically indexes user code and shows 
    source on demand ( LOCATE <name> ). INSPECT jumps to source using your own editor 
    and crossreferencing support is available with WHERE <name>.

13. Many bugs fixed in the 64bit assembler and disassembler, markedly for SSE2 
    instructions.

iForth is not free. It can be ordered through Kagi 
( http://store.kagi.com/cgi-bin/store.cgi?storeID=AMP_LIVE&currency=EUR )

The iForth development team

(Marcel Hendrix, Hanno Schwalm and Charles Turner)
