EmbeddedRelated.com
Forums
Memfault State of IoT Report

AVR Beginner Questions - Ports and Speed

Started by Al Borowski February 8, 2004
Ian Bell wrote:
> David Brown wrote: > > > If there are exceptions, then it is not a rule. The common opinion > > among PHBs is that C is "easier" than assembly, and therefore > > every embedded project should be written in C and not assembly. > > Forgive my ignorance but what is a PHB??
You have been adjudged in the world of comics readers, and convicted of malfeasance, i.e. failure to read Dilbert. Sin no more, lest the Pointy Haired Bosses get you. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
Frank Bemelman wrote:

> "Ian Bell" <ian@ruffrecordsDOTworldonline.co.uk> schreef in bericht > news:4028b1f6_1@mk-nntp-1.news.uk.worldonline.com... >> Dan wrote: >> >> > On Mon, 09 Feb 2004 08:41:42 +1000, Al Borowski >> > <aj.borowski@erasethis.student.qut.edu.au> wrote: >> > >> > >> >>ClrMem: ; writes zeros to memory, 100h to 3ffh >> >> >> >>clr R0 ; clear R0 >> >>ldi ZH, 1 ; setup Z to point to the start of memory >> >>ldi ZL, 0 >> > >> > Just as a suggestion, there's almost no need to write in assembly >> > language. You can accomplish more, and accomplish it more quickly, if >> > you use a higher level programming language like C or C++. It's an >> > excellent skill to know assembly language, it gives to a handle on to >> > what's really going on. And it can also be very useful to look at the >> > assembly code generated by the C compiler in order to aid debugging. >> > But you'll end up writting better code if you start doing it in C or >> > C++. >> >> Let's not get into the C vs assembler debate but there is no reason why > you >> will write *better* code in C, whatever that is. > > It's about time to settle once and for all that C is better > than assembler. Time has diminished all arguments that favour > assembler, in general, and there is no reason to continue to > live under a pile of rocks.
I have never really understood why anyone would think one tool is, in general, better than another. Each has its pro and cons and consequently applications in which it is 'better' than the other. Ian
Al Borowski wrote:

> Ian Bell wrote: >> David Brown wrote: >> >> >>>If there are exceptions, then it is not a rule. The common opinion among >>>PHBs is that C is "easier" than assembly, and therefore every embedded >>>project should be written in C and not assembly. >> >> >> Forgive my ignorance but what is a PHB?? > > Pointy-Haired-Boss - The moronic manager from dilbert. http://dilbert.com > > Al
AH, now I understood. Never did get into Dilbert. Ian
"Ian Bell" <ian@ruffrecordsDOTworldonline.co.uk> schreef in bericht
news:4028fcf7_1@mk-nntp-1.news.uk.worldonline.com...
> Frank Bemelman wrote: > > > > > It's about time to settle once and for all that C is better > > than assembler. Time has diminished all arguments that favour > > assembler, in general, and there is no reason to continue to > > live under a pile of rocks. > > I have never really understood why anyone would think one tool is, in > general, better than another. Each has its pro and cons and consequently > applications in which it is 'better' than the other.
There you go. In *general* C is better. In certain and less mainstream applications, ASM may well be the better choice. Nothing wrong to say a tool is better, in general. I prefer matches over flintstones. In general. -- Thanks, Frank. (remove 'x' and 'invalid' when replying by email)
Rene Tschaggelar wrote:
> Frank Bemelman wrote: > > "Rene Tschaggelar" <none@none.net> schreef in bericht > > > >> Acknowledging your defense of the old stuff, the short names > >> become a nightmare when the names resolve to almost identity. Eg. > >> > >> TempCtrlV1.asm > >> TempCtrlMath.asm > >> TempCtrlComm.asm > >> TempCtrlLoop.asm > >> TempCtrlV2.asm > >> > >> Why should I not have longer names, just because some lazy guys > >> have other stuff to do ? I myself write Win32 applications. > >> They are not such a big fuss. It is quite easy actually. > > > > I have a file here, ANALFUN.C, that, yes you guessed it, keeps > > all the analysis functions ;) > > Thanks for trying Frank, > you're not dragging me back to stone age. > I'm happy with Win32.
This started with somebody muttering about 32 bit vs 16 bit MPLAB, not about Win32 vs Win16. These are entirely different subjects. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> USE worldnet address!
"Ian Bell" <ian@ruffrecordsDOTworldonline.co.uk> wrote in message
news:4028fe8d_1@mk-nntp-1.news.uk.worldonline.com...
> Al Borowski wrote: > > > Ian Bell wrote: > >> David Brown wrote: > >> > >> > >>>If there are exceptions, then it is not a rule. The common opinion
among
> >>>PHBs is that C is "easier" than assembly, and therefore every embedded > >>>project should be written in C and not assembly. > >> > >> > >> Forgive my ignorance but what is a PHB?? > > > > Pointy-Haired-Boss - The moronic manager from dilbert.
http://dilbert.com
> > > > Al > > AH, now I understood. Never did get into Dilbert. > > Ian
"The Dilbert Principle" should be required reading for all engineers and (especially) for all managers.
David Brown wrote:

> > "Ian Bell" <ian@ruffrecordsDOTworldonline.co.uk> wrote in message > news:4028fe8d_1@mk-nntp-1.news.uk.worldonline.com... >> Al Borowski wrote: >> >> > Ian Bell wrote: >> >> David Brown wrote: >> >> >> >> >> >>>If there are exceptions, then it is not a rule. The common opinion > among >> >>>PHBs is that C is "easier" than assembly, and therefore every embedded >> >>>project should be written in C and not assembly. >> >> >> >> >> >> Forgive my ignorance but what is a PHB?? >> > >> > Pointy-Haired-Boss - The moronic manager from dilbert. > http://dilbert.com >> > >> > Al >> >> AH, now I understood. Never did get into Dilbert. >> >> Ian > > "The Dilbert Principle" should be required reading for all engineers and > (especially) for all managers.
Obviously an engineer's view of poor management. Ian
oN 10-Feb-04, Frank Bemelman said:

> It's about time to settle once and for all that C is better > than assembler. Time has diminished all arguments that favour > assembler, in general, and there is no reason to continue to > live under a pile of rocks.
'Time has diminished...' You mean because your memory is fading? <g> There are places where assembly coding is still needed, and places where the use of C is an unjustified complication. 'Better' is a contextual judgment. -- Bill Posted with XanaNews Version 1.16.1.6

Memfault State of IoT Report