home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
200-299
/
ff239.lzh
/
JGoodies
/
About_JForth
< prev
next >
Wrap
Text File
|
1989-08-21
|
9KB
|
216 lines
About JForth Professional V2.0
Vital Statistics:
32 bit Forth based on the '83 standard.
Full Amiga Access
Fast, Small Standalone Royalty Free Applications
Compiles directly to 68000 machine code for fast execution
Hashed Dictionary for fast compilation
JForth Professional 2.0 is a programming language that allows
you to create standalone applications that are roughly
equivalent in size and speed to those written in 'C'. Unlike
'C', however, JForth provides an interactive programming
environment that speeds up your development. When you work in
JForth, you are in an interactive command line environment that
allows you to call any routine or examine any data structure.
You can compile routines right from the keyboard or from a
file. Small programs can be compiled in a few seconds which
means you spend more time creating and less time waiting.
JForth is a little different from traditional Forths, eg.
MultiForth, since JForth compiles directly to 68000 machine
code. We also cache the "top of stack" in a data register.
These two features mean that your programs will execute about 2
to 3 times faster then with a traditional Forth. If you are
writing games, word processors, music programs, or any program
where speed is important, JForth has an advantage. (MultiForth
is a trademark of Creative Solutions.)
JForth has a complete and easy interface to the Amiga's
toolbox. JForth allows you to call any Amiga library routine by
name. It automatically takes care of the 68000 register
assignments and library offsets (unlike some languages). Since
the Amiga uses structure addresses as parameters for almost all
of its routines, we have simplified the use of structures. In
JForth, structures can be referenced with automatic sizing and
sign extension as in 'C'. You don't have to remember whether a
structure member is 8, 16, or 32 bits, or signed, like you do
with MultiForth. We also have some tools that give you on-line
documentation and help with debugging. The ARGS command will
show you the parameters for any Amiga function. The DST command
will dump the contents of a structure and show the names of all
of its members.
We have also added some toolboxes to further simplify Amiga
programming. An example is the EZMenu system which makes it
easy to add text based pull down menus to your applications. An
example of using EZMenus can be found in the December, 1988
issue of Amazing Computing on page 79.
Programs can be written using either normal text files or
traditional BLOCK files. We use Emacs in our development but
you can use your favorite editor. We have a word called FILE?
that will tell you what file a word was compiled from. If you
like, it will then show you the source code for that word if the
source is available. We provide source code for all of JForth
except the assembly language kernel.
Delta Research recently released a new version of JForth called
JForth Professional 2.0. The most significant new feature of
JForth 2.0 is Clone, the "Optimizing Target Compiler". Clone
can be used to create royalty free applications as small as 3K.
Clone works by examining a compiled Forth application, and then
building a new executable image containing only the code and
data needed. This makes it easy for you to create new CLI
commands, games, or other applications, that you can sell or
give away.
Other new features include:
Source Level Debugger with breakpoints, and single step. You
can step through your code as it executes and see what is on
the stacks, examine data structures, dump memory, etc.
Precompiled, dynamically linkable modules for 'include' files,
and the Assembler and Disassembler. Now structure definitions
and the Assembler won't take up space in your dictionary.
They are simply attached to the side when needed.
Hashed Dictionary for 2-8 times faster compilation. Small
programs compile in a few seconds so your productivity is
improved.
Command Line History like the Amiga DOS Shell (built in so
that the Forth word KEY works properly).
User Assignable Function Keys.
IFF Support for read and write, plus simple bitmap animation
system with blits, wipes, and fades. This makes it easy to use
images from paint programs in your applications.
New Forth Vendor Group Standard 32 bit FFP and 64 bit IEEE
Floating Point using Amiga libraries. Support for
transcendental functions, enhanced number formatting, plus
many optional extensions.
ODE is an Object Oriented Development Environment similar to
SmallTalk that can be loaded on top of JForth if you like.
Object Oriented programming is a technique that simplifies
programming through the use of "intelligent data structures".
ODE supports class definitions, inheritance, late binding, and
dynamic instantiation. ODE now allows nested objects as
"instance variables".
Numerous new tools and utilities including Serial I/O, sample
applications and new graphics demos, documentation generator,
etc.
The new manual includes many new tutorials and an expanded
reference section. We have a complete Forth tutorial at the
beginning of the manual. We do recommend, however, that you
get one of the many execllent Forth textbooks, and the Amiga
ROM Kernel and Intuition Manuals.
JForth Professional 2.0 is available from retailers at a
suggested list price of $179.95. Registered JForth 1.2 users
can receive a full upgrade to 2.0 for $50.00 plus the ORIGINAL
"EXTRAS" disk (the one with the executable JForth image). A
"Clone Only" upgrade is also available for $10.00 for one disk
with documentation on disk. We strongly recommend, however,
that people get the full $50 upgrade because of the other new
features. (A new HMSL disk that uses the new JForth features is
available to registered HMSL users for $10. HMSL is an
experimental music language based on JForth.) CA residents add
6% sales tax.
Inquiries and upgrade requests can be sent to:
Delta Research
Box 1051
San Rafael, CA
94915
or call: (415) 461-1442
-------------------------------------
How to Read The Example Programs.
Use the Textra editor to view the source code files or TYPE them
from the CLI. To print them you can copy them to the printer,
for example:
CD JGOODIES_1:JustBeeps
TYPE JustBeeps.f
COPY JustBeeps.f PRT:
If you are not familiar with Forth, this may help you understand
what you are reading. This is a very brief description of
Forth. I cannot teach Forth in one page but this will get you
started.
Forth uses a simple syntax; words with spaces between them. The
words are executed in the order they appear. Parameters, like
numbers and addresses, are placed on a stack that all the words
can use.
Forth uses a ':' to begin the definition of a subroutine. Here
is a Forth definition that will print "Hello World!".
: HI ( -- , print message )
." Hello World!" CR
;
HI
The word immediately after the ':' is the name of the routine,
in this case "HI". The text between parentheses is a comment
for people reading the code and is ignored by the compiler. A
backslash '\' can also be used to comment out the rest of a
line. The ." is a word that says to print the following text.
The CR outputs a carriage return. The ';' ends the definition.
This program would take less then a second to compile and link.
The bottom line calls the new routine to test it.
Here is another definition:
: CHECK.ALTITUDE ( altitude -- , too high? )
10,000 >
IF ." Help! We are going too high!" CR
ELSE ." Everything's OK." CR
THEN
;
7,000 check.altitude ( test our new word )
14,000 check.altitude
The comment in this definition contains a "stack diagram".
Stack diagrams tell the person reading the code what is passed
on the stack as input and what is returned as output. The
parameters before the "--" are input. In this case the altitude
is expected to be on the stack when the word is executed. After
the "--" and before the "," there is nothing, which means it
does not return a stack value. The first line of the definition
compares the input to 10,000. IF the value on the stack is
greater, it will print "Too high!", or ELSE it will says things
are OK. The THEN terminates the conditional statement. When a
number is entered, its value is left on the stack. This makes
it easy to test a word as you can see.
If you want to learn more about Forth, call us, or get "Starting
Forth" by Leo Brodie, or "Forth: A Text and Reference" by Kelly
and Spies. Both texts are excellent.
Happy Hacking,
Phil Burk