Skip to content

gabriel1997castro/snake_game_risc-v

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game - assembly risc-v

About

The game was implemented by students of Control and Automation in the University of Brasilia while studying Computers Architecture and Organization. The participants are:

  • Gabriel Castro
  • Lucas Ferreira
  • Rodrigo Araújo
  • Stephanie Cardoso

The professor was Marcelo Antonio Marotta.

The version of rars in this code was modificated by the Dr. Marcus Vinicius Lamar. There are some pieces of code made by Lamar to help his students to do their works.

The game

Processor Registers

There are some constant registers because they are used frequently in the code:

Registradores Uso
s0 ascii value to 'a'
s1 ascii value to 'd'
s2 ascii value to 's'
s3 ascii value to 'w'
s4 Vector with the coordinates of the snake, the first one is the lenght
s5 Coordinate of the fruit
s6 Time of Sleep function
s7 Score and Speed Images
s8 Score
s9 Speed
s11 The last key pressed

Modules and Functions

The game was made using the like an unit an small square of 8 x 8.

  • main - The code to call all the principal functions in the game.
  • square - Function that draw the code unit of 8 x 8.
  • fruit - The function draw an square red fruit.
  • sleep - Receive in s6 a value in ms to pause until the next instruction.

Images of the game

alt text

alt text

alt text

About

Game Snake implemented with assembly risc-v

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published