prog2 - ECE 109 Spring 2010 Program 2 video.asm Due Friday...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ECE 109 Program 2: video.asm Spring 2010 Due Friday, April 16, 2010 @ 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. This program will draw and move a block on the PennSim video output the black box above the text console. The square block will “move” in response to keyboard input from the user. Hitting the “j” key moves the block to the left, “k” is to the right, “i” is up, and “m” is down. The “q” key means to quit the program. (All other keys must be ignored.) The video output is memory-mapped, which means that each pixel is associated with a memory address. The value stored in that memory location controls the color of the pixel. (We‟ll talk more about memory- mapped devices in Chapter 8.) For this particular device, a value of x7FFF means “white”, and a value of x0000 means “black.” 1 The first part of the program, provided for you, will ask the user to input two values. The first is the size of the block in pixels (between 1 and 8). The second is the number of pixels to move the block when a key is pressed (also between 1 and 8). These values will be stored in memory locations with the labels “Size” and “Skip”, respectively. Other useful memory locations include “Origin” (the memory address of the top left pixel of the block in its current position) and “Color” (the color value used to draw the block).
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern