Reference no: EM133265768
Create new assembly code file (you can use the template file from lab 1) and paste the following line in the .data segment: array BYTE
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 These lines create new array of bytes called simply "array" with 32 elements, the numbers 0-31. For this lab assignment, you need to create n assembly code program that switches the order of every pair of array elements. In other words, you need to swap the order of 0 and 1, 2 and 3, 4 and 5, etc. When your program is complete the elements of the array should be: 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 21, 20, 23, 22, 25, 24, 27, 26, 29, 28, 31, 30 Your program must perform this task using data transfer instructions and loops. This means: You can't create second array and copy the values over in the correct order. The value switching must happen inside the original array. You can't fake the switching process by just overwriting new values into the array. You must actually switch the order of the existing values. You can't manually code each swap into your program. You must use a loop to perform swaps on the entire array.