Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the assembly language different from one architecture to another?

I read that every processor has its own assembly language, so is every processor has it own assembly or every architecture? How OS and programming languages work on different assemblies?

like image 258
Ahmad Naoum Avatar asked Dec 23 '15 10:12

Ahmad Naoum


1 Answers

The process of assembling code is to translate opcodes - expressed as text - into binary.

Basically, you can say that each processor has its own instruction set. Binary code for a different processor will simply not run - or if the platform differences are only marginal, run and produce unexpected results (well, not really unexpected). This is why multiple install packages/CDs/DVDs for the very same program/OS exist for different platforms.

E.g. gcc (GNU Compiler Collection) provides for the same release a variety of packages (see "Download gcc"), built from the same (high-level) source code, but for different hardware architectures.

like image 161
flederwiesel Avatar answered Sep 18 '22 00:09

flederwiesel