On Mon, Apr 11, 2011 at 11:06:00PM +0100, Philip Pemberton wrote:
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."
Hehe. And manually building machine code counts a expensive cheating,
right?
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.
ACK. When all is said and done, bits of assembler sit at the root of
a lot of basic system infrastructure.
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...!)
You, sir, are very ... brave. ;-)
SCNR,
Alex.
--
"Opportunity is missed by most people because it is dressed in overalls and
looks like work." -- Thomas A. Edison