CDA3101 Assignment 01 Solved

65.00 $

Categories: , Tags: , ,

Description

5/5 - (4 votes)

Instructions

Objective

Write an ARM program that takes two integers as input, x and y, and calculates xy.

Some assumptions

  • x, y are 32-bit integers
  • y>=0
  • 00= 1
  • xy≤ 230

 

Skeleton Code

This txt file provides a skeleton code for you to use in your assignment: pa1.txt

 

Sample Code

You may use parts of this code to take x and y input: input_and_add_two_numbers.s

Testing

You may test your submission using provided text input and output files. Download the test files from the Canvas folder and transfer them to your emulator. Then run the following commands, which match the process used by our autograder:

> gcc -o pa1 pa1.s
> stdbuf -oL ./pa1 <1.in >test-1.out
> diff test-1.out 1.out

If your output matches ours, there should be no output from the diff command. Replace the 1 in 1.in, 1.out, and test-1.out with 2, 3, 4, and 5 to test the remaining sample cases.

Please note these are just a small set of sample test cases. Additional cases will be used to grade your program after submission.

Submission

Submit your ARM assembly language program source code. Name the file “pa1.txt”. Submitting with a different filename or different extension will result in a zero.

You must give us a file with a .txt extension so we can run it through Turnitin.

We will be applying a filter to compare your file to other student submissions to detect plagiarism.  You must do your own work.

 Warning:

  • The use of C/C++ functions except for printf and scanf is strictly prohibited.
  • The use of automated tools (e.g. GCC compiler) to turn C code into ARM is strictly prohibited.

 

 

  • pa1-mdi7u5.zip