Hey Dan, I guess the bottom line that anyone would consider while going for a compiler would be the Generated Code Size and Ram Usage. If both of them are low, I don't think people would mind Learning a new langauge. That is one of the reasons for the success of C. (The other is portability.) If there is one thing which all compiler writers would love to add to their compiler, Its a good State Analyzing Optimizer. Not exactly the kind of Peep Hole Optimizer which most compilers sport. But this is far too Intelligent and *slower*(well, just a bit slower!). I'm thinking of writing an Optimizer for PIC Hex Files. It would take in a hex file, Disassemble it, and then try various optimizations. It might even go ahead and remove certain pieces of code like redundant Bank Selection code, Page selection code etc. I've discovered that JAL0435 adds interrupt handler code even if you don't use interrupts. It even does a lot of redundant page selections on a 16f877. I want to go way beyond the normal Peep hole optimizers. This I got this Idea from Scott Dattalo, while he was writing a peep hole Optimizer for the PIC Port of SDCC. I would prefer to target only PIC16f877, since there is a lot of scope for optimizations on it. Later on, we could go in for other families like PIC12,17 and 18. About 6 months back, I had written a few libraries for Loading and saving HEX files in Euphoria Language. I had done it for my Programmer Project. Now, this LIB is going to be really handy in any PIC development project. Literally all of the PIC development activity is based on the Intel Hex format. How about starting a thread on Peep Hole Optimization ? Jeethu Rao -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Dan Michaels Sent: Monday, July 02, 2001 9:46 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: Compiler Jeethu Rao wrote: >Dan, you can't change my mind. I've become a Software Stack fanatic. >Software Stack is worth the striving for. >And I don't think it'll make a PIC analogous to a Basic Stamp >in performance.Remember BS is interpreted and PIC native code. >running even a simple a = b assignment will take atleast 20-25 cycles >on a BS. Thats what makes Java slower than C or C++. > Jeethu, I wasn't really trying to change your mind. I really would like to see a good Forth for the PIC [maybe there already is one ???]. As I understand it, programmers in India, especially Bangalore I believe, have a strong reputation, and I would be interested to know what kind of performance you could milk out of Forth. It does have the great advantage of building compact programs, of course. In the PC world, I would say my Forth programs are maybe 5X smaller than if done in C [using DOS, not windoze]. However, speaking from a more practical perspective, one probably could not make much money from a Forth compiler for PIC, if that was their intent. Forth was popular a few years ago in the microcontroller world, but today Basic and C appear to be the big bread winners, so ......... ============ >Anyway, your've got a good Idea out there. We can make something >similar to the BS and we could write a specially optimized interpreter >for the production release of that particular program. Sort of pseudo >native code (Just like what VB 5 used to do). By pseudo native code, >I mean that the whole program would be written as a set of calls to >the Run Time Library. > >A lot faster than BS but just as easy! > Well that is basically what Forth does, of course. The whole program is just stored as a series of addresses of functions, and you drill down through the levels, passing down your parameters, and eventually get down to the core functions, which are in native code [if you have a fast implementation]. From benchmarks I recall seeing years ago, Forth was typically about 2X or 3X slower than a "compiled" C or Basic implementation, but I think on the PIC with stacks implemented in s.w., it would be much worse. This is just my gut feeling. cheers, - dan michaels www.oricomtech.com ======================== -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics