Assembly Language


Assembly Language is the language of the microprocessor. Using Assembly Language, you have a very tight control over the microprocessor.

Assembly Language differs from microprocessor to microprocessor.  Assembly is the lowest level you can code in. Also, it speeds up your code incredibly. Nowadays though, with the advent of high performance compilers, you would be hard pressed to write code in assembly which is faster than that which the compiler generates. But sometimes, the time critical parts of a project are coded in assembly, so that it consumes less memory and time.

So, now we arrive to the question, What exactly is Assembly Language?

As I said before, Assembly Language is the microprocessor’s native language. Only instructions from the microprocessor’s instruction set are used.  Now, languages like C,C++, C# and others, have a variety of constructs like declaration of variables, iterative loops and procedures. But all these are not available in assembly, and you have to create your own loops using JUMP statements and a counter. As you can deduce, this makes coding at assembly level, significantly harder.

Now, as I stated previously, assembly differs from microprocessor to microprocessor, so How do we code in Assembly?

There are two ways to code in assembly. One is to hand code, which I will explain later, and the other is to use an Assembler. There are many assemblers available out there on the internet. The popular ones are, TASM, MASM, and NASM. All of these are 32 bit assemblers which can assemble code for 32 bit microprocessors. Before you start coding in assembly, there is one thing you should know: Although there are various microprocessors, they are grouped into families. This means, that code written for one microprocessor of a family will run for any other processor in the family, provided it is higher up in the family. Simply put, this means that code is backwards compatible.

The main processor families are: Intel’s x86(also known as IA-32), Motorola’s 68xxx and Intel’s Itanium family(also known as IA-64) . The first two are 32 bit while the last is 64 bit.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s