Assembly language
Dan Tobias (Talk | contribs) (→Links) |
Dan Tobias (Talk | contribs) (→Links) |
||
Line 18: | Line 18: | ||
* [http://archive.org/details/Assembly_Language_for_Kids_1985_Microcomscribe Assembly Language for Kids] (1985 book for Commodore computers) | * [http://archive.org/details/Assembly_Language_for_Kids_1985_Microcomscribe Assembly Language for Kids] (1985 book for Commodore computers) | ||
* [http://archive.org/details/bitsavers_fairchildfng1977_5888299 Guide to assembly programming on Fairchild F8 system (1977)] | * [http://archive.org/details/bitsavers_fairchildfng1977_5888299 Guide to assembly programming on Fairchild F8 system (1977)] | ||
+ | * [http://central.kaserver5.org/Kasoft/Typeset/BBC/Ch43.html Why use an assembly language rather than BASIC? (BBC Microcomputer)] |
Revision as of 03:46, 15 May 2014
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).