Process and MARIE Programming
FIT1047 Introduction to computer systems and security -
Assignment 2 – Processes and MARIE Programming
This assignment has two parts. Make sure you read the instructions carefully.
Part 1: Processes (10 marks)
For this task, write a brief report about the processes that are running on your computer. You can use one of the following tools (depending on your operating system):
● On Windows, use the Task Manager
● On macOS, use the Activity Monitor
● On Linux, use a command line tool like htop, or the ps command
Answer the following questions:
1. Briefly describe the columns displayed by the tool you use that relate to a) memory usage and b) CPU usage of a process. What can you say about the overall memory usage of all processes, compared to the RAM installed in your computer? (4 marks)
2. Pick a process you perhaps don’t know much about, or which you did not expect to find running on your computer. Try to find out and describe briefly what it does. (4 marks)
3. Briefly explain why it is important that the operating system manages the files stored on your computer (rather than each application having to manage those files itself). (2 marks)
It may be useful to include a screenshot of your processes in the report. The word limit for this part (all three questions together) is 600 words (about 1 page, not including images).
Part 2: MARIE Programming (40 marks)
In this task you will develop a MARIE program that implements a clone of the popular Wordle game. We will break this task down into small steps for you.
Most of the tasks require you to write code and test cases. On Moodle, you will find a template for the code. It contains some subroutines that you should use, as well as a number of predefined test cases. Your submission must be based on this template, i.e., you must add implementations of your own subroutines into this template.
The code must contain comments, and you submit the .mas file together with the rest of your assignment.
In-class interviews: You will be required to demonstrate your code to your tutor after the submission deadline. Failure to demonstrate will lead to zero marks being awarded for the entire assignment.
Code similarity: We use tools to check for collaboration and copying between students. If you copy parts of your code from other students, or you let them copy parts of your code, you will receive 0 marks for the entire assignment.
Rubric: Each task below is worth a certain number of marks. A correctly working version of each task that is well documented and contains the required test cases will receive full marks. Missing/incomplete documentation will result in a loss of up to ¼ of the task’s marks. Missing or undocumented test cases result in the loss of 1 mark per test case.
Task 2.1: Your name as a MARIE string (4 marks)
This is the first task you need to submit. It’s just a little warm-up so you can get familiar with strings.
Similar to the FIT1047 example above, encode your name using ASCII characters. You should encode at least 10 characters – if your name is longer, you can shorten it if you want, if it's shorter, you need to add some characters (such as !?! or ..., or invent a middle name).
In the assignment template, you will find a label Name, which is initialised to the value HEX 0. You need to change this part of the code so that after assembling, the MARIE memory contains the string with your name starting at label Name.
Task 2.2: Convert to upper case (8 marks)
In this task, you need to write a subroutine that takes the user’s input and converts it into upper case. The subroutine is called ToUpper. It expects one argument to be passed in using the label ToUpperWord, which is the starting address of the string to be converted.
The subroutine loops through the input string one character at a time. For each character, if it is a lowercase character, it replaces it with the corresponding uppercase character. Once the end of the string is reached, the subroutine returns.
Test cases: The template already contains one test case. Add another 3 test cases and document them. For each case, document which part of the subroutine it is supposed to test, as well as the expected outcome.