To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 185
184  |  186
Subject: 
Re: Save image in pbForth (srec version)
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Fri, 12 Nov 1999 22:27:59 GMT
Viewed: 
1336 times
  
Hi Ralph,

In lugnet.robotics.rcx.pbforth, Ralph Hempel writes:
Also, it is possible to create an alternative SAVE-SYSTEM word that will
generate image without SAVE-SYTEM support included (similar to MARKER word).

Oh, you mean that you can save the system dictionary up to the point of the
SAVE_SYSTEM stuff that is at the end of the dictionary? Great!

Well, I meant that I know how to do it, but not yet tried ;)
Also, it shouldn't be so difficult, so I will try it now.

I think a SAVE_SYSTEM script that is loaded in just before the system is
to be saved is right. I could provide the basic script in commented form as
an example of really good forth coding, then a stripped version that's
quicker to load.

Thanks for "really good forth coding", I can only say "I did my best" ;)
Seriously, manage it as you think would be better for pbForh distribution.
BTW, in my previous post I merged together three source files: srec.f, x-
send.f and save-sys.f. Of course it's possible to put all that stuff in one
file. It could make loading little bit easier .


If you can give me the high-level definitions, I can add them easily. The
other possibility is to have a basic kernel that is provided as a minimal
SREC file. Then we could have some good instructins for customizing the
kernel.

For example...you want the WORDLIST and some double support. Just load up the
basic kernel, add in the WORDLIST and DOUBLE stuff you need, then load • SAVE_SYSTEM
and do it. What could be simpler than having the ability to extend the kernel
and build it jsut the way you want, right on the RCX brick itself!!


My point here, that you have already defined a few primitive wordlist
definitions to support MARKER word. But they are only half of the service -
only to access and manipulate wordlists. There are still missed primitive
words to create new wordlists - these WORDLIST and WORDLIST-NAME. All the
rest, high-level words like ALSO, PREVIOUS, ONLY..., could be loaded after and
saved at will.
So my proposition is to add these missed words into the kernel. The
definitions are present in original hForht package, in file oprional.f. Here
they are (from hForht package, OPTIONAL.F):

\   WORDLIST ( -- wid ) \ SEARCH
\ Create a new empty wordlist and return its identifier wid.
\ The new wordlist is returned from a preallocated pool for
\ RAM/ROM system in this implementation since they need to be
\ initialized after SAVE-SYSTEM. It may be dynamically allocated
\ in RAM only system.
\
\ structure of a wordlist
\ //lastWord/next_wordlist/wordlist_name//
: WORDLIST
      FORTH-WORDLIST \ the first wordlist
      BEGIN CELL+ DUP @ WHILE @ REPEAT \ find end of wordlist link
      HERE SWAP ! \ attach a wordlist to wordlist link
      HERE 0 , \ no word in this wordlist yet
      0 , \ this is end of wordlist link
      0 , ; \ no name is assigned to this wordlist yet.

\   WORDLIST-NAME   ( wid -- )
\ Name a wordlist. Used to attach a name to a new wordlist
\ returned by WORDLIST to be displayed by ORDER.
: WORDLIST-NAME   DUP CONSTANT lastName SWAP CELL+ CELL+ ! ;

Oh, you've found the other thing I've not worked on for a while. Yes, the task
chain would be handy to restore back to its original state. I think you need
to kill all of the tasks that are running, then restore the saved task chain.

Yes, exactly.
Since you made mulitasker as a part of kernel, I think the MARKER word should
be also fixed.
I will try to play with this over the weekend, it must be easy...

Regards
Sergey



Message has 1 Reply:
  RE: Save image in pbForth (srec version)
 
Sergey, I'll add the other basic wordlist stuff to the kernel, then I'll let the users "build" the optional system to their needs. In fact, I have three extra files that I assemble into a complete kernel. The RCX definitions (all assembler) (...) (25 years ago, 13-Nov-99, to lugnet.robotics.rcx.pbforth)

Message is in Reply To:
  RE: Save image in pbForth (srec version)
 
(...) Oh, you mean that you can save the system dictionary up to the point of the SAVE_SYSTEM stuff that is at the end of the dictionary? Great! (...) I think a SAVE_SYSTEM script that is loaded in just before the system is to be saved is right. I (...) (25 years ago, 12-Nov-99, to lugnet.robotics.rcx.pbforth)

6 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR