Assembly language

From Just Solve the File Format Problem
Revision as of 04:53, 2 October 2016 by Dan Tobias (Talk | contribs)

Jump to: navigation, search
File Format
Name Assembly language
Ontology
Extension(s) .asm, .s, .a

Assembly language is the programming language that is one step above machine language. Its commands (op-code mnemonics, with their operands) directly correspond to the low-level machine instructions, but are expressed in the form of human-readable strings instead of the raw binary of the machine codes themselves. So, for instance, an assembly mnemonic MOV might correspond to a machine language op-code that moves data between a memory location and a processor register, with the op-code itself being a byte which can be expressed in binary or hexadecimal. Traditionally, three-letter identifiers are often used for assembler mnemonics. The mnemonic is often followed by operands such as names of registers or numbers in some base (often hexadecimal), with a comma separating the source and destination of a move command. Comments can also be included to make the code more understandable to humans.

A program called an assembler converts the assembly language program into a machine language program in raw binary, which can then be executed on the computer.

While in the more simple and primitive assemblers the assembly code has a direct one-on-one correspondence with the machine code, via a simple mechanical transformation, more sophisticated assemblers make the language somewhat higher-level by using such things as macros to simplify the programming process by including "commands" that actually translate to longer sequences of machine code than just one op-code and its operands.

Assembly language (like the machine language it assembles to) is platform-specific, designed for a specific machine architecture, so there are many different versions of it. A "cross-assembler" is an assembler which runs on one platform in order to produce code designed to run on a different platform. A "virtual machine" is a simulated machine which runs on one platform but emulates another one (and can thus run machine code targeted at the emulated platform).

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox