relicense to 0BSD
[pforth] / readme.txt
CommitLineData
8e9db35f
PB
1README for pForth - a Portable ANS-like Forth written in ANSI 'C'
2
3by Phil Burk
4with Larry Polansky, David Rosenboom and Darren Gibbs.
5Support for 64-bit cells by Aleksej Saushev.
6
12fb2616 7Last updated: April 24, 2018 V28
8e9db35f
PB
8
9Code for pForth is maintained on GitHub at:
10 https://github.com/philburk/pforth
11
12Documentation for pForth at:
13 http://www.softsynth.com/pforth/
14
15For technical support please use the pForth forum at:
16 http://groups.google.com/group/pforthdev
17
18-- LEGAL NOTICE -----------------------------------------
19
1f99f95d
S
20Permission to use, copy, modify, and/or distribute this
21software for any purpose with or without fee is hereby granted.
22
23THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
24WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
25WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
26THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
27CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
28FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
29CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
30OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
8e9db35f
PB
31
32-- Contents of SDK --------------------------------------
33
34 build - tools for building pForth on various platforms
8e9db35f
PB
35 build/unix - Makefile for unix
36
37 csrc - pForth kernel in ANSI 'C'
38 csrc/pf_main.c - main() application for a standalone Forth
39 csrc/stdio - I/O code using basic stdio for generic platforms
40 csrc/posix - I/O code for Posix platform
41 csrc/win32 - I/O code for basic WIN32 platform
42 csrc/win32_console - I/O code for WIN32 console that supports command line history
43
44 fth - Forth code
45 fth/util - utility functions
46
47-- How to build pForth ------------------------------------
48
49See pForth reference manual at:
50
51 http://www.softsynth.com/pforth/pf_ref.php
52
53-- How to run pForth ------------------------------------
54
55Once you have compiled and built the dictionary, just enter:
56 pforth
57
58To compile source code files use: INCLUDE filename
59
60To create a custom dictionary enter in pForth:
61 c" newfilename.dic" SAVE-FORTH
62The name must end in ".dic".
63
64To run PForth with the new dictionary enter in the shell:
65 pforth -dnewfilename.dic
66
67To run PForth and automatically include a forth file:
68 pforth myprogram.fth
69
70-- How to Test PForth ------------------------------------
71
72You can test the Forth without loading a dictionary
73which might be necessary if the dictionary can't be built.
74
75Enter: pforth -i
76In pForth, enter: 3 4 + .
77In pForth, enter: loadsys
78In pForth, enter: 10 0 do i . loop
79
80PForth comes with a small test suite. To test the Core words,
81you can use the coretest developed by John Hayes.
82
83Enter: pforth
84Enter: include tester.fth
85Enter: include coretest.fth
86
87To run the other tests, enter:
88
89 pforth t_corex.fth
90 pforth t_strings.fth
91 pforth t_locals.fth
92 pforth t_alloc.fth
93
94They will report the number of tests that pass or fail.