Project #2 Arrays and Loops Solution

$35.00 $29.00

can. You might face some issues and need the GTA help. Assignment Goal: Get you familiar with : Defining and accessing Arrays. Dealing with Registers and instructions. Dealing with Loops. Debugging and running your assembly code. Deliverables: Submit the source file (.asm) to Canvas before the due date. This should be the only file you…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

can. You might face some issues and need the GTA help.

Assignment Goal:

Get you familiar with :

  1. Defining and accessing Arrays.

  1. Dealing with Registers and instructions.

  1. Dealing with Loops.

  1. Debugging and running your assembly code.

Deliverables:

Submit the source file (.asm) to Canvas before the due date. This should be the only file you should submit to Canvas.

The file should be named {USERNAME}_P{NUMBER}.asm

USERNAME is your auburn email without “@auburn.edu”

E.g. abc0003_P2.asm

Specifications:

The objective of this assignment is to create a program that will read 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 from 2 to 100. 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.

Design:

Create a BYTE array with the label ‘input’. This array may be of any length between 2 and 100.

Create a BYTE array with the label ‘output’. This array should be the same length as ‘input’.

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’.

Page “1 of “2

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,3,6,0C

shift’ is 3

The proper solution for ‘output’ is 3,6,0C,5,0A

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 ‘3’ is the 3rd value in the ‘input’ array. After a shift of 3, this would take the value ‘3 out of bounds for the ‘output’ array (it is the same length as the ‘input’ array). The value ‘3’ must “wrap around” to the front of the ‘output’ array. This also holds true for ‘6′ and ‘0C’.

Remember that your program must be flexible enough to handle an array of any length. Just because you test it with an array of length 6 does not mean that I will test it with an array of length 6. I could test with an array of length 2 or 100 or any number in between.

Code Documentation:

At the top of your “asm” file, give a brief description of the program, author name and last modified date in the form of comments.

For the code, use your judgment to chose between explaining each line or related group of lines. The purpose of these comments is to make the code readable for other programmers or for you in the future.

Late Submission Penalty:

  • Late submissions will not be accepted and will result in a ZERO without valid excuses, in which case you should talk to Dr. Li to explain your situation.

    • GTA/Instructor will NOT accept any late submission caused by Internet latency or internet issues.

Page “2 of “2

Project #2 Arrays and Loops Solution
$35.00 $29.00