quiz. quiz two type your name, id and email address in the.asm file. must do or zero score. change...

5
Quiz

Upload: reginald-peters

Post on 04-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Quiz. Quiz Two Type your name, ID and email address in the.asm file. MUST DO or ZERO SCORE. Change q1 to yourStudentID_q1. You were working as a programming

Quiz

Page 2: Quiz. Quiz Two Type your name, ID and email address in the.asm file. MUST DO or ZERO SCORE. Change q1 to yourStudentID_q1. You were working as a programming

Quiz Two

• Type your name, ID and email address in the .asm file. MUST DO or ZERO SCORE.

• Change q1 to yourStudentID_q1.

• You were working as a programming leader in a company. You implemented an assembly program for fun in spare time. Today, you wanted to implement a simple program.

Page 3: Quiz. Quiz Two Type your name, ID and email address in the.asm file. MUST DO or ZERO SCORE. Change q1 to yourStudentID_q1. You were working as a programming

Quiz Two

Draw a bit map and control it to move. There are two bitmaps. The colours of the two bitmaps are not the same. The screen dimension should be at least 60x20 (width x height ). The bitmap can only be shown inside an area bounded by a blue frame.

Key usages:wsad: up, down, left rightSpacebar: switch the bit map‘q’: show student ID and name.

Page 4: Quiz. Quiz Two Type your name, ID and email address in the.asm file. MUST DO or ZERO SCORE. Change q1 to yourStudentID_q1. You were working as a programming

MYBITMAP_WIDTH DWORD 5MYBITMAP_HEIGHT DWORD 3MYBITMAP1 BYTE 1, 1, 1, 1, 1

BYTE 1, 0, 0, 0, 1BYTE 1, 1, 1, 1, 1

MYBITMAP2 BYTE 1, 1, 1, 1, 1BYTE 1, 0, 1, 0, 1BYTE 1, 1, 1, 1, 1

Page 5: Quiz. Quiz Two Type your name, ID and email address in the.asm file. MUST DO or ZERO SCORE. Change q1 to yourStudentID_q1. You were working as a programming

1. [10%] Draw a blue frame (at least 60x20 ).2. [15%] press ‘b’ to show the first bitmap.3. [5%*4] Key usages for wasd correctly. Move the bitmap correctly.4. [10%] press spacebar to switch between bitmaps.5. [10%*4] Boundary check for left, right, up and bottom boundaries correctly while the bitmap is moved. Make sure the bitmap can be moved inside the area bounded by the blue frame.6. [5%] Press ‘q’ to show student ID and name.