??? 08/19/09 13:56 Read: times |
#168392 - I don't need to compare/contrast apples and pears Responding to: ???'s previous message |
Per Westermark said:
Richard said:
I can say that because much of the code I've worked on was written in ASM 20-30 years ago and the product is still in operation being used as intended, and simply required a bit of upgrading to add or support additional equipment or features. Maybe not so relevant. The question is: Do you have recent knowledge from extensive work in both assembler and C? To compare an apple to a pear, you need similar experiences with both. I'm not sure I need recent experience with HLL's to make the decision that the macroassembler does the job adequately. Further, I don't believe the HLL is particularly helpful for the small programs that can be managed on an 805x. ... (some stuff omitted here) ...
I would not like to produce the same hw for 20-30 years, desperately buying surplus batches of old processors just because the cost is too high to switch to newer processors. Nobody produces the same hardware. We simply continue to use the same hardware that was built 30 years ago. There's been no need to produce anything except as requirements have crept up. It is, after all, a one-off. Richard said:
Don't forget the microcontroller task:
Examine inputs (including current context) and take appropriate action. But the controlling part can be quite complex. And when a system is non-linear, or you have unknown constants, it may not be applicable to use lookup tables. The "controlling" part is just a set of jump-tables. That's why it's large but fast. For each set of inputs, in each context, there's a jump table. That's what does the lookup. It's just about six lines of ASM, of which four are always the same. Richard said:
What simpler method than table-lookup could there be? It may be simple, but only capable of handling a subset of problems without exploding to infinite size. And if the customer is allowed to configure the behaviour, you may have to build the tables dynamically and store in way more expensive RAM. And if the system is non-trivial, you would normally not build your tables by hand, but instead use software to generate them. It can't become infinite because the number of inputs is finite. It can only handle a subset of all possible problems, but every other MCU has a finite number of inputs, too, and that regardless of whether it's in ASM or HLL. RE |