This project is an assembly language implementation designed for MASM (Microsoft Macro Assembler) in real mode. It consists of two main parts:
-
Sound and Display Effects:
- Plays a unique sound for each lowercase English letter key pressed.
- Changes the screen color dynamically.
- Displays the real-time system clock (hours, minutes, seconds) and updates it every second.
-
Graphics Drawing and Input Handling:
- Accepts user input commands to draw circles, rectangles, and squares with specified dimensions and colors.
- Uses BIOS interrupt 10h for pixel-based graphics rendering.
- Detects invalid user inputs and requests corrected input.
- Allows users to move shapes using keyboard arrow keys.
- Supports an exit key to terminate the program.
- Uses real mode assembly programming (MASM).
- Implements sound generation via system speaker.
- Dynamically changes screen colors.
- Draws various geometric shapes using BIOS interrupts.
- Processes user input with validation.
- Provides real-time clock display and updates.
- Supports shape movement with keyboard controls.
- Exits gracefully with a defined exit key.
- MASM 6.11+
- DOSBox (or any x86 emulator supporting real mode)
- Clone this repository:
git clone https://github.com/ppakshad/AssemblyGraphicsProject.git
- Navigate to the project directory:
cd assembly-graphics-sound - Assemble the program using MASM:
masm Answer1.asm; masm Answer2.asm;
- Link the object files:
link Answer1.obj; link Answer2.obj;
- Run the executable:
Answer1.exe # Runs the sound and color effect program Answer2.exe # Runs the graphics program
- Circle:
>circle x y r color - Rectangle:
>rectangle x y m n color - Square:
>square x y m color
| Key | Action |
|---|---|
| ⬆️ | Move Up |
| ⬇️ | Move Down |
| ⬅️ | Move Left |
| ➡️ | Move Right |
ESC |
Exit Program |
- This project does not use any external libraries; only BIOS interrupts.
- Ensure you run it inside DOSBox or an appropriate real-mode emulator.
- Input values must be valid numbers; otherwise, the program will request correction.
- The clock update is real-time and refreshes every second.
Puya Pakshad
📧 Contact: ppakshad@hawk.iit.edu
This project is licensed under the MIT License.