Skip to content

stywzn/asm_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

16-bit 8086 Assembly Calculator

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).

⚙️ Current Features (v1.0)

  • 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.

⚠️ Current Limitations

  • 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.

📋 Requirements

  • DOSBox
  • TASM (Turbo Assembler)
  • TLINK (Turbo Linker)

🚀 How to Build and Run

  1. Start DOSBox and mount the directory containing the project files (e.g., mount c C:\your\project\path).
  2. Navigate to the directory (e.g., C:).
  3. Assemble the file (assuming your file is 1.ASM):
    tasm 1.asm
    
  4. Link the object file:
    tlink 1.obj
    
  5. Run the executable:
    1.exe
    

🗺️ Roadmap

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published