Re: [Oopic-compiler-devel] Emulator
Status: Planning
Brought to you by:
ndurant
From: Neil D. <nd...@us...> - 2004-12-17 02:29:53
|
D. Daniel McGlothin wrote: > Based on the Python discussion earlier, I introduced a work collegue to it, > and he went ahead and wrote a PLC (ladder logic) program > comparison/differences tool. I still have to write my first "Hello World", > although I have read the manual and think I have the gist of the language. I find that once you "dig in", with the manual within easy reach, it's fairly easy to be productive with Python. I've found that it's also exceptionally well suited to what we're doing, at least the text lexing/parsing side of things. The amount of code I've written so far for the preprocessor would have taken several times more code if written in C, and all the string handling would have been painful in comparison! Symbol table? Piece of cake! No need to implement a hash table or anything. And it looks like it will be extremely good at handling the complex data structures (trees etc) in the core of the compiler. Incidentally, I've been reading a book about the assembly code generation aspect of compiler design, and it's truly fascinating and far deeper than I had imagined. I suspect there will be lots of scope for interesting optimisations with that aspect on the OOPic compiler. Furthermore I've been thining about the linker side of things, and I don't think that will be too hard to do, once we clarify the required memory organisation of an OOPic program image. I'm really excited about getting this project underway (half for the satisfaction of writing a fairly complex piece of open source software, and half for the practical aspect of making the OOPic more usable!). It's just a matter of available free time! > Once the emulator is written, then why not just compile it directly to > PIC/SX/AVR chips and bypass the oopic altogether? I suppose that is > probably going a bit father than where we are headed, though. And if we are > up to that level of effort, wouldn't we be writting directly for the chips > already? I guess the tricky part is making the microcontroller actually run the code fast enough. It's not too difficult to make a multi-gigahertz desktop machine act like a little microcontroller, but actually performing those calculations on a little chip is another matter! Still, worth investigating if we ever reach that stage and have the inclination! > Incidently, have you noticed the recent release of Parallax's SX/B basic > preprocessor for the SX chips? No, but I have now! Looks like interesting technology! Neil -- Neil Durant <nd...@us...> |