Importance of Assembly in Free Software?

2 respuestas [Último envío]
cochranizer
Desconectado/a
se unió: 12/03/2017

Hi everyone,

So I just had a sudden interest in disassembling binaries with the NASM tool "ndisasm", and from what I understand Assembly is the computer language that a computer's processor understands. So here's my question:

1. Is Assembly another form of Source Code?
2. How important is Assembly in the world of Free/Libre Software?

Thanks for your answer, and hopefully everyone stays safe!

zigote
Desconectado/a
se unió: 03/04/2019

> and from what I understand Assembly is the computer language that a computer's processor understands.

The only language that computer processors "understand" (rather: execute) is machine code.

Answers:

1. It's a programming language
2. Importance does not depend on the licensing model

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

As Wikipedia says:

In computer programming, assembly language (or assembler language), often abbreviated asm, is any low-level programming language in which there is a very strong correspondence between the instructions in the language and the architecture's machine code instructions.
https://en.wikipedia.org/wiki/Assembly_language

That "very strong correspondence" explains why we have disassemblers that can get from a binary back to the assembler language.

The GPLv3 defines "source code":

The “source code” for a work means the preferred form of the work for making modifications to it.
https://www.gnu.org/licenses/gpl-3.0.html

Using that definition, what you get with a disassembler is not source code. Even if the program was directly written in assembler (extremely rare nowadays: it was certainly written in a higher-level programming language such as C, C++, Go, Rust, D, Swift, Objective-C, COBOL, Fortran, etc.), you do not get the comments that the programmer has definitely written to be able to understand her own code when she gets back to it.

Understanding assembly without comments is very hard. Not impossible though. For reverse engineering, it can be useful.