[Fwd: Re: [OpenBIOS] patch: machine dependent config]
segher at chello.nl
Fri Jun 7 23:17:30 CEST 2002
> > > Just a dumb idea, could we rewrite the preprocessing and testing
> > > completely in C? I know that there are a lot of issues with perl on
> > Nope, cpp can't do all that's necessary. Btw, once we have a working
> > Forth compiler, we can use that to bootstrap itself :)
> You're talking about forth -> binary translation? That is not what we
> want, I guess. Can you explain?
There's three ways to represent a program:
1) Forth source
2) Forth dictionary (binary)
3) Forth dictionary/source (FCode)
3) is limited, but cross-platform; it's the prefered way for device
manufacturers to distribute drivers, but there's no reason to implement
our internal stuff with FCode.
2) is okay, but machine-specific.
1) is our prefered form.
But that leads to a problem: the Forth compiler itself is written in
Forth. So the "initial dictionary" will have to be distributed as 2).
That's exactly what ref.pl + cpp magic do: they convert "pseudo-forth"
source (engine.in) to dictionary.
Now, what I said was: when we have the Forth compiler finished, we can
have the engine.in compile a engine.fs, to replace itself.
> > > newer platforms, which could make it hard to get paflof running on new
> > > machines, even if we already have a gcc. Ugly though. If this is
> > Cross-compilers save the day :)
> Cross compilers is exactly where this stops working. If I cross compile
> for SH1 CPUs using a crosscompiler on Intel x86, my perl nor my gcc will
> never tell me whether my 'long' is 32 or 64bit on the target platform.
> We probably can't even use this to check for TI mode availability
Sure you can; you just can't run the target programs, but of course the
compiler knows the target data sizes :)
> > I hope to finish the "Forth command group" today :)
> How much work has to be done here?
One or two days, plus some cleanup, but that can be done later.
> How far are we from being able to
> read FCode with this (i.e. use the work in the fcode/base/ directory
> already done?
This is the Forth compiler, not yet the FCode compiler; that one is a lot
> Please make sure we don't do duplicate work here.
I'll try :)
> " text" is the only one missing to get the mandelbrot signature, one
> of my toke test programs, running. Then we can start using the example
> code and really testing the Fcode layer on top.
I'll implement it without things like S" blabla(0d)(0a)blabla" etc., at
first. It'll be here later tonight :)
To unsubscribe: send mail to majordomo at freiburg.linux.de
with 'unsubscribe openbios' in the body of the message
http://www.freiburg.linux.de/OpenBIOS/ - free your system..
More information about the openbios