You are on page 1of 1

Lab 2

Assembly
This lab was to have a user enter a ten digit array and then rearrange the array based on a predetermined permutation.
The implementation of this was by first having the user enter his array, I added showing the user
array and the permutation array. The program then goes through a loop where exchanges
variables in the array based on the permutation. It then prints the new array to the screen.
The hardest thing for me on this was using a loop equal to 10. It always came out with the wrong
permutation, after wracking my brain for several days, it dawned on me, that the last number

should already be in place so the algorithm should only loop 9 times.


Below is the screenshot from the program running:

You might also like