O
O
onMymind2017-05-03 21:04:51
assembler
onMymind, 2017-05-03 21:04:51

What is an assembler for?

I don't understand its purpose. It seems that the drivers are already written in C. Microcontrollers are also in C. It is only used to create OS, it turns out? (Or can they already be written in other languages ​​too?)
And should it be taught if it is already being replaced? Is it so important to understand what is happening at a deeper, machine level.

Answer the question

In order to leave comments, you need to log in

9 answer(s)
D
Dmitry, 2017-05-03
@TrueBers

Let's just say: why be able to assemble and disassemble an engine from a car and understand how it works?
99% of people don't need it at all. But if you know this, you can easily diagnose a problem, understand how to solve it. At the same time, every day you do not produce engines on the machine.
The same with assembler: in order to understand how the program works, how to debug it, diagnose it, understand what does not work - this is what an assembler is for. To write something concrete and big on it is now absolutely meaningless. It must be known and understood , that is enough.

D
Daemon23RUS, 2017-05-03
@Daemon23RUS

I don't understand its purpose
Understand one simple thing, absolutely any program written in absolutely any programming language will eventually be converted into processor machine code for execution. And the representation of this code is precisely the assembler.
And should it be taught if it is already being replaced?
Nobody replaces him, I dare say he is irreplaceable. The assembler has one property, it is very difficult to write large programs in it, even using a macro assembler. Imagine that an assembler program does not need an operating system, an assembler can directly interact with devices, without drivers (you just need to write a protocol for this very interaction) There are more convenient languages, such as "C" or "C ++". Everyone makes the decision to study independently, in some areas the assembler is indispensable. And in others - useless and even harmful.

D
d-stream, 2017-05-03
@d-stream

Learning how to pass is definitely not necessary.
Study - yes, it is possible. At least from the point of view of understanding the operation of the processor as such.

1
15432, 2017-05-03
@15432

And knowledge of assembler is also necessary if you want to understand how this or that compiled program works (and then write your own similar in functionality or modify this one).
In the field of information security is a must. A simple example is to manually analyze unknown viruses in the Kaspersky Lab. (if interested, LC conducts courses on this topic and hires for an internship)

E
evgeniy_lm, 2017-05-03
@evgeniy_lm

FYI, drivers are part of the OS. They, like the entire OS, can be written in C, it can be in Assembler, or, for example, in Pascal. It's just that computers are so fast and have so much memory these days that code optimization takes a backseat. Although the compilers of modern programming languages ​​in terms of optimization will give odds to most modern programmers.
But all the same, in serious programs there are many so-called "bottlenecks", as a rule, this is due to a lack of speed, less often a lack of memory, here assembler comes to the rescue.
Although a weirdo who shitcodes in PHP or JS cannot understand this
PS A programming language is a tool, not a poem, you don’t need to learn it, you need to write programs on it

K
Kolya K, 2017-05-03
@Kolyagrozamorey

A program correctly written in assembler will run several times faster than a similar program written in a high-level language. But if the program code in a high-level language takes a page, then in assembler 10-20 pages. So if speed is important and you are not afraid to write dozens of pages of code, write in assembler.

J
jcmvbkbc, 2017-05-03
@jcmvbkbc

What is an assembler for?

A couple more niches to those already listed: the development of compilers and processor emulators.

P
Pavel, 2017-05-03
@electronik777

To make it clearer, 20 years ago Asm was still used to optimize the application, i.e. for a more optimal application. With the development of frameworks, this need has disappeared as such, because now the performance of iron is much higher than 20 years ago, and the resources of this iron are used on average by 30 percent (we do not take into account games and 3D graphics), and few people already use low-level functions (hello from int13h). The only place where it can still be used is in real-time OS, where fractions of micro-nano-seconds are critical. In everyday life, this is not useful, of course, if you do not go to talk to the processor in his native language.

D
Dimonchik, 2017-05-03
@dimonchik2013

to understand the disassembler ...
... well, or some kind of virus to order

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question