1. Homepage
  2. Programming
  3. FIT1047 Introduction to computer systems, networks and security Assignment 2 - Processes and MARIE Programming

FIT1047 Introduction to computer systems, networks and security Assignment 2 - Processes and MARIE Programming

Engage in a Conversation
MonashFIT1047Introduction to computer systemsnetworks and securityProcesses and MARIE ProgrammingAssembly

FIT1047 Introduction to computer systems, networks and security - S1 2024
CourseNana.COM

Assignment 2 – Processes and MARIE Programming CourseNana.COM


INSTRUCTIONS

CourseNana.COM

This assignment has five parts. Make sure you read the instructions carefully. CourseNana.COM

Part 1 and 2 are required to achieve a Pass or higher mark for the assignment.
Part 3 is a reflection activity. You do not receive marks for this task, but it is a hurdle requirement (i.e., you will not get a mark for this assignment if you don’t submit it).
Part 4 and 5 are MARIE programming tasks, which you need to complete in order to get an overall mark of 60 or higher in this assignment.
Failure to attend the interview (Part 5) will result in 0 points for the entire Part 4 and 5, regardless of your submission in Moodle. CourseNana.COM

How are marks and grades determined? CourseNana.COM

Grade level CourseNana.COM

Requirements CourseNana.COM

exact mark CourseNana.COM

  • ●  submission includes responses addressing reflective questions CourseNana.COM

  • ●  achieves between 60% and 79% in part 1 and 2 CourseNana.COM

between 50 and 59 depending on your score in parts 1 and 2 CourseNana.COM

  • ●  submission includes responses addressing reflective questions CourseNana.COM

  • ●  achieves between 80% and 100% in parts 1 and 2 CourseNana.COM

  • ●  achieves between 10% and 49% in parts 4 and 5 CourseNana.COM

between 60 and 69 depending on exact scores in all parts CourseNana.COM

Distinction CourseNana.COM

between 70 and 79 depending on exact score in part 4 and 5 CourseNana.COM

High Distinction CourseNana.COM

between 80 and 100 depending on exact score in part 4 and 5 CourseNana.COM

Part 1: Processes (10 marks) CourseNana.COM

For this task, write a brief report about processes that you observe running on your computer. You can use one of the following tools (depending on your operating system): CourseNana.COM

On Windows, use the Task Manager
On macOS, use the Activity Monitor
On Linux, use a command line tool like htop, top, or the ps command
CourseNana.COM

Answer the following questions: CourseNana.COM

  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? Include graphs or charts for the comparison. (5 marks) CourseNana.COM

  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.
    (5 marks)
    CourseNana.COM

Include a screenshot of your processes in the report along with CPU/memory usage graphs and/or charts. The screenshot should show between 5 and 10 processes.
The word limit for this part (both questions together) is 500 words (about 1 page, not including images and tables).
CourseNana.COM

Submit your report for this part (Part 1) as a PDF file (independent of the other parts) in Moodle. CourseNana.COM

Part 2: MARIE Disassembly (20 marks) CourseNana.COM

Follow the link on Moodle to access your personalised MARIE memory screenshot for this task.
Important: Your memory screenshot is different from the one other students are working on. Only download the file while you are correctly logged into Moodle with your own student account. CourseNana.COM

Task 2.1: Disassemble the memory (10 marks) CourseNana.COM

Based on the memory contents, recreate the MARIE program that corresponds to your personalised memory screenshot. This is called “disassembling” the machine code, since it is the opposite operation of “assembling” the MARIE code into the binary memory contents. CourseNana.COM

For each memory cell, decode the instruction and (if applicable) the address that the memory cell is encoding. You can make the following assumptions: CourseNana.COM

  • -  There is exactly one Halt instruction in the code CourseNana.COM

  • -  Every memory location after the Halt instruction contains data CourseNana.COM

  • -  Any memory location that contains the value 0 is data (even before the Halt CourseNana.COM

    instruction) CourseNana.COM

    Here is an example of a memory screenshot and the corresponding decoded MARIE program: CourseNana.COM

    Disassembled program: CourseNana.COM

    Input Add 005 Output Jump 000 Halt
    DEC 10
    CourseNana.COM

    Note: You need to decode the actual instructions. E.g. for the first memory location, HEX 5000 would not be a valid answer. The contents of all memory that follows the Halt instruction is considered to be data. Therefore, DEC 10 is the correct decoding of location 5 (instead of JnS 00A), and HEX 00A would also be correct. You don’t need to list all the locations containing zeros starting from address 006 (these will be filled with zeros by the assembler anyway). CourseNana.COM

    Tip: You can verify that your disassembled code is correct by entering it into the MARIE simulator, assembling it and comparing the memory contents to the screenshot you started from. CourseNana.COM

    Task 2.2: Add labels (5 marks) CourseNana.COM

    Now update the program you decoded in Task 2.1. Removing all hard-coded memory addresses by adding labels to replace all memory locations that are used as addresses in CourseNana.COM

the program instructions. Labels should have meaningful names in the context of what the program does (i.e., not just A, B, C).
For the example above, this could result in the following program:
CourseNana.COM

MainLoop, Input Add Ten
Output
Jump MainLoop Halt
CourseNana.COM

Ten, DEC 10 CourseNana.COM

Task 2.3: Add comments (5 marks) CourseNana.COM

Comment the code based on your understanding of what it does. Comments should describe the function of the different parts. E.g., if you identify a subroutine in the code, add a comment at the start of the subroutine that describes what it does, and whether it takes any arguments. CourseNana.COM

For this part (Part 2), you need to submit one .mas file containing your final code. Do not submit one .mas file per each subtask! Your .mas file must be added to a .zip archive, together with the (separate) .mas file for Part 4. CourseNana.COM

Part 3: Reflections (hurdle requirement, no marks) CourseNana.COM

Copy/paste your reflections for weeks 5 and 6 from the Ed Lessons into a PDF document. This part is a hurdle requirement, i.e., we won’t mark the other parts if you do not submit this part. The reflections can be just a few sentences per week, but need to genuinely relate to your learnings for the week. CourseNana.COM

Submit your reflection for this part (Part 3) as a PDF file (independent of the other parts) in Moodle. CourseNana.COM

Part 4: MARIE Programming (22 marks) CourseNana.COM

In this task you will develop a MARIE application that draws numbers on the screen. We will break it down into steps for you. CourseNana.COM

Note: This part is for students who want to achieve a Distinction or High Distinction mark in this assignment. In order to receive any marks for this part, you must reach at least a Credit grade for Parts 1, 2 and 3. CourseNana.COM

Each task requires you to write code and documentation. On Moodle, you will find a template for the code. Your submission must be based on this template, i.e., you must add implementations of your own subroutines into the template. The template already contains the main program that calls the subroutines. CourseNana.COM

Your code must contain readable comments and meaningful labels for your tutor / marker to understand the logic flow of your program (e.g. the purpose of a subroutine, jump / skipcond statement etc.). CourseNana.COM

Rubric: The marking rubric on Moodle provides details for the marking. A correctly working MARIE program that covers all tasks and is well documented will receive full marks. Missing/incomplete documentation will result in a loss of up to 1⁄4 of the task’s marks. CourseNana.COM

Introduction: Bit-mapped displays CourseNana.COM

So far, the only output capability we have seen in the MARIE system is using the Output instruction, which will print a single 16-bit value. Many computers of course are capable of displaying arbitrary graphics, often in high resolution and great colour depth.
In the lectures on input/output systems, we have seen that one way to implement this is to
map a certain location of the memory to an output device. I.e., writing to that memory location (using e.g. a Store instruction) causes the output to happen. CourseNana.COM

In the simplest form of graphics hardware, we can dedicate part of the RAM to be graphics memory. Each memory cell corresponds to a pixel on screen, and the value in the memory cell encodes the colour of the pixel. That way, we can create arbitrary graphics by simply CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

writing values into the memory. CourseNana.COM

The MARIE simulator has a feature called Display, which you access from the list of tabs that also shows the output log, RTL log etc: CourseNana.COM

FACULTY OF INFORMATION TECHNOLOGY CourseNana.COM

The display shows the memory from address F00 to address FFF as a 16x16 pixel screen. The value in the memory locations represents the colour of the pixels. We will only use the colours black, represented as 0, and white, represented as FFFF. When you start the MARIE simulator and assemble your code, the memory starting from location F00 is (usually) filled with zeroes, which means that the display is black. Let’s now change the contents of the memory using some Store instructions: CourseNana.COM

Load White Store 0F80 Store 0F81 Store 0F82 Store 0F83 Halt CourseNana.COM

White, HEX FFFF CourseNana.COM

After running this program, the display will look like this: CourseNana.COM

You can see that the first four pixels in the 9th row have now turned white. CourseNana.COM

Task 4.1 Clearing the display (4 points) CourseNana.COM

Write a subroutine SubClearDisplay that turns all pixels in the graphics memory white. Remember that the graphics memory ranges from address 0F00 to address 0FFF, and that white pixels are represented by the value FFFF. Document your subroutine with comments. CourseNana.COM

Task 4.2 Painting a number (10 points) CourseNana.COM

The template for this task contains data for bitmaps of the digits 0-9, stored at the label Font. Each digit consists of 3x5 pixels of data. The first 3 words are the first row of pixels, the next 3 words are the second row, and so on. For example, the digit 2 is represented as CourseNana.COM

0 0 FFFF FFFF FFFF 0 FFFF 0 FFFF 0 FFFF FFFF 000 CourseNana.COM

You can see the pattern here, the zeros “paint” the shape of the character 2 in black, with the background in white (FFFF). CourseNana.COM

Your task is to write a subroutine called SubPaintDigit that paints a digit into the graphics memory. The start of the subroutine needs to look like this: CourseNana.COM

