Q
Q
Qreen2021-07-31 20:19:04
assembler
Qreen, 2021-07-31 20:19:04

What is assembler for?

Why does assembler exist now? Previously, when drivers and loaders for systems were written on it, as well as low-level tasks, what is written on it now? Uefi can run .efi pe files written in C, drivers are also written in C, and since C, if I'm not mistaken, is compiled first into asm, and then into binary, it turns out that the assembler becomes stupidly unnecessary

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
SagePtr, 2021-07-31
@Qreen

If you need to get some specific code at the output, without fear that the compiler or optimizer of a high-level PL will "rephrase" it with its instructions. In 99.99% of cases this is not necessary.

V
ValdikSS, 2021-07-31
@ValdikSS

Assembler is actively used for:
* SIMD optimizations in the most complex tasks: video encoding and decoding, emulation of other architectures (for example, game consoles on a computer)
* Writing (parts of) low-level code for processors: bootroms, firmware, etc.
* Creating the same UEFI for a specific architecture / chipset

L
longclaps, 2021-07-31
@longclaps

since si, if I'm not mistaken, is compiled first into asm, and then into a binary,
Yes, sometimes.
it turns out that the assembler stupidly becomes unnecessary
No. The .asm file will not compile itself into a binary.

N
none7, 2021-08-01
@none7

All openssl algorithms are implemented in assembler. Because optimizing compilers generate non-optimal code. It's not even about SIMD, the simplest instructions with a very limited number of variables, compilers are not able to arrange in perfect order.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question