On 11/04/11 22:06, Fred Cisin wrote:
"Nobody programs in assembly language anymore,
nor ever will again." -(Clancy and Harvey, UC Berkeley Lower Division CS)
To which I would respond:
"Alright. Bring up a brand-new embedded CPU board without writing a
single line of assembler."
You can't do squat in C without initialising the segments (TEXT and BSS)
and setting up the stack pointer. At best you'll get a coredump,
triple-fault or Abort (data or instruction-fetch, take your pick). At
worst you get the CPU writing crap all over the rootfs, NVM, bootflash
and whatever else it can lay its grubby paws on.
On the list of things that aren't a good idea, "attempting to write
CINIT / crt0 in C" is way, way up there.
Of course, if you're an apps developer, then the aforementioned
statement is entirely true. I tried to write a Win32 app in ASM, and it
nearly drove me mad. (Although some would argue on the "nearly" part of
that sentence...!)
--
Phil.
classiccmp at philpem.me.uk
http://www.philpem.me.uk/