[comp.lang.forth] PolyFORTH installation/troubleshooting

lm03_cif@troi.cc.rochester.edu (Larry Moss) (06/12/91)

I'm a novice forth user and I'm running into some difficulty with
PolyFORTH running on an AST 286 machine with a TMS320c25 DSP board in
it.  Hopefully someone reading this has a similar system and can be more
helpful than FORTH Inc.'s tech support.  Alternatively, if you know of
another FORTH system that will work with a DSP board (preferably, but not
necessarily the one mentioned above) I'd be interested in hearing about
that too.  I'm not incredibly pleased with PolyFORTH or the people on the
phone.  (FOr those curious about why a non-FORTH programmer is looking
specificaly for a FORTH system to do this, we already have a tremendous
amount of the code we need.  Due to the time frame we're looking at we
don't particularly want to rewrite everything in another language - and I
am having fun with forth.)

Some of my problems are definitely system specific.  Others might be
eliminated by better coding.  I'll start with a system specific problem
in the hopes that that will solve some other problems on its own.

The installation section of the manual says to type ".RAM" after starting
up forth to examine the memory on the board and make sure it's configured
correctly.  I'm fairly certain I have the board configured correctly now
but I still get the message "No low program RAM."  Should I be
concerned?  The person I spoke to on the phone about this said that I
should probably ignore it, but he couldn't remember if it had anything to
do with a bug in old releases of the software.  (He then went on to tell
me that we should purchase a support contract.)  The next step in the
manual is to make sure the information in block 1 is correct for the
system.  I'm having a lot of trouble following the book.  Can someone
tell me what it should look like for a board that has two 32K x 8 chips
(first two sockets) and 8K x 8 on the rest?

After playign with thte configuration a bit I figured I would try to
rebuild the system, following the steps in the manual:
	COMPILER LOAD
	NUCLEUS LOAD
	TESTING LOAD INSTALL
That just gives me something like "Error spawning shell."

