??? 07/18/09 21:37 Read: times |
#167530 - One could answer this in a number of ways ... Responding to: ???'s previous message |
... Beginning with, "If you'd spend the money for the most expensive compiler on the market, would you admit you'd made a mistake?" However, that probably wouldn't be fair.
Yes, "You can fit a huge function into 2kB" as you say, Per, but what kind of funtion would that be? How would you use it? Do you remember my model for MCU code? (Examine inputs ... Take appropriate action) The fastest construct I've found with which that can be accomplished is a number of tables, into which one indexes with the inputs in order to find an indirect jump address. The 805x even provides a pretty good instruction for that (JMP @A+DPTR). I don't know what a compiler would produce for that but lusing this indexed indirect jump impacts the scarce resources of stack and data memory very little (not at all, actually) and, being hard-coded, won't get lost easily either. I remember when 2kB was quite a bit. However, back then we wrote our loader/debugger to fit in a 256-byte EPROM (1702). What sort of meaningful and complete code can you produce for 805x in 2KB using a 'C' compiler? I'd guess that, at a minimum, you'd have to rewrite a few libraries and headers. RE |