Your computer engineering instructor decided to ramp things up a bit (in terms of difficulty, of course) with this next task:
Write a program to find the maximum difference between the ~XOR~ of adjacent elements of a given array.
Given an array ~A~, find the maximum value of ~(A[i] \oplus A[i+1]) - (A[j] \oplus A[j+1])~ for some ~i~ and ~j~, where ~i \neq j~.
Unimpressed by the supposed "challenge", you open up your favourite text editor and begin typing away... in assembly.
The first line of input will contain a single integer ~N~ ~(3 \le N \le 100)~.
The second line of input will contain ~N~ space-separated integers in the range ~[-10^3, 10^3]~, denoting the contents of array ~A~.
The desired integer value as defined by your teacher on a line by itself.
3 3 2 1
We can find the maximum value when ~i = 2~ and ~j = 1~:
$$\displaystyle (A \oplus A) - (A \oplus A) = (2 \oplus 1) - (3 \oplus 2) = 2$$
libc in NASM, the first line of your program should be
; libc. For all others, it should be
; features: libc.