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