This side contains some links into the internet. There is no warranty about the content, it is only a link collection. Most of links are in german.

..Title

git

style guide topics

implementation machine code

C or C++

Vtbl safety

Function Pointer, Vtbl

Tools, Compiler

Software safety

Exception handling

Fix point

Tools on webpages

Ethik in informatik

 

Do people still write assembly language?

Hanno Behrens, IT Consultant living in Germany, Assembly since 1982 Answered 4 years ago · Author has 1K answers and 4.4M answer views Do people still write assembly language? Yes. They are and they will. People often handle Assembly like something of old age or overcome. But that’s not correct. It’s a language like any other language, too. It has it’s strength and it’s weak spots. And while there is this myth about that “modern compilers write better than humans” that is utterly bullshit. And I am sick of hearing this repeat since the 80’s. Still good Assembly code will beat compiled code by factors, sometimes by grades of magnitude, even to a good C compiler. There are some things that HLL can’t do. Like reacting on processor flags like carry, overflow and so on. There are a lot of things HLL can’t do like using all the commands that are in the instruction set of a machine. The XLAT and XCHG commands of the x86_64 for example are very efficient for some problems, but no compiler supports them. The came with the most modern AVX commands or FMT4 commands. The gcc does go so far to implement “intrincics” for that, but it’s just a patch and in the end it’s doing inline assembly to get the full power of modern processors. And I didn’t even start with driver level bit-banging. Which is very lousy on HLL, because they can’t use all the specialized commands that the instruction set provides exactly for that purpose. Yes, the code is less portable. But the x86_64 won’t go away and get replaced anyway soon. It was a big difference in the early 80’s to 90’s, when every year a new processor came out and every year the instruction set changed and we were jumping from 8088 to 6502 to Z80 to 68000 to 8086 to 8051 to 8087 whatever the next innovation got to the market. And it’s very sensible to abstract the commands like “ls” or “cp” of an operating system in a portable way. Most of the time the processor doesn’t do anything with those commands than wait for the drive to find the data requested. So the cycle of the perfect assembly program gets wasted anyway. But you want your audio-system done in assembly, your disk drivers, your fucking memcpy command and memmove. The last two are still done in C inside the C standard library, which is quite a drag. And AgnerWishlist includes those parts and that they urgently should be overworked. Because they slow all of our programs down by at least 50% if not factors. There have been done replaces for those two library commands in assembly and I tested them myself on common programs (you can exchange them by LD_PRELOAD) and it was like having a new computer. So, to replace those routines NOT is just plain stupid. There is just no sensible argument why those routines have to be written in C on a modern x64 system. Because the processor explicit gives commands to effectively do that kind of memory manipulation with the least effort. to do a fucking C loop is just ignorant and that’s not engineering, that’s ideology. “MUST” make everything in HLL so that it’s portable! It ignores that you can simply ask #ifdef __x86_64__ like in the Pre-defined Compiler Macros, that’s why we have them. And to replace memcpy against memcpy_x64 or something would be a primitive thing to do. But, yeah. Ideology is the sworn enemy of engineering. We are priests of rationality, we are scientists and there is just no reason to not change that. But still our compiled code is lousy and with so few effort can be boosted in speed by factors. And Assembly is a very powerful tool in our tool-box and there are problems during our work that it does perfectly. I would always do it as an alternative. So first write it in C, but then add a real version in Assembly. And because people still exist that just get shit done and don’t listen to ideology and who make your machine work in the end, that’s why assembly is still done. 7.2K viewsView upvotes · Answer requested by Arnold Worsley