Starting from:

$35

CSE 379 Lab #6

CSE 379
Lab #6

Objective
In this lab, you will learn how to use the timers on the ARM board. In addition, the UART (along with
PuTTy) will be used as you have done in the past few labs.
Description
Write an ARM assembly language program which implements a simple version of the Snake Game.
When the program starts, a game board, shown below appears. The board is 40 columns wide by 15 rows
high (not including the boarder). An asterisk (*) should be present in the center of the board. The initial
board is shown below.

Score: 000
----------------------------------------
| }
| }
| }
| }
| }
| }
| }
| }
| * }
| }
| }
| }
| }
| }
| }
----------------------------------------
When the user hits the i, j, k, or m, the game starts and the asterisk starts to move. The direction is
controlled by the letters i, j, k, or m, which represent the directions up, left, right, and down respectively.
Every ¼ second, the asterisk should move one position on the board. As the asterisk moves, it should
leave a path of asterisks, as shown at the top of the next page.
Score: 000
----------------------------------------
| }
| }
| }
| }
| ***** }
| * * }
| * ** }
| * }
| * }
| }
| }
| }
| }
| }
| }
----------------------------------------
If the asterisk hits a wall or crosses its own path, the game ends. As the game is played the score should
be displayed which shows the number of asterisks that have been placed on the board. In other words, the
score corresponds to the length of the path. When the game ends, the user should be notified that the
game has ended.
Startup Code
Startup code for lab #6 will be provided on the course website which has interrupt handlers for the
UART0Handler and Timer0Handler . Use the code provided, NOT the startup assembly file that you’ve
been including in your project when you created a project in your first five labs.
Partners
You will work with a partner in this lab. Your partner MUST be the same partner you worked with on lab
#5.
Documentation
Your program must be clearly commented, and documentation must also be provided. The
documentation must follow the guidelines covered in lecture (found on the Lectures webpage of the
course website). Your comments should describe what each section of your program does. To receive
full credit on your documentation, you must submit a draft of your flowchart before you start working on
the lab in your regularly scheduled lab time on Wednesday, March 4 or Thursday, March 5.
Submissions
Your source code (C and assembly) must be submitted online using the submit command (submit_cse379
Your source code (C and assembly) and your documentation (as a PDF) must be submitted online using
the submit command (submit_cse379 lab_6_wrapper.c lab_6.s lab_6_library.s lab_6_documentation.pdf)
on timberlake.cse.buffalo.edu before 11:59 PM on Tuesday, March 25, 2020. A hardcopy of your
documentation is due at the beginning of class on Wednesday, March 24, 2020. Your documentation
will be used along with the code you submitted when you perform the debug exercise for Lab #6. 

More products