Our network of sites >> talk | feed | free | tech | rock | xbox | homes | learn | game | pods | grab | blog | book | beep | help

assembly language

Assembly language or simply assembly is a human-readable notation for the machine language that a specific computer architecture uses. Machine language, a pattern of bits encoding machine operations, is made readable by replacing the raw values with symbols called mnemonics.

Previously: application software >>
Next: BIOS (Basic Input Output System) >>


For example, a computer with the appropriate processor will understand this x86/IA-32 machine instruction:

10110000 01100001

For programmers, however, it is easier to remember the equivalent assembly language representation

mov al, 0x61

which means to move the hexadecimal value 61 (97 decimal) into the processor register with the name 'al'. The mnemonic "mov" is short for "move," and a comma-separated list of arguments or parameters follows it; this is a typical instruction.

Unlike in high-level languages, there is (to a close approximation) a 1-to-1 correspondence between simple assembly and machine language. Transforming assembly into machine languages is accomplished by an assembler, and the reverse by a disassembler.

Every computer architecture has its own machine language, and therefore its own assembly language (the example above is from the i386). These languages differ by the number and type of operations that they support. They may also have different sizes and numbers of registers, and different representations of data types in storage. While all general-purpose computers are able to carry out essentially the same functionality, the way they do it differs.

In addition, multiple sets of mnemonics or assembly-language syntax may exist for a single instruction set. In these cases, the most popular one is usually that used by the manufacturer in their documentation.

There is some debate over the usefulness of assembly language. It is often said that modern compilers can render higher-level languages into code that runs as fast as hand-written assembly, but counter-examples can be made, and there is no clear consensus on this topic. It is reasonably certain that, given the increase in complexity of modern processors, effective hand-optimization is increasingly difficult and requires a great deal of knowledge.

However, some discrete calculations can still be rendered into faster running code with assembly, and some low-level programming is simply easier to do with assembly. Some system-dependent tasks performed by operating systems simply cannot be expressed in high-level languages. In particular, assembly is often used in writing the low level interaction between the operating system and the hardware, for instance in device drivers. Many compilers also render high-level languages into assembly first before fully compiling, allowing the assembly code to be viewed for debugging and optimization purposes.

It's also common, especially in relatively low-level languages such as C, to be able to embed assembly language into the source code with special syntax. Programs using such facilities, such as the Linux kernel, often construct abstractions where different assembly is used on each platform the program supports, but it is called by portable code through a uniform interface.

Many embedded systems are also programmed in assembly to obtain the absolute maximum functionality out of what is often very limited computational resources, though this is gradually changing in some areas as more powerful chips become available for the same minimal cost.

Assembly language is also valuable in reverse engineering, since many programs are distributed only in machine code form, and machine code is usually easy to translate into assembly language and carefully examine in this form, but very difficult to translate into a higher-level language. Tools such as the Interactive Disassembler make extensive use of disassembly for such a purpose.


From Wikipedia, the free encyclopedia.



Was this helpful? Buy David a Starbucks® Mocha via PayPal!

David loves his Starbucks® mocha. Skim, no whip, please. To easily and painlessly send David a selection from Starbucks® and paying via PayPal, just click on the button below your choice:

Listeners who have bought David a Starbucks® Mocha:

Chuck Craig Becky Bob Chris Dana Dean Gary Heidi Jen Jim Faucett (link?) Kevin Leo Lili Linda Michael Randy Ray Scott Sophie Sophie (II) Warren (link?)

Digg This! article or tag it at del.icio.us


Link to this article from your own website

Just copy this HTML code block. Then, paste it into your own code:





Up To The Minute Bargains



Want an e-Mini-Mall for your site?


If you need help

You can always call in to the show at the number listed above, or send David an email using the link above.


To repeat: You can always call in to the show at the number listed above, or send David email using the link above.