assembler?

I'm trying to understand how the compilation process works

what I've understood so far is that
first we have the pre-processor which i can image just looks through the code and finds symbols like '#' and things of the sort and basically just copies and moves code around.

and then there's the compiler which i imagine just does something like search for keywords like "class" and "if",
obviously i have no idea how exactly it does it,
but then it breaks those keywords down to the equivalent code in assembly.

but when it comes to the assembler I'm lost, it might be because I'm wrong about some of the previous stages of the compilation process.


i get that the assembler basically takes the assembly code and turns it in to a bunch of object files,
which i assume is just files containing machine language,
and then the linker later takes all of those and turns them in to one executable file.

(why it breaks it down to multiple object files i also don't get. Hehe :s )

so what I'm confused about is,
i guess,
"what" and "where" is this "assembler"?

a compiler i know what is,
and i know that someone made it,
like, i think that the compiler visual studio uses is called CL compiler or something,
idk,
and there's also something called a GCC compiler as well?

i pretty sure I'm wrong about the names,
but non the less i get the idea of what they do,
and that there's multiple kinds of them made by various people.

but what about the assembler?
is it basically the same thing?
is there multiple assemblers made by different people?
or are the assemblers made by the companies that makes the processors?

do the assembler basically just take assembly keywords and turn them in to the equivalent in ones and zeroes?
exactly how the compiler turns c++ code in to assembly?

Last edited on
is there multiple assemblers made by different people?

Yes, there are (and were) lots of assemblers written by everyone from hardwere vendors to compiler vendors to independent groups and individuals.

On Linux, the popular ones today are gas (GNU assembler) and nasm (Netwide assembler).
On Windows, these are ml (Microsoft assembler) and nasm as well.
Topic archived. No new replies allowed.