Re: Newbie in Forth needs help...



On Fri, 3 Mar 2006 13:07:41 +0100, "Maki" <XYZveselic@xxxxxxxx> wrote:

vocabulary target \ Create vocabulary
forth definitions \ All the word for a cross assembly goes to main
dict.
...
words for cross assembly ( if, then, while, )
...
target definitions \ Now begin assembly and gradually build an
image
.... \ assembly
L: test \ But how to prevent to create constant in
current dictionary which is target?

You have two choices:

Choice 1
========
only forth definitions
vocabulary *target
also *target definitions \ will search *TARGET before FORTH

l: test \ searches FORTH to find L:
\ TEST is in *TARGET

Choice 2
========

: L: \ -- ; L: <name>
also *target definitions
here(t) constant
previous definitions
;

This creates TEST in *TARGET regardless of the defined search
order. If you use an ANS Forth host, you will have more control
than using a Forth-83 host.

If you want to generate a Forth cross compiler as well, read
Brad Rodriguez series of articles on "Moving Forth". If you
are doing this for work rather than entertainment, buy a
commercial compiler with source code from MPE or Forth Inc.
We've been doing this stuff for a long time, the chassis is
rock solid, and you'll get all the tools you need. Forth
cross compilers are conceptually easy, but are very difficult
to implement well - the devil's in the detail and there's
a lot of detail. Yes, I'm biased. We sell cross-compilers
but even at very low wage rates, the cost of a commercial
compiler is very low compared to that of the time it will
take to write a good tool from scratch.

Stephen


--
Stephen Pelc, stephenXXX@xxxxxxxxxxxx
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads
.



Relevant Pages

  • Cross sections (Was: Neutrinos (again, sorry))
    ... "Cross section" is the quantity that a physicist uses to describe the ... numbers of particles involved, or the geometry of the experimental ... Arrange the apparatus so that the entire beam hits the target, ...
    (sci.physics.relativity)
  • Re: Cross page postback
    ... The reason I need to do a cross page postback is because the target ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Driving Doglegs
    ... >>simulate a cross current ... ... > and drift in the sense that it will correct a course for you. ... > target, etc.) from the git go by entering set and drift. ... The garmin unit with map and memory is even more .. ...
    (rec.boats)
  • Re: Newbie in Forth needs help...
    ... current dictionary which is target? ... If you want to generate a Forth cross compiler as well, ... tired of coding hex values so I decided to build an assembler. ...
    (comp.lang.forth)
  • Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh
    ... toolchain which targets my ARMs* and Perl likes its loadable modules. ... Building natively on target hardware or under QEMU is growing in popularity. ... and it's nice for your environment to be _reproducible_... ... If you have set up a cross compiler, you can configure QEMU to use distcc to ...
    (Linux-Kernel)

Loading