File Manifest
JonesForthInC-V148.htmlThis manifest.
JonesForthInC-V148.zip An internet hosted zip file which contains these files.
test1.fA few tests in Forth.
test2.fAnother Forth file to test command line loading.
tester.f A harness to run coretest.f. It was lifted from this4th and has not yet ported to JonesForth.
Please, HELP!
coretest.fSee tester.f above.
JonesForthInC.c My port of Richard Jones' excellent JonesForth.S and JonesForth.f tutorial.
It is designed to compile under MS-VC++ Version 6
JonesForthInC.exe The compiled binary version of JonesForthInC.c, ready to rock'n roll.


How to Invoke JonesForthInC
JonesForthInC.exe is a Windows 32 bit console application executable.
It contains both the assembler portion and high-level Forth code of JonesForth.S and JonesForth.f
Copy JonesForthInC.exe from the ZIP file container into the folder of your choice.
If command line arguments are not required, merely double click on the EXE file
If command line arguments are needed:
  1. create a shortcut to JonesForthInC.exe
  2. edit the properties
  3. add the desired arguments to the end of the contents of the "target" edit box.


The Story So Far
JonesForthInC is not quite ready for Prime Time, and I am not too proud to ask for help.

Specifically, I am struggling to make JonesForthInC startup process as ANS Forth compliant as possible. As it is, the JonesForthInC interpreter is simple, elegant and working -- just not ANS compliant.

This version of JonesForthInC has the high-level Forth kernel code embedded in the EXE file so that upon launching, the entire kernel will be completely loaded and running.

During startup, any command line arguments prefixed with the three characters, "/f:", such as "/f:MyForthApp.f", are automatically run before the interactive Forth command interpreter is invoked. This way, an application can start doing its thing straight away. NOTE: all "/f:" files must appear first on the command line. Loading stops at the first argument not so prefixed, which then become the property of MyForthApp.f.

So, how can this startup process be made ANS Forth compliant?

I have studied the ANS forth words SOURCE, SOURCE-ID, >IN, BLK, plus others like SEARCH-LIST, and PARSE, but how do I put it all together? What is most important to the concerned Forth-er?

I have long admired the Forth language -- its simple syntax, self-hosting ability, interactive nature, dictionary structure, and utterly awesome compiler. Only recently, though, have I decided to internalize and grok this elegance. When I found JonesForth, I thought to myself, "Here is an opportunity to finally embrace Forth in its minimalist form...", only to crash into the ANS Forth standard.

As a professional software developer of many decades, I know that standards are important. But sometimes, conforming to standards is Very Hard Work.

So, forth-ers of goodwill everywhere, could you lend a hand to make JonesForthInC a better Forth?


The DONE list.
The original version of this file was found here:
https://github.com/chengchangwu/jonesforth/blob/master/TODO

According to ANSForth and bb4wforth, jonesforth 47 is not
in compliance with ANS Forth.

JonesForthInC V 148 was ported to Windows from JonesForth V 45.
(D) indicates changes to JonesForthInC to conform to ANS Forth.

Core words with bugs ()
(D)     /MOD      fixed in jonesforth.S using bb4wforth's version.
(D)     U.        fixed in jonesforth using bb4wforth's version.

Non standard core words
(D)     DEPTH     fixed in jonesforth.fs using bb4wforth's version.
(D)     .S        fixed by ccwu.
(D)     HERE      implemented by ccwu. jonesforth's HERE is renamed to DP. 
(D)     ALLOT     fixed by ccwu.
(D)     CREATE    renamed jonesforth's version to HEADER,
                  ANS version of CREATE implemented using bb4wforth's version.
(D)     VARIABLE  fixed by ccwu.
(D)     TRUE      fixed by ccwu. All the comparison words returns -1 for TRUE.
(D)     FIND      not yet implemented. jonesforth's FIND is renamed to (FIND).
(D)     WHILE     fixed using bb4wforth's version.
(D)     REPEAT    fixed using bb4wforth's version.
        WORD
        KEY
(D)     [']       doesn't work on immediate word.
(D)     '         fixed by ccwu.
        IMMEDIATE

Core Words not yet implemented
        DOES>
(D)     2!        fixed using bb4wforth's version.
(D)     2*        fixed using bb4wforth's version.
(D)     2/        fixed using bb4wforth's version.
(D)     2@        fixed using bb4wforth's version.
(D)     2OVER     fixed using bb4wforth's version.
(D)     CELL+     fixed using bb4wforth's version.
(D)     CHAR+     fixed using bb4wforth's version.
(D)     CHARS     fixed using bb4wforth's version.
(D)     MOVE      fixed using bb4wforth's version.
(D)     [CHAR]    fixed using bb4wforth's version.
(D)     DO        implemented by ccwu.
(D)     (DO)
(D)     LOOP      implemented by ccwu.
(D)     (LOOP)
(D)     +LOOP     implemented by ccwu.
(D)     (+LOOP)
(D)     UNLOOP    implemented by ccwu.
(D)     I         implemented by ccwu.
(D)     J         implemented by ccwu.
(D)     LEAVE     implemented by ccwu using a leave stack of depth 31.
                  ABORT or QUIT should reset the leave stack pointer,
                  which is not yet implemented.
(D)     QUIT      resets leave stack pointer. implemented by JAL
(D)     ABS       implemented by ccwu.

        # #> #S */ */MOD <# >BODY >IN >NUMBER
        ABORT" ACCEPT COUNT ENVIRONMENT?
        EVALUATE FILL FM/MOD HOLD M* MAX MIN
        POSTPONE R@ S>D SIGN SM/REM SOURCE U< UM* UM/MOD
        LSHIFT RSHIFT 

Core extension words not yet implemented
(D)     2>R     fixed using bb4wforth's version.
(D)     2R>     fixed using bb4wforth's version.
(D)     ?DO     implemented by ccwu.

        #TIB .( 2R@ C" COMPILE, CONVERT ERASE EXPECT MARKER
        PAD PARSE QUERY REFILL RESTORE-INPUT ROLL SAVE-INPUT SOURCE-ID
        SPAN TIB U> 



Visitor #


This page posted by

James Larson
Programmer/Analyst Consultant
www.dst-corp.com/james
email
In God We Trust...