Programming Assignment One_ PA1

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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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] 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])...
View Full Document

This homework help was uploaded on 02/11/2008 for the course CSE 30 taught by Professor Ord during the Winter '08 term at UCSD.

Page1 / 11

Programming Assignment One_ PA1 - Programming Assignment...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online