This repository was archived by the owner on Sep 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathREADME
More file actions
775 lines (608 loc) · 29.4 KB
/
README
File metadata and controls
775 lines (608 loc) · 29.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
The Forth Foundation Library (FFL)
==================================
The Forth Foundation Library is a general purpose forth library. It gives you a
collection of words written in (ANS) Forth, in areas such as data types,
collections, development support, interfaces and compound modules. The library
is developed with gforth.
At the moment the library is still under development. The FFL library, the
example and test files are licensed under the GNU GPL.
Installation, Configuration And Testing
=======================================
gforth (Debian/Ubuntu)
----------------------
Step 1: install the library with the Debian package
a. Download and install the ffl-gforth_x.y.z-1_all.deb package
b. Start gforth
c. Enter: include ffl/frc.fs
d. If gforth doesn't report an error, the library is correctly installed.
Step 2: Configuration of the library
With the Debian package no further configuration is necessary.
Step 3: Test the library
The test scripts are installed in the /usr/share/ffl/x.y.z/test
directory. Due to ownership of those files (root), it is not
possible to run the tests directly in this directory, so ..
a. Create a temporary directory. For example: mkdir ~/ffl-test
b. Copy the test scripts to the temporary directory:
cp /usr/share/ffl/x.y.z/test/* ~/ffl-test
c. Change the current directory to the temporary directory:
cd ~/ffl-test
d. Enter: gforth ffl_test.fs -ab -c TEST --verbose --file=FILE input
(the command line arguments are for test purposes and have no real meaning,
enter them in the correct case)
e. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
f. Don't forget to cleanup the temporary directory.
Some notes for the Debian package:
a. The library is installed in /usr/share/gforth/site-forth/ffl
b. The test scripts are installed in /usr/share/ffl/x.y.z/test
c. The examples are installed in /usr/share/ffl/x.y.z/examples
d. The documentation is installed in /usr/share/doc/ffl
Due to file ownership reasons the test scripts and examples can not
be started directly in the install directories, but must be
copied to temporary directories under your own account.
Tested with gforth-0.7.0.
gforth (non-windows)
---------------------
Gforth uses a search path to find sources. If you install the ffl library
in this search path, gforth can find the library.
Step 1: install the library in the search path:
a. Start gforth
b. Enter: fpath .fpath
c. Gforth will show all the directories where sources are searched
d. Select a search directory that ends with 'site-forth' and exists
e. Copy the 'ffl' directory (and its contents) from the package to
the selected directory
f. Start gforth again
g. Enter: include ffl/frc.fs
h. If gforth doesn't report an error, the library is correctly installed,
else repeat the steps, but select a different directory
Step 2: Configuration of the library
For gforth no futher configuration is necessary.
Step 3: Test the library
a. Change the current directory to the 'test' directory in the package
b. Enter: gforth ffl_test.fs -ab -c TEST --verbose --file=FILE input
(the command line arguments are for test purposes and have no real meaning,
enter them in the correct case)
c. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with gforth-0.7.0.
gforth (windows)
----------------
Gforth uses a search path to find sources. If you install the ffl library
in this search path, gforth can find the library.
Step 1: Install the library in the search path:
a. Start gforth
b. Enter fpath .fpath
c. Gforth will show all the directories where sources are searched
d. If all shown directories start with '/usr', then gforths search
path is incorrect, else continue with j.
e. Determine where gforth is installed, this will normally be
'<drive>:\Program Files\gforth'
f. Add the environment variable: 'GFORTHPATH' with the value
'\Program Files\gforth:.'
(Environment variables can be added by: My Computer - Properties
- Advanced - Environment Variables)
g. Start gforth again
h. Enter fpath .fpath
i. Gforth should show '\Program Files\gforth' and '.'
j. Copy the 'ffl' directory (and its contents) from the package to
a search directory (except '.').
k. Start gforth again
l. Enter: include ffl/frc.fs
m. If gforth doesn't report an error, the library is correctly
installed, else repeat the steps but select a different directory
Step 2: Configuration of the library
For windows the 'end-of-line' word should be changed in the ffl/config.fs file,
so that it will return cr-lf. See the configuration chapter for more info about
the configuration items.
Step 3: Test the library
a. Start cmd
b. Change the current directory to the 'test' directory in the package
c. Enter: gforth ffl_test.fs -ab -c TEST --verbose --file=FILE input
(the command line arguments are for test purposes and have no real meaning,
enter them in the correct case)
d. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with gforth-0.7.0.
bigforth
--------
Bigforth uses a search path to find sources. If you install the ffl library
in this search path, bigforth can always find the library.
Step 1: Install the library in the search path:
a. Start bigforth
b. Enter: path
c. Bigforth will show all the directories where sources are searched, separated
by a ';'
d. Select one of the search directories that exists, but not the '.'
directory
e. Copy the 'ffl' directory (and its contents) from the package to
the selected directory
f. Copy from the 'engines/bigforth' directory in the package the files
'config.fs' and 'make.fs' to the 'ffl' directory in the selected
directory, resulting in 'ffl/config.fs' and 'ffl/make.fs'.
g. Start bigforth again
h. Enter: include ffl/frc.fs
i. If bigforth doesn't report an error, (exists warnings are okee),
the library is correctly installed, else repeat the steps, but
select a different directory
Step 2: Configuration of the library:
For bigforth the 'end-of-line' configuration in the ffl/config.fs file
is set for Unix/Linux. If you install bigforth for an different OS, you
should change the 'end-of-line' word. See the configuration chapter for
more info about the configuration items.
Step 3: Test the library:
a. Change the current directory to the 'test' directory in the package
b. Enter: bigforth ffl_test.fs
c. The test script will tell you which modules are tested and if there
were any errors.
If bigforth only reports errors for the fwt module, then all went well.
Bigforth reports errors for the fwt module, due to missing alignment
code in this forth engine.
Tested with bigforth 2.3.1
pfe
---
PFE uses a search path to find sources. If you install the ffl library
in this search path, pfe can find the library.
Step 1: Install the library in the search path:
a. Start pfe
b. Enter: .status
c. After the item 'search path for source files' pfe lists the directories,
separated by ':', that are used as search path.
d. Select one of the search directories, but not the '.pfe' directory
e. Copy the 'ffl' directory (and its contents) from the package to the
selected directory
f. Copy from the 'engines/pfe' directory in the package the files
'config.fs' and 'make.fs' to the 'ffl' directory in the selected
directory, resulting in 'ffl/config.fs' and 'ffl/make.fs'.
g. Start pfe again
h. Enter: include ffl/frc.fs
i. If pfe doesn't report an error, the library is correctly installed,
else repeat the steps, with a different directory.
Step 2: Configuration of the library:
For pfe the 'end-of-line' configuration in the ffl/config.fs file
is set for Unix/Linux. If you install pfe for an different OS, you
should change the 'end-of-line' word. See the configuration chapter for
more info about the configuration items.
Step 3: Test the library:
a. Change the current directory to the 'test' directory in the package
b. Enter: pfe ffl_test.fs -ab -c TEST --verbose --file=FILE input
(the command line arguments are for test purposes and have no real meaning,
enter them in the correct case)
c. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with pfe 0.33.70
Win32Forth
-----------
Win32Forth uses a search path to find sources. If you install the ffl
library in this search path, Win32Forth can find the library.
Step 1: Install the library in the search path:
a. Start Win32Forth
b. Enter: .fpath
c. This word shows first the 'Base paths' and after that the 'Search
paths'.
d. First select one directory of the 'base paths' and combine that
with one of the 'search paths'.
e. For example if you select 'c:\program files\win32forth' as base
path and 'SRC\LIB' as 'search path', you should copy the 'ffl'
directory (and its contents) from the package to the directory
'c:\program files\win32forth'.
f. Copy from the 'engines/Win32Forth' directory in the package
the files 'config.fs' and 'make.fs' to the 'ffl' directory in
the selected directory, resulting in 'ffl/config.fs' and
'ffl/make.fs'.
g. Start Win32Forth again
h. Enter: include ffl/frc.fs
i. If Win32Forth doesn't report an error (warnings are okee),
the library is correctly installed, else repeat the steps with
a different directory.
Step 2: Configuration of the library:
For Win32Forth no further configuration is necessary.
Step 3: Test the library:
a. Change the current directory to the 'test' directory in the package
b. Use an editor to remove the 'bye' from the 'ffl_test.fs' file in this
directory
c. Start Win32Forth.
d. Use in the window the 'chdir' word to move to the 'test' directory.
e. Use 'include ffl_test.fs' to run the tests.
f. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with Win32Forth 6.12.0
minForth
--------
minForth doesn't use a search path, so you should copy the library or
create a link to the library in your forth working directory.
Step 1a: Install the library by creating a link to the library
(UNIX and friends):
a. Copy the 'ffl' directory (and its contents) from the package to
a freely chosen directory. For example '~/lib', '/usr/lib' or
'/usr/local/lib' resulting in '~/lib/ffl', '/usr/lib/ffl' or
'/usr/local/lib/ffl'.
b. Copy from the 'engines/minForth' directory in the package the
files 'config.fs' and 'make.fs' to the 'ffl' directory in your
chosen directory, resulting in '~/lib/ffl/config.fs' and
'~/lib/ffl/make.fs', etc.
c. Create in your forth working directory a symbolic link to the
chosen directory. The name of this link should be 'ffl' and the
target the chosen directory. For example: 'ln -s ~/lib/ffl ffl'
or 'ln -s /usr/lib/ffl ffl' or 'ln -s /usr/local/lib/ffl ffl'.
d. Start minForth
e. Enter: include ffl/frc.fs
f. If all is well, minForth should include the file.
Step 1b: Install the library by coping the library:
a. Copy the 'ffl' directory (and its contents) from the package to
your working forth directory.
b. Copy from the 'engines/minForth' directory in the package the
files 'config.fs' and 'make.fs' to the 'ffl' directory in your
forth working directory, resulting in 'ffl/config.fs' and
'ffl/make.fs'.
c. Start minForth
d. Enter: 'include ffl/frc.fs'
e. If all is well, minForth should include the file.
Step 2: Configuration of the library:
For minForth the 'end-of-line' configuration in the ffl/config.fs file
is set for Unix/Linux. If you install minForth for an different OS, you
should change the 'end-of-line' word. See the configuration chapter for
more info about the configuration items.
Step 3: Test the library:
a. For running the tests the minForth engine is configured too small. So
extend the engine by editing the kernel.mfc file from minForth. Change
in this file the NAMES to 512000, the HEAP to 640000, the LIMIT to 1000000,
the SPMAX to 256 and the RPMAX to 256.
b. Rebuild the minForth engine.
c. Copy this new engine (mf and mf.i) to the 'test' directory of the package.
Also make sure that in this directory the library is present by coping the
ffl or by creating a link to the library. (see above).
d. Start minForth
e. Enter: 'include ffl_test.fs'.
f. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with minForth 1.5
iForth
------
iForth uses a search path to find sources. If you install the ffl library
in this search path, iForth can find the library.
Step 1: Install the library in the search path
a. Copy the 'ffl-x.y.z' directory (and its contents) to $IFORTH/include/ffl
( ending up as $IFORTH/include/ffl/ffl-x.y.z ).
b. Copy the contents of the '$IFORTH/include/ffl/ffl-x.y.z/ffl' directory to
$IFORTH/include/ffl
c. Copy from the 'engines/iForth' directory in the package the files
'config.fs' and 'make.fs' to the $IFORTH/include/ffl directory.
d. Start iForth
e. Enter: include ffl/frc.fs
f. If iForth doesn't report an error, the library is correctly
installed.
Step 2: Configuration of the library
For iForth no further configuration is necessary.
Step 3: Test the library
a. Use an editor to remove the 'bye' from the 'ffl_test.fs' file in the
'$IFORTH/include/ffl/ffl-x.y.z/test' directory.
b. Start iForth.
c. Use the 'cd' word to move to the '$IFORTH/include/ffl/ffl-x.y.z/test' directory
d. Do 'include ffl_test.fs' to run the tests.
e. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
SP-Forth (windows)
------------------
SP-Forth uses a search path to find sources. If you install the ffl
library in this search path, SP-Forth can find the library.
Step 1: Install the library in the search path
a. Determine where the executable of SP-Forth is located on your system.
Normally this will be: x:\Program Files\SP-Forth with x the drive
letter where windows is installed.
b. Copy the 'ffl' directory (and its contents) to this directory, ending
up as: x:\Program Files\SP-Forth\ffl
c. Copy from the 'engines\spf' directory in the package the files 'config.fs'
and 'make.fs' to the x:\Program Files\SP-Forth\ffl directory.
d. Start spf4
e. Enter: include ffl/frc.fs
f. If SP-Forth is able to include the file, the library is correctly installed.
Step 2: Configuration of the library
For SP-Forth no further configuration is necessary.
Step 3: Test the library
a. Start a command or cmd window
b. Change the current directory to the 'test' directory in the package
c. Enter (including the quotes):
"\Program Files\sp-forth\spf4" ffl\config.fs ffl_test.fs
d. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with SP-Forth 4.20
SP-Forth (linux)
------------------
SP-Forth uses a search path to find sources. If you install the ffl
library in this search path, SP-Forth can find the library.
Step 1: Install the library in the search path
a. Determine where the SP-Forth sources are located on your system.
For example: /usr/spforth4
b. Copy the 'ffl' directory (and its contents) to this directory, ending up
as /usr/spforth4/ffl
c. Copy from the 'engines\spf' directory in the package the files 'config.fs'
and 'make.fs' to the /usr/spforth4/ffl directory.
d. Start spf4
e. Enter: include ffl/frc.fs
f. If SP-Forth is able to include the file, the library is correctly installed.
Step 2: Configuration of the library
For SP-Forth no further configuration is necessary.
Step 3: Test the library
a. Change the current directory to the 'test' directory in the package
b. Enter: spf4 -ab -c TEST --verbose --file=FILE input
(the command line arguments are for test purposes and have no real meaning,
enter them in the correct case)
c. Spf4 will report error #-2003, that is okee.
d. Enter: ffl/config.fs
e. Enter: ffl_test.fs
f. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with SP-Forth 4.20
lxf
---
lxf doesn't use a search path, so you should create a link to the library
in your forth working directory
Step 1: Install the library by creating a link to the library
a. Copy the 'ffl' directory (and its contents) from the package to
a freely chosen directory. For example '~/lib', '/usr/lib' or
'/usr/local/lib' resulting in '~/lib/ffl', '/usr/lib/ffl' or
'/usr/local/lib/ffl'.
b. Copy from the 'engines/lxf' directory in the package the
files 'config.fs' and 'make.fs' to the 'ffl' directory in your
chosen directory, resulting in '~/lib/ffl/config.fs' and
'~/lib/ffl/make.fs', etc.
c. Create in your forth working directory a symbolic link to the
chosen directory. The name of this link should be 'ffl' and the
target the chosen directory. For example: 'ln -s ~/lib/ffl ffl'
or 'ln -s /usr/lib/ffl ffl' or 'ln -s /usr/local/lib/ffl ffl'.
d. Start lxf
e. Enter: include ffl/frc.fs
f. If all is well, lxf should include the file.
Step 2: Configuration of the library
For lxf no further configuration is necessary.
Step 3: Test the library
a. Change the current directory to the 'test' directory in the package
b. Make sure that in this directory the library is present by creating a link
to the library. (see Step 1).
c. Enter: lxf include ffl_test.fs
d. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with lxf 1.6
ntf
---
ntf doesn't use a search path, so you should copy the library to your forth
working directory.
Step 1: Install the library by copying the library
a. Copy the 'ffl' directory (and its contents) from the package to
your forth working directory.
b. Copy from the 'engines/ntf' directory in the package the
files 'config.fs' and 'make.fs' to the 'ffl' directory in your
working directory.
c. Start ntf
d. Enter: include ffl/frc.fs
e. If all is well, lxf should include the file.
Step 2: Configuration of the library
For ntf no further configuration is necessary.
Step 3: Test the library
a. Change the current directory to the 'test' directory in the package
b. Make sure that in this directory the library is present by copying the
library to this directory (See step 1).
c. Copy the ntf.exe to the test directory.
d. Enter: ntf include ffl_test.fs
e. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with ntf 1.6
VFXForth (linux)
----------------
VFXForth doesn't use a search path, so you should create a link to the library
in your forth working directory
Step 1: Install the library by creating a link to the library
a. Copy the 'ffl' directory (and its contents) from the package to
a freely chosen directory. For example '~/lib', '/usr/lib' or
'/usr/local/lib' resulting in '~/lib/ffl', '/usr/lib/ffl' or
'/usr/local/lib/ffl'.
b. Copy from the 'engines/VFXForth' directory in the package the
files 'config.fs' and 'make.fs' to the 'ffl' directory in your
chosen directory, resulting in '~/lib/ffl/config.fs' and
'~/lib/ffl/make.fs', etc.
c. Create in your forth working directory a symbolic link to the
chosen directory. The name of this link should be 'ffl' and the
target the chosen directory. For example: 'ln -s ~/lib/ffl ffl'
or 'ln -s /usr/lib/ffl ffl' or 'ln -s /usr/local/lib/ffl ffl'.
d. Start vfxlin
e. Enter: include ffl/frc.fs
f. If all is well, VFXForth should include the file.
g. If vfxlin reports an error that the file Ndp387.fth could not
be included, the macro %vfxpath% is not correctly set.
Find the file by using the command:
find / -iname Ndp387.fth -print 2>/dev/null
This command shows the path to this file. The %vfxpath% macro
should be set with the path to the file till and including the
VfxForth directory. So if the path to the file is
/usr/share/doc/VfxForth/Lib/Ndp387.fth
then enter in vfxlin
c" /usr/share/doc/VfxForth" c" VFXPATH" $setmacro
Step 2: Configuration of the library
For VFXForth no further configuration is necessary.
Step 3: Test the library
a. Change the current directory to the 'test' directory in the package
b. Make sure that in this directory the library is present by creating a link
to the library. (see Step 1).
c. Enter: vfxlin include ffl_test.fs
d. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with vfxlin 4.4
VFXForth (windows)
------------------
Due to the fact that I don't have access to VFXForth for windows, the
following instructions are indicative.
VFXForth doesn't use a search path, so you should copy the library to your forth
working directory.
Step 1: Install the library by copying the library
a. Copy the 'ffl' directory (and its contents) from the package to
your forth working directory.
b. Copy from the 'engines/VFXForth' directory in the package the
files 'config.fs' and 'make.fs' to the 'ffl' directory in your
working directory.
c. Start vfxwin
d. Enter: include ffl/frc.fs
e. If all is well, vfxwin should include the file.
Step 2: Configuration of the library
For vfxwin no further configuration is necessary.
Step 3: Test the library
a. Change the current directory to the 'test' directory in the package
b. Make sure that in this directory the library is present by copying the
library to this directory (See step 1).
c. Start vfxwin
d. Enter: include ffl_test.fs
e. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
fina
----
Note: at this moment (2006-06-11) fina is not yet released, so any
installation and configuration directives are not possible. The config.fs
file for fina is also preliminary.
SwiftForth (linux)
------------------
SwiftForth doesn't use a search path, so you should create a link to the library in your forth working directory
a. Copy the 'ffl' directory (and its contents) from the package to
a freely chosen directory. For example '~/lib', '/usr/lib' or
'/usr/local/lib' resulting in '~/lib/ffl', '/usr/lib/ffl' or
'/usr/local/lib/ffl'.
b. Copy from the 'engines/SwiftForth' directory in the package the
files 'config.fs' and 'make.fs' to the 'ffl' directory in your
chosen directory, resulting in '~/lib/ffl/config.fs' and
'~/lib/ffl/make.fs', etc.
c. Create in your forth working directory a symbolic link to the
chosen directory. The name of this link should be 'ffl' and the
target the chosen directory. For example: 'ln -s ~/lib/ffl ffl'
or 'ln -s /usr/lib/ffl ffl' or 'ln -s /usr/local/lib/ffl ffl'.
d. Start sf
f. Enter: include ffl/frc.fs
g. If all is well, SwiftForth should include the file.
Step 2: Configuration of the library
For SwiftForth no further configuration is necessary.
Step 3: Test the library:
a. Change the current directory to the 'test' directory in the package
b. Make sure that in this directory the library is present by creating a link
to the library. (see Step 1).
c. Enter: sf ffl_test.fs -ab -c TEST --verbose --file=FILE input
d. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with SwiftForth 3.3.2
Fails cpx_tests.fs : complex numbers stringify slightly differently
Fails fwt_test.fs : SwiftForth's ALIGN and ALIGNED are no-ops
SwiftForth (windows)
--------------------
SwiftForth doesn't use a search path, so you should copy the library to your forth working directory.
a. Copy the 'ffl' directory (and its contents) from the package to
a freely chosen directory.
b. Copy from the 'engines/SwiftForth' directory in the package the
files 'config.fs' and 'make.fs' to the 'ffl' directory in your
chosen directory.
c. Start sf
d. Enter: include ffl/frc.fs
e. If all is well, SwiftForth should include the file.
Step 2: Configuration of the library
For SwiftForth no further configuration is necessary.
Step 3: Test the library:
a. Change the current directory to the 'test' directory in the package
b. Copy the 'ffl' directory into the 'test' directory.
c. Edit ffl_test.fs to not end with BYE , if you want to see the output!
d. Enter: sf ffl_test.fs -ab -c TEST --verbose --file=FILE input
Or: \ForthInc\SwiftForth\bin\sf -ab -c TEST --verbose --file=FILE input
e. The test script will tell you which modules are tested and if there
were any errors.
If you see: 'Forth Foundation Modules Test: 0 errors in xxxx tests.'
then all went well.
Tested with SwiftForth 3.3.2
Fails arg_tests.fs
Fails cpx_tests.fs : complex numbers stringify slightly differently
Fails fwt_test.fs : SwiftForth's ALIGN and ALIGNED are no-ops
Fails jis_test.fs : \r\n gets translated to \n
Fails tos_test.fs : floats stringify slightly differently
Configuration
=============
At the moment there are four system setting:
end-of-line
This word defines the ascii end of line as a counted string. For unix this
is a linefeed, for windows/dos systems it is carriage return and linefeed. For
gforth, fina, iForth, SP-Forth and lxf/nft the end of line is supplied by
the forth engine, so no manual configuration necessary. For bigforth, pfe
and minForth the default is the unix end of line, for Win32Forth the default
is windows/dos.
You should change the 'end-of-line' word if the default is not correct for you.
Note: gforth returns for windows an incorrect value for end-of-line, so
if you use gforth on windows, you should change the 'end-of-line' word.
#bits/byte
This word defines the number of bits in a byte. The library queries the
forth environment for "address-unit-bits". If this is not present, the
value defaults to 8. In the unlikely event that your system does not
support the environment query and your system uses a different number of
bits in a byte, then you should change this word.
#bits/cell
This word defines the number of bits in a cell. The default is the number of
bits in a byte multiplied by the number of bytes in a cell.
#bits/char
This word defines the number of bits in a char. The default is the number of
bits in a byte multiplied by the number of bytes in a char.
Backwards compatibility
=======================
From version 0.6.0 to version 0.7.0 there is a backwards compatible problem
with the stringtable module (stt). In version 0.6.0 the strings were stored
in the table with the ," word, but this word is not standard enough between
forth engines. From version 0.7.0 on the word +" is used for storing strings
in the stringtable.
From version 0.5.0 to version 0.6.0 there is a backwards compatible problem
for all the structures in the library. Till version 0.6.0 the library was
using its own structure definition. From version 0.6.0 it uses the new ANS
structures.
Documentation
=============
In the directory 'html' there is the HTML documentation of the library. The
file 'index.html' contains an overview of all the modules in the library. In
the file 'words.html' all words of the library are alphabetically listed. In
the file 'manual.html' there is small manual. More information can be found
in the wiki on the website.
Porting to other forth systems
==============================
The library is developed on gforth and pfe. The intention is that only two
files are depending on the (ANS) forth system:
./ffl/config.fs
./ffl/make.fs
All other source files should only use ANS words or extensions that are
present on the forth engine or are defined in the config.fs.
If you change these files to make the library work on a particular forth
system, let me know, then I can add the changed files to the distribution.
Also if there are any specific details concerning installation or testing
for a particular forth system, let me know. I will add them to the README.
Bugs
====
Because the library is still beta it is not impossible that you will find
bugs. You can report them or any suggestions to https://github.com/irdvo/ffl/issues.
Enjoy,
Dick