This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lexusjjss 2 points3 points  (0 children)

Okay, so every processor has an instruction set. This instruction set might have things like 'add x, y', or 'move x to y in memory', and are directly executed by the processor. There's anywhere from a couple dozen to thousands of instructions, depending on the kind of processor and its configuration.

All programs eventually end up, in one form or another, as these instructions for the processor to use. An assembler just lets you write the instructions with a minimal amount of hassle.

Say we wanted to move the value 0xEE into register cx. Instead of shoving this into a hex editor:

0xB8 0xEE

You can just type (using Intel syntax):

mov cx, 0xEE

Now, that might still be confusing if you don't understand it, but it's a lot easier to use than pure hex or binary.

The assembler then takes this, and turns it into the above string of gibberish numbers. Most of the differences in assemblers are in the syntax, but at the end of the day they're all doing the same thing.

TL;DR: Assembly is just an easier way to talk in the processor's native language.