| 1 | README for pForth - a Portable ANS-like Forth written in ANSI 'C'\r |
| 2 | \r |
| 3 | by Phil Burk\r |
| 4 | with Larry Polansky, David Rosenboom and Darren Gibbs.\r |
| 5 | \r |
| 6 | Last updated: Feb 20, 2009 V24\r |
| 7 | |
| 8 | Code for pForth is maintained on Google at: |
| 9 | http://code.google.com/p/pforth/ |
| 10 | \r |
| 11 | Documentation for pForth at: |
| 12 | http://www.softsynth.com/pforth/\r |
| 13 | |
| 14 | For technical support please use the pForth forum at: |
| 15 | http://groups.google.com/group/pforthdev |
| 16 | \r |
| 17 | The author is available for customization of pForth, porting to new\r |
| 18 | platforms, or developing pForth applications on a contractual basis.\r |
| 19 | If interested, contact Phil Burk at: |
| 20 | http://www.softsynth.com/contacts.php\r |
| 21 | \r |
| 22 | -- LEGAL NOTICE -----------------------------------------\r |
| 23 | \r |
| 24 | The pForth software code is dedicated to the public domain,\r |
| 25 | and any third party may reproduce, distribute and modify\r |
| 26 | the pForth software code or any derivative works thereof\r |
| 27 | without any compensation or license. The pForth software\r |
| 28 | code is provided on an "as is" basis without any warranty\r |
| 29 | of any kind, including, without limitation, the implied\r |
| 30 | warranties of merchantability and fitness for a particular\r |
| 31 | purpose and their equivalents under the laws of any jurisdiction.\r |
| 32 | \r |
| 33 | -- Contents of SDK --------------------------------------\r |
| 34 | \r |
| 35 | build - tools for building pForth on various platforms\r |
| 36 | build/win32/vs2005 - Visual Studio 2005 Project and Solution\r |
| 37 | build/unix - Makefile for unix\r |
| 38 | \r |
| 39 | csrc - pForth kernel in ANSI 'C'\r |
| 40 | csrc/pf_main.c - main() application for a standalone Forth\r |
| 41 | csrc/stdio - I/O code using basic stdio for generic platforms\r |
| 42 | csrc/posix - I/O code for Posix platform\r |
| 43 | csrc/win32 - I/O code for basic WIN32 platform\r |
| 44 | csrc/win32_console - I/O code for WIN32 console that supports command line history\r |
| 45 | \r |
| 46 | fth - Forth code\r |
| 47 | fth/util - utility functions\r |
| 48 | \r |
| 49 | -- How to build pForth ------------------------------------\r |
| 50 | \r |
| 51 | See pForth reference manual at:\r |
| 52 | \r |
| 53 | http://www.softsynth.com/pforth/pf_ref.htm\r |
| 54 | \r |
| 55 | -- How to run pForth ------------------------------------\r |
| 56 | \r |
| 57 | Once you have compiled and built the dictionary, just enter:\r |
| 58 | pforth\r |
| 59 | \r |
| 60 | To compile source code files use: INCLUDE filename\r |
| 61 | \r |
| 62 | To create a custom dictionary enter in pForth:\r |
| 63 | c" newfilename.dic" SAVE-FORTH\r |
| 64 | The name must end in ".dic".\r |
| 65 | \r |
| 66 | To run PForth with the new dictionary enter in the shell:\r |
| 67 | pforth -dnewfilename.dic\r |
| 68 | \r |
| 69 | To run PForth and automatically include a forth file:\r |
| 70 | pforth myprogram.fth\r |
| 71 | \r |
| 72 | -- How to Test PForth ------------------------------------\r |
| 73 | \r |
| 74 | You can test the Forth without loading a dictionary\r |
| 75 | which might be necessary if the dictionary can't be built.\r |
| 76 | \r |
| 77 | Enter: pforth -i\r |
| 78 | In pForth, enter: 3 4 + .\r |
| 79 | In pForth, enter: loadsys\r |
| 80 | In pForth, enter: 10 0 do i . loop\r |
| 81 | \r |
| 82 | PForth comes with a small test suite. To test the Core words,\r |
| 83 | you can use the coretest developed by John Hayes.\r |
| 84 | \r |
| 85 | Enter: pforth\r |
| 86 | Enter: include tester.fth\r |
| 87 | Enter: include coretest.fth\r |
| 88 | \r |
| 89 | To run the other tests, enter:\r |
| 90 | \r |
| 91 | pforth t_corex.fth\r |
| 92 | pforth t_strings.fth\r |
| 93 | pforth t_locals.fth\r |
| 94 | pforth t_alloc.fth\r |
| 95 | \r |
| 96 | They will report the number of tests that pass or fail.\r |