COMP1212 处理器

Coursework 3
Computer Processors (COMP1212)
You should follow the instructions below on how to prepare your submission. Late
submissions are not accepted without mitigating circumstances. Each day, or part of a
day, will incur a 5% penalty. Feedback on late submissions may not be provided within 3
weeks of submission.
Submission You must submit your work via Gradescope.
Deadline 1700 GMT 26/03/2021.
Weighting This piece of summative coursework is worth 25% of the module grade.

  1. Write a program in HACK assembly, without using symbols, that computes the
    bitwise exclusive or (XOR) of the values stored in RAM[1] and the value of the
    memory location with address stored in RAM[2]. The result of the computation
    should be stored in RAM[0].
    You can think of RAM[2] as being a pointer to where the second operand of the XOR
    is stored.
    The solution should be submitted in a file called “q1.asm”.
  2. Write a program in HACK assembly, without using symbols, that sums the consecutive
    set of memory locations starting from the memory address stored in RAM[1] up
    to the memory address RAM[1] + RAM[2]. The result of the computation should be
    stored in RAM[0]. Note, you need not consider the case of an overflow.
    You can think of RAM[1] as being a pointer to an array of numbers, and RAM[2] as
    being the length of the array you are summing over.
    The solution should be submitted in a file called “q2.asm”.
    Question 1 is worth 10 marks, and Question 2 is worth 15 marks.

你可能感兴趣的:(后端)