Master the art of low-level programming with interactive examples and visualizations
Assembly language is a programming language that uses symbolic representations instead of binary machine code. It provides a human-readable way to write programs that are then translated into binary code by an assembler. Each line of code follows a structured format with three distinct fields.
Each line in assembly language is organized into three fields:
Click on any row to see detailed explanations of each instruction:
| Label | Instruction | Comment |
|---|---|---|
| ORG 100 | / Origin of program is location 100 | |
| LDA SUB | / Load subtrahend to AC | |
| CMA | / Complement AC | |
| INC | / Increment AC | |
| ADD MIN | / Add minuend to AC | |
| STA DIF | / Store difference | |
| HLT | / Halt computer | |
| MIN, | DEC 83 | / Minuend |
| SUB, | DEC -23 | / Subtrahend |
| DIF, | HEX 0 | / Stored difference here |
| END | / End of symbolic program |
This shows how data is stored in memory during program execution:
The assembler performs a two-pass translation process: