MARIE - MinMax swap - A study about assembly

  • Soft Deadline: 19.01.2024, 23:59
  • Hard Deadline: 19.01.2024, 23:59
  • Publish date: 07.01.2024
  • Last update: 08.01.2024, 12:00
  • History:
    • 07.01.2024, 22:00
      • Publish the assignment - detailed

Objectives

This is a different kind of assignment for students which are interested in using a CPU rather than building its architecture. The main objective of this project is to get familiar with the assembly language using a dedicated ISA, by accommodating the given examples and improving their functionality. You will:

  • Develop a new program based on a given example;
  • Work with low-level programming with limited hardware resources;

Description and requirements

Implement an assembly program which reads N elements from the keyboard and swaps the minimum value with the maximum value. The program shall have and use at least one subroutine - you can have the swap function here. The implementation shall be done in 2 steps:

  1. Build and run a C program which implements the desired functionality - better if you use pointers instead of fixed uni-dimensional arrays
  2. Based on the C implementation, build the MARIE assembly program.

Beside the C program and the MAR program, you must upload a README file which contains a short comparison between the two solutions and a short description of the algorithm you've chosen.

Notes

There are several examples provided to figure out how to execute diverse operations with the MARIE CPU. You can use them to understand the procedures. Assembly programming implies managing the hardware recourses properly; the closest higher-level programming that you already know is C programming with pointer use and dynamic allocation.

Additional details

  • In the project recourses you can find example for array manipulation and swap functions; put them into the simulation for a better understanding
  • The project archive that you shall upload (zip compression type) must include in it's root only:
    • the MARIE .mas or .txt file which contain the assembly code
    • a README file, which shall contain at least:
      • your name and group;
      • general presentation of your solution;
      • description of any complex coding parts that you consider additional explanation is needed and they are too long to be an inline comment;

This assignment is an individual assignment; using any code from external sources can be considered plagiarism and can lead to voiding the accumulated points!

Grading

  • +10.0 pts.: Correct implementation with passing stimuli from the keyboard
    • +2.0 pts.: C implementation
    • +8.0 pts.: Assembly implementation
    • +1.0 pts.: Bonus for C implementation if pointers are used for the array.
  • -1.0 pts.: the absence of the README file;
  • -1.0 pts.: bad coding style (chaotic indentation, irregular spacing, strange naming for variables, etc.);
  • -0.2 pts.: other generic implementation issues (/issue);
  • -0.1 pts.: useless code comments.

Even if you do not finish the assignment, you can receive up to 25% of the grade if you properly explain your idea in the README file. Your code must pass the compilation and run.

Recourses

Appendix

ac-is/teme-ie/course_project_assembly.txt · Last modified: 2024/01/08 13:04 by ionut.pascal
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0