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

Info iconThis 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). Your job will be to implement several subroutines that will draw the block, move the block, and get the
Background image of page 1

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

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

This note was uploaded on 04/18/2010 for the course ECE 109 taught by Professor Bradley during the Spring '08 term at N.C. State.

Page1 / 5

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online