Assembly language is a low-level programming language. Each assembly language is specific to a particular computer architecture. Assembly language uses mnemonics to represent low-level machine instructions or opcodes. Many operations require one or more operands in order to form a complete instruction. Most assembly languages let you use different modes of addressing to specify the value (immediate addressing) or location/memory address of an operand. Assembly languages also let you use labels in the code to point to specific memory locations or registers.
LMC (Little Man Computer) is an example of basic assembly language used for educational purposes. It consists of only 11 mnemonics (e.g. INP, OUT, STA, BRP, etc.) and is based on one memory addressing mode: direct addressing.
Little Man ComputerOpen in new tab/window
Because assembly language use a relatively basic syntax and a limited number of mnemonics, the translation process to convert low level code into machine code (aka object code or binary code) is fairly straightforward. This process is called “assembling” and is preformed by an assembler: a piece of software utility used to translate/assemble low-level code into binary code.
Because assembly depends on the machine code instructions, every assembler has its own assembly language which is designed for exactly one specific computer architecture.
Assembly language usually has one statement per machine instruction so there is the 1:1 relationship between a low-level instruction and a machine instruction. Basic computer architectures will result in a reduced number of instructions. More complex architectures will result in a wider range of instructions making it easier to write assembly code. (Find our more about RISC – Reduced Instruction Set – and CISC – Complex instruction Set – processors)
Unlike assembly language, most high-level programming languages are generally portable across multiple architectures but require interpreting or compiling, a much more complicated task than assembling.
We have created an online assembler for the LMC language to demonstrate the process of translating LMC code to machine/binary code. You can use it to load your own LMC programs and assemble them into binary.
In the early days of computer science (1950s, 1960s) computer programs could be “printed” using hole punched cards or tape. Our LMC assembler let you preview the resulting hole punched tape for your programs.
LMC AssemblerOpen in new tab/window