PaintDigitCharacter, HEX 0 PaintDigitDisplay, HEX 0 SubPaintDigit, HEX 0 CourseNana.COM

In the PaintDigitCharacter argument, we pass the address of the first pixel data in the font for the digit we want to paint. In the PaintDigitDisplay argument, we pass the address of the top-left corner where we want to start painting in the graphics memory. For example, to paint the digit 0, starting from the second pixel in the second row, we could use the following code: CourseNana.COM

Load FontAddr
Store PaintDigitCharacter Load Display22
Store PaintDigitDisplay JnS SubPaintDigit
Halt
Display22, HEX 0F11
CourseNana.COM

Note that the address 0F11 (label Display22) lies exactly 17 words after the start of the graphics memory. This means we’re skipping the first row (16 words) and the first pixel in the second row (1 word).
Here we simply use FontAddr to refer to the first character (for the digit 0). For the other characters, we would have to add a corresponding offset into the font memory.
CourseNana.COM

In order to paint a digit in your subroutine, you can follow this “recipe”: CourseNana.COM

  • -  Your subroutine should contain two nested loops. CourseNana.COM

  • -  Each digit contains 15 pixels, so you need to loop through those 15 pixels, load each CourseNana.COM

    one from the font definition and store it into the graphics memory. This is the outer CourseNana.COM

    loop of your subroutine. CourseNana.COM

  • -  After each set of 3 pixels, you need to start in the next row of the graphics display. CourseNana.COM

    This means that if you were currently writing into graphics memory at address X, you now need to continue writing at address X plus the width of the display minus the width of a character. This is the inner loop of your subroutine. CourseNana.COM

  • -  Once you have “copied” all 15 pixels from the font definition into the graphics memory, you can exit the subroutine. CourseNana.COM

Your subroutine needs to contain sufficient comments to enable someone else (like the person marking your assignment) to understand the purpose of each line of your code. CourseNana.COM

Task 4.3 Counting down (8 points) CourseNana.COM

Your final task is to implement a subroutine SubCountDown that clears the screen and then counts down from 9 to 0, drawing those digits on the bit-mapped display using the subroutines developed in the previous tasks. CourseNana.COM

In order to get full marks, your code needs to use a loop that decrements a counter and calls SubPaintDigit based on the value of the counter, rather than a sequence of instructions that calls SubPaintDigit with each digit’s address. Use additional subroutines to structure your code nicely. CourseNana.COM

You will notice that it would be nice for the countdown to wait for a fraction of a second between digits. Think of a way you can achieve this, so that the countdown takes (more or less) exactly 10 seconds on your computer to execute. Document how you achieved this in the code comments. CourseNana.COM

For this part (Part 4), you need to submit one .mas file, based on the template, containing the code for all subroutines. Do not submit one .mas file per each subtask! Your .mas file must be added to the .zip archive that also contains your (separate) .mas file for Part 2. CourseNana.COM

Part 5: In-class interview (8 points) CourseNana.COM

You need to demonstrate the code you submitted for Task 4.1–4.3 to your tutor in an in-class in-person interview (to be conducted during your official allocated Applied session in Week 8) after the submission deadline. Failure to explain how your code works will result in 0 points for the individual tasks that you cannot demonstrate. CourseNana.COM

In addition, you will be asked to modify the code you submitted in certain ways and explain how the MARIE concepts work that you were required to use for the individual tasks. These additional questions add up to 8 points for this task (Task 4.4). CourseNana.COM

Failure to attend the interview will result in 0 points for the entire Part 4 and 5, regardless of your submission in Moodle.  CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Monash代写,FIT1047代写,Introduction to computer systems代写,networks and security代写,Processes and MARIE Programming代写,Assembly代写,Monash代编,FIT1047代编,Introduction to computer systems代编,networks and security代编,Processes and MARIE Programming代编,Assembly代编,Monash代考,FIT1047代考,Introduction to computer systems代考,networks and security代考,Processes and MARIE Programming代考,Assembly代考,Monashhelp,FIT1047help,Introduction to computer systemshelp,networks and securityhelp,Processes and MARIE Programminghelp,Assemblyhelp,Monash作业代写,FIT1047作业代写,Introduction to computer systems作业代写,networks and security作业代写,Processes and MARIE Programming作业代写,Assembly作业代写,Monash编程代写,FIT1047编程代写,Introduction to computer systems编程代写,networks and security编程代写,Processes and MARIE Programming编程代写,Assembly编程代写,Monashprogramming help,FIT1047programming help,Introduction to computer systemsprogramming help,networks and securityprogramming help,Processes and MARIE Programmingprogramming help,Assemblyprogramming help,Monashassignment help,FIT1047assignment help,Introduction to computer systemsassignment help,networks and securityassignment help,Processes and MARIE Programmingassignment help,Assemblyassignment help,Monashsolution,FIT1047solution,Introduction to computer systemssolution,networks and securitysolution,Processes and MARIE Programmingsolution,Assemblysolution,