Difference between revisions of "Assembly language"
(Add a 'macro' page) |
(Add links, minor improvements) |
||
Line 1: | Line 1: | ||
− | '''Assembly language''' (short form '''assembler''') is a [[programming language]] which is a human-readable form of the machine's basic [[object code]]. Rather than being in [[binary]] (expressed in whatever base), it instead uses mnemonics to indicate the | + | '''Assembly language''' (short form '''assembler''') is a [[programming language]] which is a human-readable form of the machine's basic [[object code]]. Rather than being in [[binary]] (expressed in whatever base), it instead uses mnemonics to indicate the [[instruction]]s (e.g. 'ADD'), along with other fields to indicate the operands for each instruction (e.g. '[[stack pointer|SP]]'). |
− | A program called an '''assembler''' converts the [[source code]] to binary object code. Assemblers usually also provide for symbolic labels for locations, so that [[transfer-of-control | + | A program called an '''assembler''' converts the [[source code]] to binary object code. Assemblers usually also provide for symbolic labels for the locations at which various instructions will be stored in [[main memory]], so that [[control flow|transfer-of-control]] instructions can give their destinations symbolically. In addition to being more readable, this also means that such instructions don't need to be modified as the program is changed (changing the [[absolute address]]es at which their targets reside). |
A more advanced program for writing in assembler is a '''macro assembler''', which is an assembler enhanced to provide [[macro]]s. | A more advanced program for writing in assembler is a '''macro assembler''', which is an assembler enhanced to provide [[macro]]s. |
Revision as of 17:41, 6 November 2017
Assembly language (short form assembler) is a programming language which is a human-readable form of the machine's basic object code. Rather than being in binary (expressed in whatever base), it instead uses mnemonics to indicate the instructions (e.g. 'ADD'), along with other fields to indicate the operands for each instruction (e.g. 'SP').
A program called an assembler converts the source code to binary object code. Assemblers usually also provide for symbolic labels for the locations at which various instructions will be stored in main memory, so that transfer-of-control instructions can give their destinations symbolically. In addition to being more readable, this also means that such instructions don't need to be modified as the program is changed (changing the absolute addresses at which their targets reside).
A more advanced program for writing in assembler is a macro assembler, which is an assembler enhanced to provide macros.