[comp.sys.apple] Mad Apple Forth

toth@tellab5.tellabs.CHI.IL.US (Joseph G. Toth Jr.) (03/12/89)

Boy, was I excited...

I read that a COMPILER was going to be posted to the net that actually ran
under ProDOS.  "FORTH"...  I waited expectantly, and went out and got a copy
of a FORTH programming guide.

I downloaded the files when they appeared...
I did the work to generate the executables...

I tried to run the thing...

Heavy disappointment..
This thing is not a compiler.  It is an interpreter...
Nor could I read the secondary disk. NOT A ProDOS DISK.

I mean, what is going on here.

And today I finally read that the secondary disk is in FORTH *BLOCK* format,
whatever that is.
Makes it awfully hard to use with a Hard Disk, doesn't it,
always having to insert the thing in a 5 1/4 inch drive in slot 6 drive 1
every time you want to use the prrograms, or even if you boot from that drive
when you don't have a hard disk (probably worse). I sure seems inflexible,
but then the forth language doesn't allow for drive or file selections, it
reads data in something called screens (something like a block of data,
kind of like a file (but not really).  Sound confusing?? It is to me, and
I've programmed in most languages around (a computer engineer, graduated
from UMR in 1975, and been using computers ever since).

And on top of that, the utility disk is missing a SAVE command.
Write a program, then quit the system. Whoops, gotta type it in again.

Question to the author...
When the SAVE is implemented, will each save also include the image of the
interpreter (as defined in the manual)???
Use up 21 (minimum) disk blocks for a 10 line program??
It is an overhead to every program to store unused functions.

These comments are not flames on the author of Mad Apple FORTH,
but on the FORTH system concept itself.

Meanwhile, I'll wait until we can either get HyperC up under ProDOS, or
improve it to the point that it is as good as (if not better than) what I
have heard about Appple Pascal (it may be good, but I'm not yet ready to
shell out > $200 for it) as far as hardware interfacing.

-- 
------------------------------------------------+---------------------
Maybe I shouldn't have done it, sarcasm is so   | Joseph G. Toth Jr.
seldom understood.  Don't FLAME on me, please.  | uunet!tellab5!toth

demarco@cpsc.ucalgary.ca (Vince Demarco) (03/13/89)

In article <1249@tellab5.tellabs.CHI.IL.US>, toth@tellab5.tellabs.CHI.IL.US (Joseph G. Toth Jr.) writes:
> Boy, was I excited...
> This thing is not a compiler.  It is an interpreter...
> Nor could I read the secondary disk. NOT A ProDOS DISK.
> 
> I mean, what is going on here.

> whatever that is.
> Makes it awfully hard to use with a Hard Disk, doesn't it,
> always having to insert the thing in a 5 1/4 inch drive in slot 6 drive 1
> every time you want to use the prrograms, or even if you boot from that drive
> when you don't have a hard disk (probably worse). I sure seems inflexible,
> but then the forth language doesn't allow for drive or file selections, it
> reads data in something called screens (something like a block of data,
> kind of like a file (but not really).  Sound confusing?? It is to me, and
> I've programmed in most languages around (a computer engineer, graduated
> from UMR in 1975, and been using computers ever since).

Well most "real" forths are "semi-compilers", their base functions are in pure
machine language and the system compiles your user functions made purely out
of jsr and jmp to those base functions...   "real" forths ARE compilers in the
sense that they generate romable machine code (albeit rather large), and they
are ALSO interpreters in that the code they generate are available as you type
(if you do it that way, if you use an editor to write code, then the process is
the same as a standard compiler)
Forth "screens" are a form of virtual memory... In a version of forth83 I have,
unlimited "screens" per file are supported.. screens may contain program code
or data..  the words UPDATE and FLUSH and CLOSE (somewhat analagous to unix
SYNC) allow you to manipulate the VM and swap to disk... in fact many IBM and
other forths are multiuser/multitasking systems!!! (my apple f83 is
multitasking (albeit slowly)!!).. I believe "screens" are rather antiquated..
they were used back when one had a whole disk/tape to himself and the whole of
the mass storage device could be used for his "screens".. (My f83 supports the
use of screens within FILES).. you can think of screens as "pages" used in a
more advanced VM system...
I guess if you want, I could upload that forth (also PD, ProDOS based) for
everyone to look at... 

Chris.. (posting from a friend's acct)

Disclaimer-> I know absolutely nothing about this... :-)
Replies-> CYLau@UNCAMULT.BITNET

rat@madnix.UUCP (David Douthitt) (03/19/89)

In article <1249@tellab5.tellabs.CHI.IL.US>
toth@tellab5.tellabs.CHI.IL.US (Joseph G. Toth Jr.) writes:
| I read that a COMPILER was going to be posted to the net that actually ran
| under ProDOS.  "FORTH"...  I waited expectantly, and went out and got a copy
| of a FORTH programming guide.

