CS 210 PROJECT #1 Due: Noon Tuesday 02/24/09 This project asks students to enhance the functionality of a simple Linux assembly language application that was discussed in class. PROBLEM STATEMENT Modify the source-code for our 'add.s' demo-program so that it will support the addition of negative numbers as well as nonnegative numbers. You may continue to assume that all the numbers that are to be added are entered by the user as command-line arguments, expressed as strings that consist of decimal numeral-characters ('0', '1', ... , '9'), except that now a minus-sign ('-') is allowed to appear as the starting character in such a number-string. Likewise your program's output should display the total as a string of decimal numeral-characters, but having a minus-sign prepended in cases where the total has a negative value. EXAMPLE: $ ./add 12 -20 5 The total is -3 $ SUGGESTION Notice that this project will not require that you make any changes to the main procedure in the 'add.s' program; it needs only some changes within the 'atoi' and the 'itoa' subroutines. WHAT TO SUBMIT Your project-submission has two required parts: (1) a printout of your edited source-file (i.e., 'add.s'); (2) electronic copies of all of your program-files; Use our 'ljpages' utility-program (under 'System Software' on our cs210 website) to produce your printout on a laserprinter in our classroom or in one of the Harney Fifth-Floor CS Labs -- Be sure your printout shows YOUR NAME as the project's programmer -- and turn in your 'printout' to the instructor's mailbox (Mathematics Office: Harney-222). Submit your three program files (i.e., 'add.s', 'add.o', and 'add') electronically, by copying them into your CS210 '/submit' directory, so your instructor can access them for doing testing and grading: $ cp add* /home/submit/cs210//. ________________________________________________________________________ Allan B. Cruse University of San Francisco Spring 2009