Assembly language is a low-level programming language that uses human-readable mnemonics (such as MOV, ADD, JMP) to represent the machine-code instructions of a specific processor's instruction set architecture. Each assembly instruction corresponds directly to one or a few machine instructions, making assembly programs tightly coupled to the hardware they run on. Assembly is used in performance-critical code, device drivers, bootloaders, and situations where direct hardware manipulation is required.
| Mnemonic | Operation | Example | C Equivalent |
|---|---|---|---|
| MOV | Copy data | MOV rax, 5 | rax = 5 |
| ADD | Addition | ADD rax, rbx | rax += rbx |
| SUB | Subtraction | SUB rax, 3 | rax -= 3 |
| CMP | Compare (sets flags) | CMP rax, 0 | rax == 0 ? |
| JMP | Unconditional jump | JMP label | goto label |
| CALL | Call subroutine | CALL func | func() |
Compiler Explorer (Godbolt)
See real-time assembly output from C/C++ code across many compilers
Open ToolWikimedia Commons, CC BY-SA
Instruction Set Architecture (ISA) is the abstract model of a computer that defines the set of instructions a processor can execute, along with the data types, registers, addressing modes, and memory architecture it supports. The ISA forms the interface between hardware and software, allowing compilers and programmers to write code without knowing the underlying circuit details. Common ISA families include x86, ARM, RISC-V, and MIPS, each with distinct trade-offs between instruction complexity, power consumption, and performance.
A computer interrupt is a signal sent to the processor indicating that an event requiring immediate attention has occurred, causing the CPU to pause its current execution, save its state, and transfer control to an interrupt service routine (ISR). Interrupts can originate from hardware (e.g., a keypress, network packet arrival, timer expiry) or software (e.g., system calls, exceptions). The interrupt mechanism is fundamental to efficient multitasking and real-time responsiveness, as it allows the CPU to react to asynchronous events without continuously polling devices.
An embedded system is a dedicated computer system designed to perform one or a few specific functions within a larger mechanical or electronic device, operating under real-time computing constraints. Embedded systems combine a microcontroller or microprocessor with custom software (firmware) and interface directly with hardware peripherals such as sensors, actuators, and displays. They are ubiquitous in modern life, found in smartphones, automotive ECUs, washing machines, medical pacemakers, and industrial PLCs.
The word "assembly" refers to the process of assembling or translating mnemonic codes into binary machine code. The tool that performs this translation is called an "assembler." Early assemblers were developed in the early 1950s; Kathleen Booth is credited with writing one of the first assemblers for the ARC computer at Birkbeck College in 1947.