using assembly language to short the problem
Question Description
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 inputs for the NUM constant, and your sample runs should NOT be the same as the sample runs that are used in this write-up 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 value used in the NUM constant and (2) the values in the quadArray array at the end of the program. For example:
(1) Value in the NUM constant
(2) Values in the quadArray array
Change the value in NUM
for each sample run
For your programming assignment this week you will be writing an x86 assembly program that will calculate a modified version of the Fibonacci sequence, called “Quadonacci”. The idea with Quadonacci is that you have four base cases:
Quad(1) = 1 Quad(2)= 1 Quad(3) = 1
Quad(4) = 1
And for all N >=5,
Quad(N) = Quad(N-1) + Quad(N-2) + Quad(N-3) + Quad(N-4) For example:
Quad(5) = Quad(4) + Quad(3) + Quad(2) + Quad(1)
Quad(5) = 1+1+1+1 = 4
And
Quad(6) = Quad(5) + Quad(4) + Quad(3) + Quad(2)
Quad(6) = 4 + 1 + 1+ 1 = 7
And
Quad(7) = Quad(6) + Quad(5) + Quad(4) + Quad(3)
Quad(7) = 7 + 4 + 1 + 1 = 13 etc.
Here is a table showing the first twelve Quadonacci values:
Q(1) Q(2) Q(3) Q(4) Q(5) Q(6) Q(7) Q(8) Q(9) Q(10) Q(11) Q(12)
111147
13 25 49 94 181 349
You are given the following declarations:
The program should store each individual quad(i) number in the quadArray array in memory. Each individual quad(i) number is stored as a DWORD. Each DWORD in the quadArray is initialized to 0.
Furthermore, the indirect operand approach should always be used to access the quadArray array. You are given the following instruction in the code segment as a starting point:
SAMPLE RUNS:
NUM = 4 (1, 1, 1, 1)
NUM = 6 (1, 1, 1, 1, 4, 7)
NUM = 8 (1, 1, 1, 1, 4, 7, 13, 25)
NUM = 10 (1, 1, 1, 1, 4, 7, 13, 25, 49, 94)
NUM = 12 (1, 1, 1, 1, 4, 7, 13, 25, 49, 94, 181, 349)
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."