prog3_mouse_racer_fall_2019.pdf - Program 3 cheese.asm ECE 109-001 Fall 2019 Due November 7 2019 11:45pm This programming assignment must be completed

prog3_mouse_racer_fall_2019.pdf - Program 3 cheese.asm ECE...

This preview shows page 1 - 3 out of 8 pages.

1 ECE 109-001 Program 3: cheese.asm Fall 2019 Due November 7, 2019 @ 11:45pm This programming assignment must be completed individually. Do not share your code with or receive code from any other student. The only people who may see your code are the instructor and the ECE 109 TAs. Evidence of copying or other unauthorized collaboration will be investigated as a potential academic integrity violation. The minimum penalty for cheating on a programming assignment is a grade of -100 on the assignment. If you are tempted to copy because you're running late, or don’t know what you’re doing, you will be better off missing the assignment and taking a zero. Providing your code to someone is cheating, just as much as copying someone else's work. DO NOT copy code from the Internet , or use programs found online or in textbooks as a "starting point" for your code. Your job is to design and write this program from scratch, on your own. Evidence of using external code from any source will be investigated as a potential academic integrity violation. For this assignment, you will create a program that draws and moves a mouse on PennSim’s graphic display, and direct it through a maze to find the cheese! The program user will be able to direct their mouse through the maze, picking up crumbs. When the mouse reaches the cheese the program will report on the console the number of crumbs eaten and (bonus) the elapsed time to reach the cheese! The learning objectives for this assignment are: Use load and store instructions to manipulate the content of memory. Use I/O routines to allow a user to interact with the program. Subroutines Program Specification The program must start at address x3000. The program will manipulate the location of a box on the screen, which we will call the Mouse. The Mouse has a gray color and a location and is 10x12 pixels in size. When the Mouse moves, the pixels at the previous location return to the background color black. We must erase the old box, move to the new coordinates, and draw the new box. The PennSim graphics display (the “screen”) is 128 by 124 pixels. We use an (x, y) coordinate system to describe a location on the screen. Location (0, 0) is the top left corner. The x coordinate increases as we move to the right, and the y coordinate increases as we move down. In other words, (1, 0) is one pixel to the right of (0, 0), and location (0, 1) is one pixel below (0, 0). Location (127, 123) is the bottom right corner of the screen. The program begins by drawing a maze as shown:
Image of page 1
2 - Mouse 10x12, Gray, Bottom Left Corner (4,103) - Cheese 12x12, Yellow, Top Right Corner (122,4) The maze has the gray mouse in the bottom left, and the desired cheese in the top right as shown. There is a blue frame around the screen 1 pixel thick. There are crossing lines to direct the mouse through the maze. In the path in the maze are a series of crumbs. The location of each crumb is listed in the table.
Image of page 2
Image of page 3

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture