C is used even for embedded systems, and assembly only when they have to. As for compiler writing, probably less than 1% of the programmers in the world are engaged in that activity, with even fewer osdev'ing.no92 wrote:Source? I'd say Assembly is used by many programmers. You need it for things like heavy code optimization, shellcoding and compilerDeving. That's not just a little part; it's a big one. Some c-only programmers don't need it, but still know it.mathematician wrote:c.) Assembly language tends not to be very much used nowadays, although it cannot be completely avoided if you are writing an operating system.
As soon as you start to program on a arch other than IA-32(e), you will run into trouble with your C compiler. For example, there's no good C compiler for Zilogs (ask the KnightOS guys if you don't believe what I'm saying).
Is necessary develop currently in Assembly...?
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
Re: Is necessary develop currently in Assembly, ..., hex cod
The continuous image of a connected set is connected.
-
- Member
- Posts: 307
- Joined: Wed Oct 30, 2013 1:57 pm
- Libera.chat IRC: no92
- Location: Germany
- Contact:
Re: Is necessary develop currently in Assembly, ..., hex cod
No. It's used when optimizing heavily. I don't know whether it's actually done in practice, but graphics programming would be a big field of application.mathematician wrote:assembly only when they have to.
Re: Is necessary develop currently in Assembly, ..., hex cod
Which is part of "when they have to". Nobody in their right mind would use assembly for productive software if they didn't have to. It's different for a hobby OS, of course, because there the motivation for choosing it might just be the fun factor - and if it crashes, nobody cares anyway.
But considering all software that is developed today, "Assembly language tends not to be very much used nowadays" seems to be a fair description.
But considering all software that is developed today, "Assembly language tends not to be very much used nowadays" seems to be a fair description.
Re: Is necessary develop currently in Assembly, ..., hex cod
And could indeed be backed up quantitatively as well:Kevin wrote:But considering all software that is developed today, "Assembly language tends not to be very much used nowadays" seems to be a fair description.
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html wrote:#29 Assembly (0.599%)
Developer of libc11
-
- Member
- Posts: 307
- Joined: Wed Oct 30, 2013 1:57 pm
- Libera.chat IRC: no92
- Location: Germany
- Contact:
Re: Is necessary develop currently in Assembly, ..., hex cod
Even a well-known programming language like Lua is not used as much as Assembly. I think these statistics do not tell us a lot: Assembly is often used together with C, as Lua sometimes is with C++. These statistics seem to ignore that fact.
- darkinsanity
- Member
- Posts: 45
- Joined: Wed Sep 17, 2008 3:59 am
- Location: Germany
Re: Is necessary develop currently in Assembly, ..., hex cod
Not really. Rewriting code in assembly would waste a huge amount of resources, and you just end up doing by hand what the compiler already did for you. That's why almost nobody is doing that, except for people targeting special devices (like small microcontrollers where you have to count every byte), OS-developers (for things like flushing the TLB) and people claiming that "real programmers" only use assembly because it's "so superior" to C. When writing commercial software your resources are better invested in optimizing the high-level code.no92 wrote:No. It's used when optimizing heavily.mathematician wrote:assembly only when they have to.
Trying to beat a compiler at optimizing is tilting at windmills 99,9% of the time. And when it's not, you most likely just introduced a new bug.
It was done once - and everyone agreed to get rid of it. When programmable shader stages first appeared, there was no standardized high-level language to program them, so you had to use vendor-specific assembly languages. It was a pain to program, you had to rewrite the shader programs for different vendors and often even two different GPUs from one vendor couldn't run the same code. Also, manually optimizing the code was horrible, not only because it was error-prone, but also because almost every GPU had different performance-characteristics.no92 wrote:I don't know whether it's actually done in practice, but graphics programming would be a big field of application.
This lead to the creation of HLSL, GLSL and Cg. Of which all are (not coincidentally) based on C-syntax.
And now, with GPGPU being available to almost everyone, the field is dominated by CUDA and OpenCL, utilizing C- and C++-dialects. Afaik NVIDIA added an extension to OpenCL to allow inline-usage of their assembly-dialect, but I have yet to see someone using it.
-
- Member
- Posts: 5513
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Is necessary develop currently in Assembly, ..., hex cod
You've forgotten video and audio manipulation, where the same equation might need to be evaluated for millions of sets of input data, and the compiler is usually too dumb to produce a SIMD interpretation with decent performance.darkinsanity wrote:Not really. Rewriting code in assembly would waste a huge amount of resources, and you just end up doing by hand what the compiler already did for you. That's why almost nobody is doing that, except for people targeting special devices (like small microcontrollers where you have to count every byte), OS-developers (for things like flushing the TLB) and people claiming that "real programmers" only use assembly because it's "so superior" to C.no92 wrote:No. It's used when optimizing heavily.mathematician wrote:assembly only when they have to.
It's not "heavy" optimization when a single function makes up more than 25% of your program's CPU time.