A simple 16-bit 8086 Assembly program that performs addition on two unsigned integers. This project is written in classic SEGMENT directive style for the TASM (Turbo Assembler) compiler and is designed to run in DOSBox.
This project is currently at Version 1.0 (See Releases).
- Prompts the user to enter two numbers.
- Performs addition on two 16-bit unsigned integers.
- Includes basic overflow detection (using the Carry Flag).
- Handles multi-digit number input (ASCII to binary conversion).
- Displays the formatted result (e.g.,
10 + 20 = 30). - Allows the user to quit by entering
q.
- 16-bit Unsigned Arithmetic: The program uses 16-bit registers (
AX,BX) for calculations. This means the maximum value for a single input and the final sum is 65,535. Any sum exceeding this will trigger an overflow error. - No Negative Numbers: Only unsigned positive integers are supported.
- Minimal Input Validation: The program does not validate that the input consists only of digits. Entering non-numeric characters will lead to incorrect calculations.
- DOSBox
- TASM (Turbo Assembler)
- TLINK (Turbo Linker)
- Start DOSBox and mount the directory containing the project files (e.g.,
mount c C:\your\project\path). - Navigate to the directory (e.g.,
C:). - Assemble the file (assuming your file is
1.ASM):tasm 1.asm - Link the object file:
tlink 1.obj - Run the executable:
1.exe
Future features and bugs are tracked in the Issues tab. Planned improvements include:
- Robust input validation (check for digits
0-9). - Adding subtraction, multiplication, and division.
- Support for signed (negative) numbers.