A comprehensive collection of Assembly language practical exercises and programs covering fundamental concepts in x86 assembly programming. This repository contains well-documented assembly code examples that demonstrate various programming techniques, from basic I/O operations to advanced arithmetic computations and pattern generation.
- ๐ Installation
- ๐ป Usage
- โจ Features
- ๐ Project Structure
- ๐ค Contributing
- โ๏ธ License
- ๐บ๏ธ Roadmap
- ๐ Acknowledgements
- ๐ ๏ธ Built With
- MASM (Microsoft Macro Assembler) - For assembling x86 assembly code
- DOSBox - For running 16-bit DOS programs on modern systems
- Text Editor - Any text editor or IDE with assembly syntax highlighting
-
Clone the repository
git clone https://github.com/H0NEYP0T-466/Assembly_Codes.git cd Assembly_Codes
-
Install MASM and DOSBox
- Download and install DOSBox
- Download MASM32 or use MASM from Visual Studio
-
Set up DOSBox environment
# In DOSBox, mount your directory mount C: /path/to/Assembly_Codes C:
-
Compile and run a program
# Assemble masm filename.asm # Link link filename.obj # Run filename.exe
.MODEL SMALL
.STACK 100H
.DATA
string1 DB 'Hello, World!$', 0
newline DB 0DH, 0AH, '$'
.CODE
MAIN PROC
MOV AX, @DATA
MOV DS, AX
MOV DX, OFFSET string1
MOV AH, 09H
INT 21H
MOV AH, 4CH
INT 21H
MAIN ENDP
END MAIN
; Addition of two numbers
mov ah, 1 ; DOS function for character input
int 21h ; Get first number
sub al, '0' ; Convert ASCII to number
mov var1, al ; Store first number
mov ah, 1 ; Get second number
int 21h
sub al, '0' ; Convert ASCII to number
mov var2, al ; Store second number
mov al, var1 ; Load first number
add al, var2 ; Add second number
add al, '0' ; Convert back to ASCII
mov result, al ; Store result
# Compile any practical file
masm Pratical#X_task#Y.asm
# Link the object file
link Pratical#X_task#Y.obj
# Execute the program
Pratical#X_task#Y.exe
- ๐ 52 Assembly Programs - Comprehensive collection covering all basic to advanced assembly concepts
- ๐ข Arithmetic Operations - Addition, subtraction, multiplication with user input
- ๐ String Manipulation - String printing, character counting, and text processing
- ๐ Loop Constructions - Various loop implementations and pattern generation
- ๐ฅ Input/Output Operations - User interaction through DOS interrupts
- ๐งฎ Mathematical Expressions - Complex expression evaluation (A = B+C-D*E)
- ๐จ Pattern Generation - Number patterns and visual outputs
- ๐ Character Analysis - Uppercase letter counting and text analysis
- ๐ง Modular Programming - Use of procedures and functions
- ๐ก Well-Commented Code - Clear explanations for learning purposes
Assembly_Codes/
โโโ ๐ README.md # Project documentation
โโโ โ๏ธ LICENSE # MIT License
โโโ ๐ค CONTRIBUTING.md # Contribution guidelines
โ
โโโ ๐งฎ Fundamental Concepts # Basic Assembly Programming
โ โโโ Pratical#1_task#1.asm # Basic assembly structure
โ โโโ Pratical#1_task#2.asm # Simple operations
โ โโโ Pratical#3_task#1.asm # String output operations
โ โโโ Pratical#3_task#2.asm # Multiple string handling
โ โโโ Pratical#3_task#3.asm # Advanced string operations
โ โโโ Pratical#4_task#1.asm # Input/Output operations
โ โโโ Pratical#4_task#2.asm # Character processing
โ โโโ Pratical#4_task#3.asm # Data manipulation
โ
โโโ ๐ข Arithmetic Operations # Mathematical Computations
โ โโโ Pratical#5_task#1.asm # Basic arithmetic
โ โโโ Pratical#5_task#2.asm # Multi-digit operations
โ โโโ Pratical#5_task#3.asm # Arithmetic expressions
โ โโโ Pratical#6_task#1.asm # Addition operations
โ โโโ Pratical#6_task#2.asm # Subtraction operations
โ โโโ Pratical#6_task#3.asm # Multiplication
โ โโโ Pratical#6_task#4.asm # Complex calculations
โ โโโ Pratical#7_task#1.asm # Multiple input handling
โ โโโ Pratical#7_task#2.asm # Addition with user input
โ โโโ Pratical#7_task#3.asm # Expression evaluation (A=B+C-D*E)
โ
โโโ ๐ Loop & Control Structures # Flow Control
โ โโโ Pratical#8_task#1.asm # Basic loops
โ โโโ Pratical#8_task#2.asm # Nested loops
โ โโโ Pratical#8_task#3.asm # Conditional structures
โ โโโ Pratical#9_task#1.asm # Pattern generation
โ โโโ Pratical#9_task#2.asm # Character counting
โ โโโ Pratical#9_task#3.asm # Advanced patterns
โ
โโโ ๐ฏ Advanced Programming # Complex Operations
โ โโโ Pratical#10_task#1.asm # Advanced loops
โ โโโ Pratical#10_task#2.asm # String processing
โ โโโ Pratical#10_task#3.asm # Data validation
โ โโโ Pratical#11_task#1.asm # Procedure implementation
โ โโโ Pratical#11_task#2.asm # Function calls
โ โโโ Pratical#11_task#3.asm # Modular programming
โ โโโ Pratical#12_task#1.asm # Advanced procedures
โ โโโ Pratical#12_task#2.asm # Stack operations
โ โโโ Pratical#12_task#3.asm # Memory management
โ
โโโ ๐ Additional Examples # Supplementary Programs
โ โโโ add_two_numbers.asm # Simple addition example
โ โโโ capital_small_small_capital.asm # Case conversion
โ โโโ coal_theory.asm # Theoretical implementation
โ โโโ countdown.asm # Countdown timer
โ โโโ div-2-3.asm # Division operations
โ โโโ equal_greater_lesser.asm # Comparison operations
โ โโโ even_odd.asm # Even/odd determination
โ โโโ print_char.asm # Character output
โ โโโ print_digit.asm # Digit printing
โ โโโ print_string.asm # String output
โ โโโ space.asm # Spacing and formatting
โ
โโโ ๐งช Practice Files # Development Exercises
โ โโโ 29-jan-2025.asm # Recent practice
โ โโโ 29-jan-205.asm # Practice variations
โ โโโ 29-jan-25.asm # Date-based exercises
โ โโโ class task.asm # Classroom assignments
โ โโโ question_1.asm # Problem set 1
โ โโโ question_2.asm # Problem set 2
โ โโโ task.asm # General tasks
โ โโโ task1.asm # Initial task
โ
โโโ ๐ Total: 52 Assembly Files # Complete collection
Contributions are welcome! Please read our Contributing Guidelines for details on:
- ๐ด How to fork and contribute
- ๐ Code style and formatting rules
- ๐ Bug report guidelines
- โจ Feature request process
- ๐งช Testing procedures
This project is licensed under the MIT License - see the LICENSE file for details.
- Basic I/O operations with DOS interrupts
- Arithmetic operations (addition, subtraction, multiplication)
- String manipulation and character processing
- Loop constructions and pattern generation
- Modular programming with procedures
- User input validation and processing
- Advanced mathematical operations (division, modulo)
- File I/O operations
- Graphics mode programming
- Interrupt handling examples
- Memory management techniques
- Advanced data structures
- 32-bit assembly examples
- NASM syntax alternatives
- Linux assembly equivalents
- Interactive assembly learning modules
- Automated testing framework
- Web-based assembly simulator integration
- ๐ซ Educational Institution - For providing the practical framework
- ๐ Assembly Language Community - For continuous learning resources
- ๐ ๏ธ MASM Development Team - For the excellent assembler
- ๐ฏ DOS Legacy - For the interrupt system that makes these examples possible
- ๐ฅ Open Source Community - For inspiration and best practices
- Assembly Language (x86) - Low-level programming language
- MASM (Microsoft Macro Assembler) - Assembler for x86 processors
- DOS Interrupts - System calls for I/O operations
- 16-bit x86 Architecture - Target processor architecture
- DOSBox - DOS emulator for modern systems
Made with โค๏ธ by H0NEYP0T-466