
cross-compiler word set questions
Quote:
> I'm trying to get my head around the cross compiler word set document
> (proposed ANS extension from ftp.forth.com). It looks like it could
> simplify some of the "ugliness" in creating a cross compiler, but is
> confusing in places and lacks examples. At least, I have found no
> publically/freely available examples of its use.
Our SwiftX evaluation CD is almost free ($15) and includes examples
for many popular microcontrollers. MPE may also have evaluation
systems.
Quote:
> For one, it appears to be written towards people wanted to cross
> compile applications, not complete kernels (such as implying that
> adding words to COMPILER scope is normally rare). And it talks about
> "custom" defining words, whereas I want to use it to create standard
> defining words. Is this correct, or am I misunderstanding?
This is certainly true. The assumption is that a cross-compiler
includes a target kernel to which the user will add an application.
However, most of the kernel is built with the same cross-compiler.
The goal of the proposed standard is to describe the interface
between the development tool and the application.
Similarly, ANS Forth is designed for users writing applications,
not as a tool for developing systems. From the perspective
of the system implementor, it's a destination, not a roadmap.
Same for the proposed X-C standard.
Quote:
> Next big question is - where do fundamental words that build on a
> target go? Such as assembler vocabulary, the typical "HERE-T" "C,-T"
> and so forth? These would be used both by interpreting words and by
> compiling words. The A.x.3.1 table showing example search orders
> implies that COMPILER scope only searches FORTH; does this imply that
> COMPILER words shouldn't just call the INTERPRETER version of "," if
> necessary?
Put them where you like. Ultimately, they're added to FORTH, either
segregated or not. We just add them to FORTH.
Cheers,
Elizabeth