Copying an Array

Array processing is one of the things that assembly does best! In this project, you will combine techniques such as loops, indirect addressing, the MOV instruction, addition, the OFFSET operator, and the use of the book's link library. Be sure to read all of Chapter 4, as well as pages 137-147 in Chapter 5 before beginning this project.

Specifications:

Copy the following data and constant declarations into your program's data segment:

array DWORD 10h,20h,30h,40h,11h,12h,16h,14h,18h,22h,96h,44h,89h
      DWORD 17h,94h,27h,16h,82h,33h,15h,21h,77h,73h,02h,12h,09h
arrayLen = ($ - array) / 4

Your program will have two sections:

Step 1: Display the array in forward order, in hexadecimal format, with a comma between each number. (You may display a trailing comma after the last number.)

Step 2: Display the array in reverse order, in hexadecimal format, with a comma between each number. (You may display a trailing comma after the last number.)

Turn in a printed listing of your program, and a printout of the screen when the program runs. To print a DOS window, select Edit > Mark from the window's System menu (upper left corner). Drag the mouse over the text you want to print, and press the Enter key. Open up a text editor window and paste the Windows clipboard into the editor. Print the file using the text editor's print command.