a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by briandmyers

C, when you need to be close to the hardware. Embedded work (it's what I do). It's often the only thing available at that level, since damn-near no one uses assembly any more (C has killed assembly).





CrazyEyeJoe  ·  3906 days ago  ·  link  ·  

C may make assembly less useful on x86 architectures, but for different custom architectures (like the one I work with, I also do embedded systems), compilers aren't quite so advanced. Assembly can still provide very significant optimisations in those cases.

briandmyers  ·  3906 days ago  ·  link  ·  

Good point. I try to use inline assembler for cases like that, if possible. Often you can make a very efficient semaphore with the proper assembler instruction.

tst  ·  3911 days ago  ·  link  ·  

To be just a little pedantic, C hasn't necessarily killed Assembly as much the necessity of knowing it to program at the low level. In short, C compilers have become efficient enough to negate the need to write in Assembly directly due to, at the very least, being much more human readable, though not in every case (i.e. certain optimizations).

briandmyers  ·  3911 days ago  ·  link  ·  

You're just explaining how C has killed assembly! Of course it still exists; it must (for C compiler writers if for no one else). But a micro with no C support is a non-starter today. That wasn't always so.