From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Sun, 6 May 2007 00:08:54 -0400 To: 9fans@cse.psu.edu Subject: Re: [9fans] speaking of kenc In-Reply-To: <54fc0f1102d30ae5933e78e2e391032f@proxima.alt.za> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 5afdaa18-ead2-11e9-9d60-3106f5b1d025 > 1 and 3 are not really that different, so you're down to two examples. > C is OK for newer embedded systems (microcontrollers), older ones are > what they are and ASM may well be the way to go. But even there, ASM > is often just the lazy way rather than the more economical way. perhaps you haven't programmed many microcontrollers. usually the volumes are high and the per unit cost is very important so you end up with very simple parts with very little ram/flash. the one i worked on earlier this year had low speed usb interface, 2 gp registers, 256 bytes of ram and 4k of flash. i found it easy enough to program in assembly, but i don't think you'd get very far with c. i just don't think you could fit things into memory. > I have a feeling brucee will point out that the gain in efficiency in > using ASM is insufficient to justify the additional costs in > complexity and error potential. i don't understand the assumption that the only reason to use assembly is cycle efficiency. also, could you explain why this is "lazy"? or why assembly is more complicated? clearly, an assembly is more difficult to wield than c. but you don't use them for the same thing. this absolutist argument that c is teh bomb. asm suks is silly. it's like arguing bicycles and ferraris. which one you need (and which one gets you there faster) depends on what you're doing. - erik