COMSC 260Spring 2020
Programming Assignment 11
Worth 10 points (1% of your grade)
DUE: Sunday, 5/24/20 by 11:59 P.M. on Canvas
You need to
start
by downloading the 260 Assignment 11 Project.zip file from
Canvas.
This .zip file contains a project that consists of several files.
Within this project you will be adding to the following three files:
Longest.h (C++ header file)
Main.cpp (C++ source file)
Longest.asm (x86 assembly language source file)
Make sure to continue to use the correct naming convention for your file names. Each of
the files you submit should be firstname_lastname_longest.h,
firstname_lastname_main.cpp,
firstname_lastname_longest.asm,
and
firstname_lastname_runs.pdf (for your sample runs).
COMMENTS (worth 5% of your programming assignment grade): Your
program should have at least ten (10) different detailed comments explaining
the different parts of your program. Each individual comment should be, at a
minimum, a short sentence explaining a particular part of your code. You
should make each comment as detailed as necessary to fully explain your
code. You should also number each of your comments (i.e., comment 1,
comment 2, etc.). NOTE: My comments do NOT count towards the ten
comments!
SAMPLE RUNS (worth 5% of your programming assignment grade): You should
submit screenshots of at least five (5) different sample runs of your program. Each
sample run needs to use different input values for the array in main, and your
sample runs should NOT be the same as the sample runs that are used in this
writeup for the assignment.
You should also number each of your sample runs (i.e., sample run 1, sample run 2,
etc.). All of your sample runs should follow this format – for each individual sample
run, screenshot (1) the input values used in the array in main and (2) the
corresponding output on the console screen which shows what the longest
increasing sequence is. For example:
(1)
(2)
Write an x86 assembly language subroutine (in longest.asm) that receives two input
parameters: the offset of an array and the array’s size. It must return a count of the longest
increasing sequence of integer values. For example, in the following array, the longest
strictly increasing sequence begins at index 3 and has a length of 4 { 14, 17, 26,
42 }:
[ -5, 10, 20, 14, 17, 26, 42, 22, 19, -5 ]
Call your x86 assembly language subroutine (in longest.asm) from a C/C++
program (in main.cpp) that creates the array, passes the arguments, and prints the
value returned by the subroutine.
Note that the main program is the C++ program, which uses the subroutine in the x86 assembly
language program to determine the count of the longest increasing sequence. So
Longest.asm – algorithm to determine the longest increasing sequence
Main.cpp – everything else (declaration of the array, display the count of the longest increasing
sequence, get user inputs (if any), etc.)
Longest.h – specific code is needed here to make it possible for the C++ program (in main.cpp) to be
able to call the LongestIncreasingSequence subroutine (in Longest.asm).
Sample run 1:
Sample run 2: