| 1 : |
pazsan
|
1.1
|
You need DJ Delorie's port of GCC to DOS (DJGPP) to compile Gforth. DJGPP |
| 2 : |
|
|
provides a DOS extender (GO32) that allows to use the 32-bit features of |
| 3 : |
|
|
the 80386, but on the other hand it requires at least an 386. |
| 4 : |
|
|
|
| 5 : |
|
|
Gforth hasn't been tested with EMX, using EMX will require some changes in |
| 6 : |
|
|
the console IO part. If you don't want to install this package (quite |
| 7 : |
|
|
large), look for a binary distribution of Gforth for DOS. You must have a |
| 8 : |
|
|
version of GNU make, because DOS make programs are likely to have problems |
| 9 : |
|
|
with the Makefile. If you want to change Gforth, you may need GNU m4, too. |
| 10 : |
|
|
|
| 11 : |
|
|
If you don't bother and want to make it yourself, type |
| 12 : |
|
|
|
| 13 : |
|
|
configure |
| 14 : |
|
|
|
| 15 : |
|
|
There are no options for configure, because DOS can't execute a real |
| 16 : |
|
|
configure script, all the configuring stuff is done on a real operating |
| 17 : |
|
|
system. If you want to change something (e.g. use FORCE_REG or |
| 18 : |
|
|
DIRECT_THREADED), you have to change the makefile yourself. Be careful! DOS |
| 19 : |
|
|
command line arguments are limited to an overall size of 126 bytes, so |
| 20 : |
|
|
adding a new define in the makefile will make it too long. In this case add |
| 21 : |
|
|
the define at the beginning of machine.h instead, or create a file |
| 22 : |
|
|
containing all extra options, and add @<filename> to the defines (move the |
| 23 : |
|
|
-DDEFAULTPATH-define into this file, and it will fit into the command line). |
| 24 : |
|
|
|
| 25 : |
|
|
After covering all inconveniences, type |
| 26 : |
|
|
|
| 27 : |
|
|
make gforth |
| 28 : |
|
|
|
| 29 : |
|
|
and after this finishes, type |
| 30 : |
|
|
|
| 31 : |
|
|
make |
| 32 : |
|
|
|
| 33 : |
|
|
We apologize for the inconveniences, we did not invent the 640k limit |
| 34 : |
|
|
that prevents doing make straight forward. You may run out of memory |
| 35 : |
|
|
anyway, because GCC eats up lots of it while compiling engine.c. Keep |
| 36 : |
|
|
enough space free on your harddisk to allow GCC to swap. |
| 37 : |
|
|
|
| 38 : |
|
|
If you want to add some defines like -DFORCE_REG, type |
| 39 : |
|
|
|
| 40 : |
|
|
make gforth XDEFINES=-DFORCE_REG |
| 41 : |
|
|
|
| 42 : |
|
|
instead. |
| 43 : |
|
|
|
| 44 : |
|
|
Now you can check whether your shiny new Forth system works. Say |
| 45 : |
|
|
|
| 46 : |
|
|
make test |
| 47 : |
|
|
|
| 48 : |
|
|
You can run some benchmarks with |
| 49 : |
|
|
|
| 50 : |
|
|
make bench |
| 51 : |
|
|
|
| 52 : |
|
|
and compare them with the results in Benchres and in the manual. |
| 53 : |
|
|
|
| 54 : |
|
|
Don't try to do "make install", it won't work, either. It is not possible to |
| 55 : |
|
|
"make dist" or "make bindist", too, because of the limitations of DOS |
| 56 : |
|
|
command lines. |
| 57 : |
|
|
|
| 58 : |
|
|
Add the following entry to your Autoexec.bat: |
| 59 : |
|
|
|
| 60 : |
|
|
SET GFORTHPATH=<your gforth source directory>:. |
| 61 : |
|
|
|
| 62 : |
|
|
Use / instead of \ in your gforth source directory. Another problem |
| 63 : |
|
|
is, that Gforth uses : as path separator, and DOS pathes may look like |
| 64 : |
|
|
D:/gforth. Sorry, there is no workaround for this now. |
| 65 : |
|
|
|
| 66 : |
|
|
For paper documentation, print gforth.ps (a Postscript file (300dpi |
| 67 : |
|
|
fonts, i.e., it works, but does not produce best quality on better |
| 68 : |
|
|
printers)), or say |
| 69 : |
|
|
|
| 70 : |
|
|
make gforth.dvi |
| 71 : |
|
|
|
| 72 : |
|
|
and print the resulting file gforth.dvi (you need TeX for that! But |
| 73 : |
|
|
with TeX you can print it even if you don't have a Postscript printer |
| 74 : |
|
|
nor Ghostscript). You could be able to make a html version of the |
| 75 : |
|
|
document, but AFAIK there is no texi2html for DOS available, as there |
| 76 : |
|
|
is no perl available. |