COMP 3353 Project #3 solved

$35.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

Goals:
• Defining and accessing Arrays.
• Dealing with Registers and instructions.
• Defining with Loops
• Debugging and running your assembly code.
Requirements:
• Read the design section and write a program.Submit sourcefile (.asm)to Canvas.
• Please start early. ZERO pointforlatesubmission. Afterthe11:59pm onthe due day, you
can’t submit your assignment anymore.
Deliverables:
• Save your source of assembly program as a .asm document.
• Namedocument as a “Firstname_Lastname.asm”.
• Submit your “Firstname_Lastname.asm” through the Canvas system. You do not need to
submit hard copies.
Rebuttal period:
• Youwillbegivenaperiodof3businessdaystoreadandrespond tothecommentsandgrades
of yourhomework orprojectassignment. The TAmay usethis opportunity toaddress any
concernand question youhave. TheTA also may ask foradditional informationfrom you
regarding your homework or project.
Design:
Theobjectiveof this assignment isto createaprogram thatwill reada valuefrom anarray,andthen
placethis valuein another array withthe location shifted by a certainamount. Thearray may beof
any length from 2to 100. Your program must be flexibleenough toproduce the correct solution
regardless of the array size. You must providedocumentation for your program in the form of
comments.
(10Points)CreateaBYTEarray withthelabel ‘input’. ‘input’ should haveeight elements.You should
place values 1,2,3,4,5,6,7,8 in each of the elements of this array.
(10Points)CreateaBYTEarray withthelabel‘output’.This array shouldbethesamelength
as ‘input’.
(10 Points) Create a DWORD variable with the label ‘shift’. ‘shift’ should hold a single value. The
value of ‘shift’ must be less than the length of ‘input’.
(60 Points)Theprogram should then read eachof thevalues from thearray ‘input’ and placethe
values into the ‘output’ array,but the location should be shifted by the amount in the ‘shift’ variable.
If theshiftwould causea valueto beoutside of thebounds of ‘output’, thenthe values should “wrap
around” to the front of ‘output’.
Example:
My ‘input’ array is 5, 0A, 2, 6, 0C, 9, 4
‘shift’ is 3
The proper solution for ‘output’ is 0C, 9, 4, 5, 0A, 2, 6
As youcansee the value ‘5’ is the 1st value in the ‘input’ array.The value‘5’ then shifts 3 tothe 4th
value in the ‘output’ array.Also, note that the value ‘0C’ is the 5th value in the ‘input’ array. Aftera
shift of 3, this would take the value ‘0C’ out of bounds forthe‘output’ array (it is the same length as
the ‘input’ array).The value‘0C’ must “wraparound” to the frontof the ‘output’ array.This also holds
true for ‘9′ and ‘4’.
Remember that your program must be flexible enough to handle an array of any length.
You are recommended to create a loop to inspect the values in your output array, see page 5 in
Debugging_tutorials.pdf for more info.
(5 points) Header:
Please provide a heading at the top of your code containing your name, Auburn UserID, filename,
and how to compile your code. Also describe any help or sources that you used (as per the
syllabus).
e.g. ;Xuechao Li
;Project1.cpp
;Dr. Li helped me debug a syntax error in my “for” loop. ;I used Wikipedia.org to learn
how a genetic algorithm works.
;I spoke with Bob Smith in the class about identifying objects in Assembly Language.
(5 points) Comments
In the coding section,use yourjudgmenttochoosebetweenexplainingeachlineorrelated groupof
lines. The purpose of these commentsistomakethecode readable forother programmersorfor you
in the future.