On Fri May 4 05:24:03 EDT 2007, [EMAIL PROTECTED] wrote: > having to code anything in assembler is a significant sign of failure: > if it's on a general-puprose processor, we have failed to educate processor > designers; > if it's on (say) a DSP, it's a bit of a mixture of that and people thinking > that > language design stopped with C, so the language provides too little scope for > a compiler sensibly to do the work.
i agree. however, i think there are some exceptions. some (often 8 bit) architectures are better suited to assembly. i wrote a hc08 disassembler/ simulator earlier this year. it's got 256 bytes of ram and one general purpose register. c's overhead would eat into that 256 bytes quite quickly. before you dismiss it as a silly, old design, note that it is a usb-enabled soc and costs less than two bucks. and in motorola tradition, all io is mmio. also there are some things that are just difficult to do in c. c has no notion of cache-coherence. so one needs to reach outside the language to do something like [RWM]FENCE on out-of-order processors. are there any languages that deal with this? - erik
