logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
John GuthrieResume writing
(5/5)

859 Answers

Hire Me
expert
Alexis JiangEducation
(5/5)

990 Answers

Hire Me
expert
Rishi AggarwalGeneral article writing
(5/5)

725 Answers

Hire Me
expert
Nathaniel KellyComputer science
(5/5)

524 Answers

Hire Me
Assembly Programming

two arrays in your program which need their contents added together. While doing the additions, you also need to reverse the order of the summed numbers.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Project - Chapter 4: Arrays/Loops

Possible Points: 40

There are two arrays in your program which need their contents added together. While doing the additions, you also need to reverse the order of the summed numbers.

 

This is a 64-bit Application Only!

  1. Create a Linux-based assembler language program (NASM) which:

    1. Define/Reserve some data/arrays, be sure that your arrays contain these EXACT They will be used during testing of your application(s):

      1. Define three arrays, each of which contains single byte values (name these EXACTLY as shown):

        • Array1 contains (unsigned): 10h, 30h, F0h, 20h, 50h, 12h

        • Array2 contains (unsigned): E0h, 40h, 22h, E5h, 40h, 55h

        • Array3 contains (unsigned): Uninitialized

      2. Reserve an array of six bytes called Array3. This should be done in the bss section, not the data section

      3. Define another array which contains double word values: Array4 contains (unsigned): 11BDh, 3453h, 2FF0h, 6370h, 3350h, 1025h

      4. Define another array which contains quad word values: Array5 contains (unsigned): FFFh, C3Fh, 22FFh, EF53h, 400h, 5555h

      5. Reserve an array of six quad words called Array6. This should be done in the bss section, not the data section

    2. Using the loop statement, add the contents of our Byte Array1 and Array2, and store each value into Array3. Array1 and Array2’s values should not change. Use indirect operands to traverse the Use the rsi register as your indirect position register

  • DO NOT use the movsx or movzx statements

•    Put the summed values in ‘reverse’ order in the third array. Example: 10h

+ E0h (first positions in Array1 and array2) should go into the 6th position of the third array.

  1. Using the loop statement, add the contents of our Double Word Array4 to Array 5, store each value into Array6. Array4 and Array5’s values should not

Use indexed operands to traverse the array.

  • DO NOT use the movsx or movzx statements

•    Put the summed values in ‘forward’ order in the sixth array. Example: 11BDh + 0FFFh (first positions in Array4 and Array5) should go into the 1st position of Array6.

  1. Using our functions library, print out the contents of Array3 and Array6 after all of the additions for all arrays are

 

  1. Separate each number with a “, “ to make them easy to read

  2. Add a new line after printing

  3. Label each print. Example: “Contents of Array3 is: xx, xx, xx, xx”

  4. You are only allowed to use the following functions from the Linux function library:

    • Printendl

    • PrintString, PrintText

    • Print64bitNumHex

    • PrintComma

  5. Do this on Windows as well using the Irvine libraries (64-bit as well)

    1. Zip these in separate files and submit them to Canvas. Make sure the .zip file for the Linux project contains the word Linux, and the .zip file for the Windows project contains the word Windows

    2. You are only allowed to use the following functions from the Irvine function library:

      • Crlf

      • WriteString

      • WriteHex64

    3. Note: YOU ARE NOT ALLOWED to use any stack operations in this project! (Do I need to say it again?)

Assumptions

Here are some of the things I assume you know how to do attending class and reading the text(s).

 

  • You understand how to write, assemble and link both a Linux assembly language program and a Windows assembly language

 

  • You understand how to use the Linux and Windows (Irvine) functions for printing data to the console

 

  • You have attended class and read the text and understand all of the data types which you can define within an assembly language program

 

  • You understand how to create an array in assembly language

 

  • You understand how to add two values together using register addition

 

  • You understand how to access single array values and place them into a register using indirect means using a register (rsi/rdi to be specific)

 

  • You understand how to move a value into an array from a register (after the addition) using the indirect means using a register (rsi/rdi to be specific)

 

  • You understand how to use the LOOP statement in assembly language

 

  • You understand how to create a 64-bit linux and windows applications

 

Data to be Used

  • Just what you define in your

Hints/Tips

  • Take a look at the Chapter 4 presentation. EVERYTHING you need is in there. Chapter 5, section 5.5 discusses the Irvine libraries for 64-bit programming

 

  • If you use the Irvine 64 function Write64Hex on Windows, you will want to execute it in the way shown The reason for this is because the Write64Hex function destroys the rcx register and doesn’t restore it (bad Kip Irvine!). The WriteInt64 seems to not have this problem

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme