COMP 3350 Project #3 Registers and instructions solved

$35.00

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

Description

5/5 - (1 vote)

Goals:
• Defining and accessingArrays.
• Dealing with Registers and instructions.
• Defining with Loops
• Debugging and running your assembly code.
Requirements:
• Read the design section and write a program. Submit source file (.asm) to Canvas.
• Show your work to get full credit. ZERO point without steps for a result.
• Please start early. ZERO point forlate submission.Afterthe 11:59pm on the due day, you
can’t submit your assignment anymore.
• Check deliverables section below.
Deliverables:
• Save your source of assembly program as a .asm document.
• Name document as a “Firstname_Lastname.asm”.
• Submit your“Firstname_Lastname.asm” through theCanvas system.You donot need to
submit hard copies.
Rebuttal period:
• Youwillbegivenaperiodof2businessdaystoreadandrespondtothecommentsandgrades
of your homework or project assignment. The TA may use this opportunity to address any
concern and question you have. The TAalso may ask for additional information from you
regarding your homework or project.
Design:
The objective ofthisassignment is to create a program that willread a value from an array,and then
place this value in another array with the location shifted by a certain amount. The array may be of
any length. Your program must be flexible enough to produce the correct solution regardless of
the array size.You have to provide documentation for your program in the form of comments.
(10Points) Create a BYTE array with the label ‘input’. ‘input’ should have eight elements. You should
place values 1,2,3,4,5,6,7,8 in each of the elements of this array.
(10 Points) Create a BYTE array with the label ‘output’.This array should bethe same length 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’.
( 50Points) The program should then read each of the values from the array ‘input’ and place the
values into the ‘output’ array but the location should be shifted by the amount in the ‘shift’ variable.
If the shift would cause a value to be outside of the bounds of ‘output’, then the 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 you can see the value ‘5’ is the 1st value in the ‘input’ array. The value ‘5’ then shifts 3 to the 4th
value in the ‘output’ array. Also, note that the value ‘0C’ is the 3rd value in the ‘input’ array. After a
shift of 3, this would take the value ‘0C’ out of bounds for the ‘output’ array (it is the same length as
the ‘input’ array). The value ‘0C’ must “wrap around” to the front of 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.
The array length “6” in the examle above does not mean that TA will test it with an array of length
6. An array of length 2 or 100 or any number in between may be tested.
(20 points) Documentation:
In the comments, give a brief description of the program, author name and last modified date in the
form of comments. The purpose of these comments is to make the code readable for other
programmers or for you in the future.