CS433G Machine Problem 0: Writing Assembly Code for Array Addition, Assignments of Computer Architecture and Organization

Instructions for cs433g students in the spring 2007 semester to write assembly code for adding pair-wise two arrays of arbitrary length using the arm-elf architecture. Provided resources, such as test data files and subroutines, and instructions for using the development environment. No due date is given, but students can receive feedback by submitting their work using the handin script.

Typology: Assignments

Pre 2010

Uploaded on 03/11/2009

koofers-user-x09
koofers-user-x09 🇺🇸

5

(1)

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS433G: Computer System Organization, Spring 2007
Machine Problem 0
Released Feb. 11th
No due date
This MP is designed to test your basic assembly skills. It is also a test of the new
development environment. MP0 will not be officially graded, but we will send feedback
to students who submit their work using handin script.
Your task is to write the assembly code to add pair-wise two arrays of arbitrary length.
You can assume that arrays have the same length. Assembly must be written for arm-elf
architecture.
Provided resources:
mp0.test – data file with arrays. The file is in ~/mp0/ directory.
o a1 – the first array of integers
o a2 – the second array of integers
o n – the number of entries in the array
add.o – the object file for addition subroutine. Check debug-mp0 for more
information.
o add – the subroutine for integer addition. Takes two integers as
parameters for addition and returns result.
store.o – object file for storage subroutine. Check debug-mp0 for more
information.
o store – subroutine for result storage. Takes two integers as parameters.
First integer corresponds to the array index. Second integer corresponds to
the value to be stored.
o a – the reserved global label, do not use in your code
debug-mp0 – debug script for MP0. You can modify it to suit your needs. The
script is in your $PATH.
handin – the hand-in script. Use it to hand in your mp0.s assembly file. The script
is in your $PATH.
You can start by renaming mp0.test to mp0.s. For full ‘credit’ you should make sure that
your code works with any arbitrary arrays.
More information development environment can be found at:
http://www.cs.uiuc.edu/class/sp07/cs433g/ecos.html
We would encourage you to send us feedback about the issues you encounter while using
our system.

Partial preview of the text

Download CS433G Machine Problem 0: Writing Assembly Code for Array Addition and more Assignments Computer Architecture and Organization in PDF only on Docsity!

CS433G: Computer System Organization, Spring 2007

Machine Problem 0

Released Feb. 11

th

No due date

This MP is designed to test your basic assembly skills. It is also a test of the new development environment. MP0 will not be officially graded, but we will send feedback to students who submit their work using handin script.

Your task is to write the assembly code to add pair-wise two arrays of arbitrary length. You can assume that arrays have the same length. Assembly must be written for arm-elf architecture.

Provided resources:

  • mp0.test – data file with arrays. The file is in ~/mp0/ directory. o a1 – the first array of integers o a2 – the second array of integers o n – the number of entries in the array
  • add.o – the object file for addition subroutine. Check debug-mp0 for more information. o add – the subroutine for integer addition. Takes two integers as parameters for addition and returns result.
  • store.o – object file for storage subroutine. Check debug-mp0 for more information. o store – subroutine for result storage. Takes two integers as parameters. First integer corresponds to the array index. Second integer corresponds to the value to be stored. o a – the reserved global label, do not use in your code
  • debug-mp0 – debug script for MP0. You can modify it to suit your needs. The script is in your $PATH.
  • handin – the hand-in script. Use it to hand in your mp0.s assembly file. The script is in your $PATH.

You can start by renaming mp0.test to mp0.s. For full ‘credit’ you should make sure that your code works with any arbitrary arrays.

More information development environment can be found at: http://www.cs.uiuc.edu/class/sp07/cs433g/ecos.html

We would encourage you to send us feedback about the issues you encounter while using our system.