A classic Snake game implemented in 8086 Assembly Language for Computer Organization and Architecture course project.
- Arrow Key Controls: Smooth directional movement
- Food Collection: Eat '@' symbols to grow and score points
- Score Tracking: Real-time score display on screen
- Dynamic Growth: Snake expands with each food consumed
- Screen Wrapping: Seamless boundary wrapping for continuous play
- Color Graphics: Colored head (yellow 'O') and food (red '@')
- Pure Assembly: 100% hand-written 8086 assembly code
- Open
snake.asmin emu8086 - Press F5 to compile and emulate
- Press F5 again in emulator to run
- Press any key at welcome screen to start playing
| Key | Action |
|---|---|
โ โ โ โ |
Move snake |
ESC |
Exit game |
- Starting Length: 7 segments
- Maximum Length: 15 segments
- Score: +1 point per food item
- Food Symbol:
@(red) - Snake Head:
O(yellow) - Speed: ~4.5 updates per second
Language: 8086 Assembly
Assembler: emu8086 / MASM / TASM
Platform: MS-DOS (Real Mode)
File Format: COM executable
Memory: ~600 bytes total
- INT 10h: Video services (display, cursor)
- INT 16h: Keyboard input (polling)
- INT 1Ah: System timer (delay & randomness)
- INT 21h: DOS services (text output)
snake-game/
โโโ snake.asm # Main source code
โโโ design_diagram.txt # System architecture diagram
โโโ README.md # This file
โโโ PROJECT_REPORT.md # Detailed technical report
This project demonstrates:
- Direct hardware programming via BIOS interrupts
- Memory management in segmented architecture
- Real-time input handling and game loop design
- Low-level algorithm implementation
- Assembly language debugging techniques
Adjust game speed in game_loop:
add dx, 4 ; Change 4 to: 2 (faster) or 6 (slower)Change maximum snake length:
s_size equ 15 ; Increase to 20, 30, etc.For comprehensive technical documentation including:
- System architecture details
- Algorithm complexity analysis
- Implementation challenges and solutions
- Performance metrics
- Test results
- No self-collision detection (snake can pass through itself)
- Food may occasionally spawn on snake body
- No pause functionality
Course: Computer Organization and Architecture
Topic: Game Development in Assembly Language
Objective: Master low-level programming and computer architecture concepts
Educational use only. Created for academic purposes.
โญ Star this project if you found it helpful!
๐ Check out PROJECT_REPORT.md for in-depth technical analysis