How bear2305/x86-snake_game works
BIOS Snake is a small second-stage real-mode game. A boot-stage loader transfers control to its main loop; the loop polls BIOS keyboard services, dispatches movement, updates the snake’s in-memory coordinates, redraws it through BIOS video services, and waits between moves. The README documents these routine relationships, but no source excerpts were available, so the graph reflects documented behavior only. Food, growth, collision handling, and scoring are not implemented capabilities.
Main entry points: snakegame.asm Game loop
Components 11
Game control
- Game loop
snakegame.asm - Key polling
snakegame.asm - Direction dispatch
snakegame.asm
Movement and state
- Direction routines
snakegame.asm - Body update
snakegame.asm - Snake coordinates
snakegame.asm
Display and timing
- Body rendering
snakegame.asm - Movement delay
snakegame.asm
Other components
- Boot-stage loader
- Player
- BIOS services
Connections 12
- Boot-stage loader → Game loop: jumps to
- Game loop → Key polling: polls
- Player → BIOS services: presses keys
- Key polling → BIOS services: reads keys
- Key polling → Direction dispatch: stores direction
- Direction dispatch → Direction routines: dispatches
- Direction routines → Body update: updates
- Body update → Snake coordinates: shifts coordinates
- Body update → Body rendering: redraws
- Body rendering → BIOS services: draws via
- Game loop → Movement delay: waits via
- Movement delay → BIOS services: requests delay