eli5 what is the difference between a decompilation and a disassembly when it comes to viseo games?

292 views

eli5 what is the difference between a decompilation and a disassembly when it comes to viseo games?

In: 1

8 Answers

Anonymous 0 Comments

Computers speak in 1’s and 0’s. If you want to tell it to do something, you have to speak its language. It’s *possible* to speak its language directly, but you’d be very hard-pressed to find a human that can do it well.

To make it easier for us stupid humans, we don’t write programs in the computer’s language. Instead, it can be written in a sort of simplified language. One that, if you feed it into a special program, can be translated into something the computer can understand. That program is called an assembler, and the coding language you feed it is called assembly.

Each programmable computer chip speaks its own special dialect of assembly. So if you write assembly code for one kind of computer, it might not work on another, as the other computer can’t understand the dialect. If you had to write a program that needed to work on many different kinds of computers, you’d have to tailor-make a unique copy for every dialect you want to support. That can get quite difficult to keep up with. It would be really nice if we could instead write one master program that works for all of them, and create a set of translators that can take the master program and translate it into all of those dialects for you. Each one of those translators is called a compiler.

At this level of abstraction away from actual machine language, you don’t really end up with any particular programming language. You can kind of make it whatever you want. So a lot of people have. C and C++ are two examples of programming languages that are on this level of the chart. They are both (by some definition of the word) easy for humans to read, that can be converted into something the computer to read via a compiler and assembler.

So, as you can probably guess, a *disassembly* is the result of doing the reverse of what an assembler does, and a *decompilation* is the result of doing the reverse of what a compiler does. Disassemblies tend to be more straightforward, as pure machine code and assembly language for a specific computer tend to map 1-to-1, but as far as being able to read and understand what the code actually *does* can be quite difficult. A decompilation is when someone takes this one step further, and tries to reconstruct the more human-readable code that something was originally created from. Decompilations are a lot trickier, as the process of mangling human-readable C or C++ or whatever language code into assembly for a specific computer is a lossy process, as the compiler often makes a lot of unintuitive optimizations to make the program run faster.

You are viewing 1 out of 8 answers, click here to view all answers.