Now here's the part that better coding might be able to fix.  Otherwise,
would some PolyFORTH guru please straighten me out?  In trying to get up
to speed with the system I'm using I've been playing with some simple
programs that I've grabbed from various places and modified a bit on my
own.  Below is code for the towers of hanoi that I've been working with.
It works reasonably in the IBM FORTH environment, but not the DSP FORTH.
In IBM FORTH, my biggest problem is that the number input routine (taken
directly from "Starting Forth" doesn't like backspacing.  RAther than
backspacing a character on the screen it prints a character that I assume
is what it thinks is the ascii equivalent of 8.  I also had to redefine
ASCII to get it to work correctly.  That code is also taken from
"Starting Forth".  I was also succesful in using the turnkey compiler to
get this to work as a stand alone program.

Now the important part - getting code to run on the DSP board.  If I run
HANOI, the number input stuff doesn't work at all.  If I run
TOWERS-OF-HANOI with the proper stuff on the stack, it restarts DSP
FORTH.  If I ever manage to get this to run I'll need to learn how to use
the target compiler next.  The examples in teh manual for that don't
seemto work either.

I hadn't intended for this to be so long.  I hope some one actually makes
it this far and is willing to help.  I'd appreciate any advice anyone has
to offer.

Thanks in advance,
Larry

\ Block #1800
( The Towers Of Hanoi - Salman, Tisserand, Toulout)             
: TOWERS ;                                                      
VARIABLE MOVES                                                  
: -ROT ( A B C -- C A B) ROT ROT ;                              
                                                                
: COPY ( X Y Z -- X Y Z X Y Z ) >R 2DUP R@ -ROT R> ;            
                                                                
: DISPOSE ( X Y Z -- ) 2DROP DROP ;                             
                                                                
: EDIT ( D A N -- D A N) COPY DROP SWAP ." From: " . ." To: " . 
   CR ;                                                         
: PREPARE-CALL ( D A N -- D A N D I N-1)                        
   COPY -ROT OVER + 6 SWAP - ROT 1- ;                           
                                                                
: PREPARE-RETURN ( D A N -- D A N I A N-1)                      
   COPY SWAP ROT OVER + 6 SWAP - SWAP ROT 1- ;                  

\ Block #1801
: TOWERS-OF-HANOI ( DEPARTURE ARRIVAL NUMBER --)                
  DUP IF PREPARE-CALL RECURSE                                   
     1 MOVES +!                                                 
     EDIT PREPARE-RETURN RECURSE THEN                           
  DISPOSE ;                                                     
                                                                
: HANOI ( -- )                                                  
  0 MOVES !  1 3                                                
  PAGE ." How many disks are there? "                           
  2 DIGITS                                                      
  CR TOWERS-OF-HANOI                                            
  MOVES @ ." IT TOOK " . ." MOVES" CR ;                     
                                                                
\ Block #1802
\ NUMERIC INPUT 1 OF 2 - FROM "STARTING FORTH"                  
                                                                
: BACK 8 EMIT ;                                                 
: BS? ( C -- T=BACKSPACE-KEY) 8 = ;                             
: CR? ( c -- t=return-key)     13 = ;                           
                                                                
\ FIX ASCII SO IT WORKS INSIDE OF : DEFINITIONS                 
: ASCII ( -- c )                                                
  \ Compile:   c   ( -- )                                       
  \ Interpret:   c   ( -- c)                                    
     BL WORD 1+ C@                                              
     STATE @ IF [COMPILE] LITERAL THEN ; IMMEDIATE              
                                                                
: #? ( c -- t=valid-digit) ASCII 0 ASCII 9 1+ WITHIN ;          
                                                                
\ Block #1803
\ NUMERIC INPUT 2 OF 2                                          
: ACCEPT ( 1st-adr last-a+1 curr-adr c -- 1st-adr last curr' )  
   >R 2DUP > IF R@ DUP EMIT OVER C! 1+ THEN R> DROP ;           
: REVERSE ( 1st-adr last-a+1 curr-adr c -- 1st-adr last curr')  
   DROP SWAP >R 2DUP < IF BACK SPACE BACK 1- DUP 1 BLANK        
   THEN R> SWAP ;                                               
: EXPECT# ( a max-width -- actual-width)                        
   OVER + OVER BEGIN KEY DUP CR? NOT WHILE                      
     DUP #? IF ACCEPT   ELSE                                    
     DUP BS? IF REVERSE ELSE DROP                               
   THEN THEN   REPEAT ROT 2DROP SWAP - ;                        
                                                                
: DIGITS  ( #digits -- d )                                      
   PAD SWAP 2DUP 1+ BLANK EXPECT# DROP PAD 1- NUMBER ;          
--
lm03_cif@uhura.cc.rochester.edu / "Sixty minutes of thinking of any kind is
lmo3_ss@db1.cc.rochester.edu   / bound to lead to confusion and unhappiness."
lmo3_ss@uordbv.bitnet         / - James Thurber

jax@well.sf.ca.us (Jack J. Woehr) (06/13/91)

lm03_cif@troi.cc.rochester.edu (Larry Moss) writes:

>I'm a novice forth user and I'm running into some difficulty with
>PolyFORTH running on an AST 286 machine with a TMS320c25 DSP board in
>it.  Hopefully someone reading this has a similar system and can be more
>helpful than FORTH Inc.'s tech support.  Alternatively, if you know of
>another FORTH system that will work with a DSP board (preferably, but not
>necessarily the one mentioned above) I'd be interested in hearing about
>that too.

	MicroK Systems here in Colorado has a DSP16 Forth (AT&T) and
C compiler. MicroK's BBS number is (303) 278-0364.

>  I'm not incredibly pleased with PolyFORTH or the people on the
>phone.

	Ummm .. after posting this I get the *feeling* you are going
to hear from them real soon! (They read this.) 

	It's always hard in the Forth industry to provide the customer
support at the level people need at the prices they are willing to pay.
My firm, Vesta Technology of Denver, CO, sells dirt-cheap single board
computers with embedded Forth, and customers call us up and expect us
to teach them Forth over the phone!

	So don't be *too* hard on the service reps of that Forth
institution that we all lovingly call "FInc." They get paid for teaching
Forth, that's part of how they stay in business. Their systems are
everywhere, and they've been doing it longer than anyone else ... I'm
sure they'll get in touch with you and straigten this all out.

	Good luck with your project, and keep us all posted on how
it works out!

-- 
 # jax@well.{UUCP,sf.ca.us}  # #  Member, # # Chapter Coordinator,  #
 # well!jax@lll-winken.arpa  # # X3J14 TC # #  Forth Interest Group #
 # JAX on GEnie              # # for ANS  # #   P.O. Box 8231       #
 # SYSOP RCFB (303) 278-0364 # #  Forth   # #    San Jose CA 95155  #

lm03_cif@troi.cc.rochester.edu (Larry Moss) (06/13/91)

I'm not really sure if this needs to be posted to the net, but after
reading what Jack wrote, I figure I should follow up in case I've
unjustly offended anyone.

In <25417@well.sf.ca.us> jax@well.sf.ca.us (Jack J. Woehr) writes:

>lm03_cif@troi.cc.rochester.edu (Larry Moss) writes:

>>  I'm not incredibly pleased with PolyFORTH or the people on the
>>phone.

>	Ummm .. after posting this I get the *feeling* you are going
>to hear from them real soon! (They read this.) 

I hope so.  If I can get answers I'm more than willing to give it a
chance.  I do have problems with PolyFORTH, but in all fairness, it was
only one phone call.  The thing is I do need answers from them since the
manual has suggested that I do things that have ranged from not working
to crashing the machine.  This is after I've reinstalled the system from
the distribution disks.

>	It's always hard in the Forth industry to provide the customer
>support at the level people need at the prices they are willing to pay.
>My firm, Vesta Technology of Denver, CO, sells dirt-cheap single board
>computers with embedded Forth, and customers call us up and expect us
>to teach them Forth over the phone!

My questions weren't about Forth.  I've tried doing consulting over the
phone and I know how hard that can be.  The code I posted in my original
message was not what the phone call to Forth Inc. was about.  I'm not
particualrly skilled in Forth and I may post more questions in the
future.  My initial complaint about FORTH Inc. was that I couldnt' get
answers to installation problems.

-Larry
--
lm03_cif@uhura.cc.rochester.edu / "Sixty minutes of thinking of any kind is
lmo3_ss@db1.cc.rochester.edu   / bound to lead to confusion and unhappiness."
lmo3_ss@uordbv.bitnet         / - James Thurber