Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #57642

ANN: WF32, a Windows 32 bit Forth

From Alex <alex@rivadpm.com>
Newsgroups comp.lang.forth
Subject ANN: WF32, a Windows 32 bit Forth
Date 2017-04-20 15:02 +0100
Organization A noiseless patient Spider
Message-ID <odaesj$quo$1@dont-email.me> (permalink)

Show all headers | View raw


I've put my Windows Forth up on github at 
https://github.com/alextangent/wf32

Licensed where possible under the 2 clause BSD 
https://opensource.org/licenses/BSD-2-Clause

The system started life as a branch of Win32Forth. It is now pretty well
unrecognisable, but it has helped bootstrap WF32 into life.

. it's a complete bottom up rewrite
. it's an STC not an ITC;
. it doesn't do very many Window-ey things and is a console application;
. it has a very extensive and completely rewritten assembler that
supports 32 and 64 bit rather than the original 16 and 32 bit
. it is very documentation lite.
. and so on.

The original Win32Forth system was public domain. Although the basic
features of Win32Forth (for instance, meta compilation) and some of
its capabilities are employed in this code, all of the original
Win32Forth kernel, and much of the supporting code, have been completely 
rewritten. Win32Forth was a very fat Forth. WF32 isn't.

Jim Schneider wrote the original assembler and licensed it under the
GPL/LGPL, but none of it is used in WF32.

As such, each file has either a BSD licence (see below) or a note 
explaining the provenance; normally, that is was borrowed from the 
public domain Win32Forth.

If there are any discrepancies or copyright issues, please contact me
at alex at rivadpm dot com and I will endeavour to correct the
licence, remove, or rewrite out, the disputed code.

Why change the licence from public domain to BSD? Partly because PD 
really doesn't have any legal standing in UK law; a new version of a 
public domain work will be copyright protected, even though the original 
work is not. (It's even debatable that Tom Zimmer could put Win32Forth 
into the public domain.) I am not a lawyer, but the 2 clause BSD licence 
seems to be most appropriate in this case. It has no meaningful 
restrictions beyond recognising copyright.

To install it, download and run REBUILD32.BAT. This builds WF32.EXE from 
the kernel GKERNEL32.EXE, then recompiles the kernel code. If you make 
any changes to the kernel or the meta compiler in the SRC/KERNEL 
directory, then run REBUILD32.BAT again. (Take a backup of the 
executables first.) If you make changes to files in SRC or SRC/ASM, run 
EXTEND32.BAT instead.

The system implements most of Forth 2012 with the exception of some of 
the string extension words like SUBSTITUTE and UNESCAPE; the BLOCK 
wordset; and the float wordset.

It passes Gerry Jackson's HAYES tester (which I have included in the 
distribution; it was from 
https://github.com/gerryjackson/forth2012-test-suite/tree/master and I 
claim no more than copying rights on that code. Two of the files have 
been edited to support WF32 testing out of the box).

There is a float assembler, but the float support and the disassembler 
has not yet been completed. The interface to Windows doesn't use the VFX 
contributed code, but my own library and import functionality. The 
console support is horrible; the cursor dashes around and it needs 
rewritten.

Beyond a benchmark and the ANS tester, there aren't any demo programs. I 
have several thousands of lines of more code that I will add as I'm 
able, but my interests lie in compiler technology, so don't expect any 
Soduku games. It generates some passable code, and has a few 
optimisations built in;

. Does constant folding ( 1 1 + is compiled as 2 )
. Does tail call optimisation
. Does inlining on small words

CATCH will catch Windows errors. A common one is recompiling WF32.EXE 
and getting

Building image wf32.exe
  include src\extend32 fsave wf32 bye
                             ^^^^
Error -311 in (evaluate): wf32 windows call error
The process cannot access the file because it is being used by another 
process.

Windows won't let you write to a file that's being executed, so 
terminate the other copies first.

To save your program as an executable, FSAVE <name>. This will produce a 
full EXE file that you can run.

-- 
Alex

Back to comp.lang.forth | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-20 15:02 +0100
  Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-20 15:55 +0100
    Re: ANN: WF32, a Windows 32 bit Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-20 17:17 +0000
      Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-20 19:23 +0100
        Re: ANN: WF32, a Windows 32 bit Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 09:40 +0000
        Re: ANN: WF32, a Windows 32 bit Forth josv@planet.nl - 2017-04-21 02:58 -0700
          Re: ANN: WF32, a Windows 32 bit Forth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-21 11:44 +0000
          Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-21 13:49 +0100
            Re: ANN: WF32, a Windows 32 bit Forth josv@planet.nl - 2017-04-21 09:03 -0700
  Re: ANN: WF32, a Windows 32 bit Forth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-20 19:22 +0200
    Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-20 19:19 +0100
  Re: WF32, a Windows 32 bit Forth "HAA" <someone@microsoft.com> - 2017-04-21 13:44 +1000
    Re: WF32, a Windows 32 bit Forth Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-04-21 22:45 -0400
      Re: WF32, a Windows 32 bit Forth Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-04-21 22:50 -0400
        Re: WF32, a Windows 32 bit Forth rickman <gnuarm@gmail.com> - 2017-04-22 00:57 -0400
          Re: WF32, a Windows 32 bit Forth Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-04-22 23:32 -0400
          Re: WF32, a Windows 32 bit Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-24 16:54 +0000
            Re: WF32, a Windows 32 bit Forth rickman <gnuarm@gmail.com> - 2017-04-24 13:05 -0400
              Re: WF32, a Windows 32 bit Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-25 07:26 +0000
      Re: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-22 12:48 +0100
  Re: ANN: WF32, a Windows 32 bit Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-24 13:59 +0000
    Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-24 16:41 +0100
      Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-29 19:13 +0100
  Re: ANN: WF32, a Windows 32 bit Forth NN <november.nihal@gmail.com> - 2017-04-24 14:07 -0700
    Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-24 22:48 +0100
      Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-29 19:49 +0100
        Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-30 22:33 +0100
  Re: ANN: WF32, a Windows 32 bit Forth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-30 12:20 +0200
    Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-30 12:00 +0100
      Re: ANN: WF32, a Windows 32 bit Forth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-30 14:39 +0200
        Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-30 14:03 +0100
          Re: ANN: WF32, a Windows 32 bit Forth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-30 19:51 +0200
            Re: ANN: WF32, a Windows 32 bit Forth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-30 20:03 +0200
              Re: ANN: WF32, a Windows 32 bit Forth Alex <alex@rivadpm.com> - 2017-04-30 20:06 +0100

csiph-web