Week 14/16 Assessed Coursework MIPS
Deadline Friday Week 16 (19/2/21)
Your task for this exercise is to build drawing board that interacts via the command line, using the Bitmap Display you saw in week 12 and the syscall function built into MIPS. Your program should display a string (essentially a menu) of instructions on the screen using syscall, then accept a user input of an integer in order to determine what action (cls, row, column, logo, exit) to carry out. A second integer input will enable the user to select a colour – there must be at least 2 colours used.
The figure below shows an advanced program that can colour in the background of the screen and draw lines N, S, E, W of variable length.
Figure 1 Drawing on screen in Mars
Marking Scheme
The details of each category can be seen on the following page.
Weighting
Functionality
50%
Code design
20%
Commenting, clarity
20%
Self-marking
10%
Functionality
A+
Fulfils requirements for A. Create a program like LOGO that allows the user to draw a line given a direction (N, S, E, W) and distance and can repeat to draw a picture. Must be able to use cls properly to clear the screen after drawing. Must use syscall’s read char to enter directions.
A
Fulfils requirements for B. Can select cls, row and column options. Can choose colour of screen or position of row/column. Can deal with a bad option by exiting or repeating question. Can repeat option selection.
B
Fulfils requirements for C. Can select cls and row options. Can choose colour of screen or position of row.
C
Successfully prints instructions, inputs the cls option and responds by colouring screen. Allows the user to input screen colour repeatedly (doesn’t need to repeatedly select option, only colour) and responds to that, changing the colour, features at least 3 colour options. Exits the program properly.
D
The menu is printed to the screen using syscall, and the background is coloured in a single colour (not blue or black). The read integer is attempted, and tells the screen to colour. May demonstrate these elements separately.
Code design
Comments/clarity
Self-marking
A
Uses spill when calling procedure(s) if required. Uses procedure(s) effectively.
B
Makes good use of one procedure and labels. Very little repeated code.
C
Uses labels well. Some repeated code.
D
No structure to code. Significant repeated code.
A
Clear structure (and helpful comments) about variable use. Well commented throughout. Spaced and organised for clarity.
B
Good use of comments. Reasonable organisation, can follow program reasonably well. Variable use is sensible.
C
Sparse or sometimes unhelpful comments. Some consistency in use of variables.
D
No comments. Difficult to read code.
A
Clear and concise, functionality is accurate, comments reflect marking criteria
B
List of mostly accurate grades, comments are there but not entirely clear or unnecessarily long, or functionality grade is slightly off
C
Just a list of grades, mostly accurate (or close) but no explanation
D
Just a list of grades, inaccurate