CS320 Assignment #4
Date assigned: 3/18/05
Date due: 4/8/05
Points: 50

Write an assembly language program that performs addition, subtraction, and multiplication for very large positive integers (up to 40 digits). Due to the limitations of our machine, this cannot be done using the registers and routines available to us. Your program is to work with the following menu:


                LARGE NUMBER OPERATIONS
               
                1. ADDITION
                2. SUBTRACTION
                3. MULTIPLICATION
                4. FACTORIAL TABLE
Options 1, 2, 3, and 4 are to work as follows:

  1. Clear the display screen.
  2. Ask the user to enter the necessary input.
  3. Perform the operation.
  4. Clear the display screen.
  5. Output the results.
Here is the sample interaction and results for the addition operation:


Screen #1:
                ADDITION OPERATION
Enter X: 32345
Enter Y: 167894

Screen #2:

                ADDITION RESULTS
                                   32345 = X
                                  167894 = Y
                                  200239 = X + Y

Note1: For subtraction, assume the minuend is always larger than the subtrahend. Further, multiplication is self-explanitory

So, what about the FACTORIAL TABLE? This feature is to generate and print the factorial from 1 to N where N can be as large as 25. A sample interaction goes like this:


Screen #1       

                FACTORIAL OPERATION

Enter Upper Limit: 8

Screen #2

                FACTORIAL TABLE

                                       1 = 1!
                                       2 = 2!
                                       6 = 3!
                                      24 = 4!
                                     120 = 5!
                                     720 = 6!
                                    5040 = 7!
                                   40320 = 8!

Extra Credit (10 pts)

Here's the deal. We will all go into the lab and type in an upper limit of 25. The person whose program finishes first will receive 10 points of extra credit. Only one person will receive the 10 extra credit points.


Note2: For the FACTORIAL TABLE portion of this assignment, you may not preload any data structures with any values. All values need to be calculated on the fly except for the initial value of N inputted by the user.