| Heavy disappointment..
| This thing is not a compiler.  It is an interpreter...

It is both really - the only interpreting going on is following a series
of pointers around.  It compiles a list of pointers to pointers to machine
code.  All the inner interpreter does is follow these pointers and nest
when necessary.

Consider: I wrote a bbs in Forth from the ground up, including Super
Serial Card reading and the like - and it KEPT UP at 300 baud and almost at
1200.

| Nor could I read the secondary disk. NOT A ProDOS DISK.
|
| I mean, what is going on here.
|
| And today I finally read that the secondary disk is in FORTH *BLOCK* format,
| whatever that is.
| Makes it awfully hard to use with a Hard Disk, doesn't it,
| always having to insert the thing in a 5 1/4 inch drive in slot 6 drive 1
| every time you want to use the prrograms, or even if you boot from that drive
| when you don't have a hard disk (probably worse). I sure seems inflexible,
| but then the forth language doesn't allow for drive or file selections, it
| reads data in something called screens (something like a block of data,
| kind of like a file (but not really).  Sound confusing?? It is to me, and
| I've programmed in most languages around (a computer engineer, graduated
| from UMR in 1975, and been using computers ever since).

Forth is quite different really.  There is a drive selection: DR1 and DR0
should be present - also maybe DR2.  You can define any drive up to DR5
by using this model for DR5 --- : DR5 4 BLKS OFFSET ! ;

Hard disk?  A standard generic Forth would have the hard disk partitioned
into screens, perhaps with a Forth boot at the beginning (no screens there
obviously - the Forth would be set up to skip that part).

The only time you would be stuck with S6,D1 is if you set WARNING (a C!
variable by the way!) to 1 - then the system expects to find a list of
Error messages on S6,D1 on screens 4 and 5.  I'm not enamored of that
either - I usually leave WARNING at 0.

File-based screens are the latest topic in Forth circles - the trend seems
to be in that direction.  I had some file-oriented blocks but didn't feel
they worked well enough for posting to the net.

| And on top of that, the utility disk is missing a SAVE command.
| Write a program, then quit the system. Whoops, gotta type it in again.
|
| Question to the author...
| When the SAVE is implemented, will each save also include the image of the
| interpreter (as defined in the manual)???
| Use up 21 (minimum) disk blocks for a 10 line program??
| It is an overhead to every program to store unused functions.

There is a SAVE" command, but I forgot to put up a command which sets all of
the COLD values (BLUSH).  Looks like time I did eh?

Yes, the entire interpreter gets saved too.  Bummer!  This problem is normally
avoided by using a Target Compiler - no small project.  I'm not quite
ready to tackle it.  The equivalent for Mad Apple Forth would be to remove
the words from the Merlin Source - UGH!

| These comments are not flames on the author of Mad Apple FORTH,
| but on the FORTH system concept itself.
|
| Meanwhile, I'll wait until we can either get HyperC up under ProDOS, or
| improve it to the point that it is as good as (if not better than) what I
| have heard about Appple Pascal (it may be good, but I'm not yet ready to
| shell out > $200 for it) as far as hardware interfacing.

For a Pascal, why not look at Kyan Pascal (IF you can find it - USED).  It's
a high quality compiler and offers ML interfacing.  But - no 65816 or 65C02
code - sorry!

Serious Forth questions like these are welcome - that's what I'm here for -
especially with Mad Apple Forth.

When I get trouble reports, then I go try and fix them.  No troubles, no fixes!

      [david]

-- 
======== David Douthitt :::: Madison, WI :::: The Stainless Steel Rat ========
FidoNet: 1:121/2 ::::: WittiNet: "Curiouser and curiouser, said Alice." ::::::
UseNet:  ...{rutgers|ucbvax|harvard}!uwvax!astroatc!nicmad!madnix!rat
ArpaNet: madnix!rat@cs.wisc.edu        {decvax|att}!

nuwilken@ndsuvax.UUCP (Scott Wilken) (07/23/89)

I just downloaded Mad Apple Forth to my system from an archive, which had
no documentation on the compiler.  Could someone tell me how to get it up
and running?  (I have already extracted the files into their ProDOS format,
what I dont understand is how to use the resulting text files).

Thanks in advance,

Scott Wilken


+-----------------------------------------------------------------------------+
! Internet:  nuwilken@Plains.NoDak.EDU         AppleLink PE:  Wilken          !
! UUCP:      uunet!ndsuvax!nuwilken            GEnie Mail:    S.WILKEN1       !
! Bitnet:    NUWILKEN@NDSUVAX                  CompuServe:    75130,1571      !
+-----------------------------------------------------------------------------+