Skip to content

๐Ÿš€ A collection of Assembly language lab codes and exercises ๐Ÿ–ฅ๏ธ. Covers fundamental concepts, low-level programming, and practical implementations from university labs. Perfect for practicing Assembly basics, understanding hardware-level logic, and sharpening problem-solving skills.

License

Notifications You must be signed in to change notification settings

H0NEYP0T-466/Assembly_Codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Assembly Codes ๐Ÿ”ง

GitHub License GitHub Stars GitHub Forks Contributions Welcome GitHub Issues

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.

๐Ÿ”— Links

๐Ÿ“‘ Table of Contents

๐Ÿš€ Installation

Prerequisites

  • 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

Installation Steps

  1. Clone the repository

    git clone https://github.com/H0NEYP0T-466/Assembly_Codes.git
    cd Assembly_Codes
  2. Install MASM and DOSBox

    • Download and install DOSBox
    • Download MASM32 or use MASM from Visual Studio
  3. Set up DOSBox environment

    # In DOSBox, mount your directory
    mount C: /path/to/Assembly_Codes
    C:
  4. Compile and run a program

    # Assemble
    masm filename.asm
    # Link
    link filename.obj
    # Run
    filename.exe

๐Ÿ’ป Usage

Basic Example - Hello World

.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

Arithmetic Operations Example

; 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

Command Line Usage

# 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

โœจ Features

  • ๐Ÿ“š 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

๐Ÿ“ Project Structure

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

๐Ÿค Contributing

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

โš–๏ธ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ—บ๏ธ Roadmap

โœ… Current Features

  • 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

๐Ÿšง Planned Features

  • Advanced mathematical operations (division, modulo)
  • File I/O operations
  • Graphics mode programming
  • Interrupt handling examples
  • Memory management techniques
  • Advanced data structures

๐Ÿ”ฎ Future Vision

  • 32-bit assembly examples
  • NASM syntax alternatives
  • Linux assembly equivalents
  • Interactive assembly learning modules
  • Automated testing framework
  • Web-based assembly simulator integration

๐Ÿ™ Acknowledgements

  • ๐Ÿซ 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

๐Ÿ› ๏ธ Built With


Made with โค๏ธ by H0NEYP0T-466

About

๐Ÿš€ A collection of Assembly language lab codes and exercises ๐Ÿ–ฅ๏ธ. Covers fundamental concepts, low-level programming, and practical implementations from university labs. Perfect for practicing Assembly basics, understanding hardware-level logic, and sharpening problem-solving skills.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •