Quote:
Originally Posted by yash101
What I mean is actually writing an interpretter, so that you can program a propeller chip in Java. Also, with this being an interpretter, it seems as though you will be able to program the propeller from within itself! You would just need to write code and the memory chip would do the rest!
|
SPIN is already a byte code interpreter embedded in the default Propeller and offering a BASIC-like syntax.
Not only can this actually be done, but if you had enough support and the code was optimized enough you could ask Parallax to put it in the actual Propeller as a custom version. Then the custom chips would ship with the Java interpreter.
Without making a custom Propeller you could start off with an assembly language stub to get the Cogs to read from the Hub shared memory as fast as possible for the variables, page code into the Cogs from the Hub shared memory and another assembler program that occupies a Cog for external communication. With that as a framework you can then build basically a JVM optimized for the purpose. Actually at that point you can write any interpreter you really like. You'll need to extend Java to fully make it possible to lock code to specific resources (make a custom threading system that understands more about this architecture).
I am curious do you know about this:
http://propeller.wikispaces.com/Programming+in+Java