Programming Assignment One_ PA1

SPARC Architecture, Assembly Language Programming, and C (2nd Edition)

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Assignment One: PA1 Programming Assignment One: PA1 Due Wednesday night, January 30 @ 11:59pm ) The purpose of this assignment is to build your knowledge of using SPARC assembly language especially branching and looping logic, calling assembly routines from within a C program, calling C functions from within assembly routines, passing parameters and returning values, using command line arguments, and learning some useful Standard C Library routines. You will be writing a program that takes 4 inputs from the command line. % pa1 width height border_ch diamond_ch These inputs are parameters for a diamond pattern which will be printed to stdout. 'width' specifies the width of the rectangle border in which the diamond will be embedded. 'height' specifies the height of the diamond. 'border_ch' and 'diamond_ch' are the ASCII values for the characters which will make up the border and diamond. Appropriate error checking and reporting is required. Note that in most cases we will be displaying all related errors and not stopping after we encounter the first error. Example runs are given below. Grading Breakdown README (more info on details of README below): 10 points Compiling (using our Makefile; no warnings): 10 points Style (all requirements met, see details below): 30 points Correctness: 50 points -10 points (minus 10 points) for each module written in the wrong language (C vs. Assembly and vice versa) Optimization: 5 points - Extra Credit Must correctly pass at least 70% of test cases to be eligible for Extra Credit Filling delay slots with useful instructions (eliminating nops) At least 80% of nops need to be filled to get full "filling delay slots" Extra Credit Sometimes there are many ways to perform a task, some ways are more optimal (and worth more Extra Credit points) than others NOTE: If what you turn in does not compile, you will receive 0 points for this assignment. The files you turn in must compile with the supplied template Makefile in order for your programming assignment to be graded. Copy the new template Makefile for PA1 from ~/../public/Makefile-PA1 to your pa1 directory and name it Makefile . Let us start off by looking at some example output: Output Format ieng9.ucsd.edu% pa1 11 9 42 57 *********** *****9***** ****999**** ***99999*** **9999999** *999999999* **9999999** ***99999*** ****999**** *****9***** *********** http://ieng9.ucsd.edu/~cs30x/pa1.html (1 of 11) [2/8/2008 12:35:10 PM]
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Programming Assignment One: PA1 ieng9.ucsd.edu% pa1 19 15 35 45 ################### #########-######### ########---######## #######-----####### ######-------###### #####---------##### ####-----------#### ###-------------### ##---------------## ###-------------### ####-----------#### #####---------##### ######-------###### #######-----####### ########---######## #########-######### ################### ieng9.ucsd.edu% pa1 Usage: pa1 width height border_ch diamond_ch width (must be odd within the range of [3 - 21]) height (must be odd within the range of [1 - 19]) (must be less than width) border_ch (must be an ASCII value within the range [33 - 126]) (must be different than diamond_ch) diamond_ch (must be an ASCII value within the range [33 - 126]) (must be different than border_ch) ieng9.ucsd.edu% pa1 10 9 50 52 width(10) must be an odd number.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern