Write a program to transform a 2dimentional array ie swap Ai

Write a program to transform a 2-dimentional array, i.e., swap A[i][j] with A[j][i]. You can assume that the array is known so as the two dimensions, rows and columns. Write a segment of assembly language code to evaluate the following logical expression. Using full order evaluation Using partial order evaluation ~(x=5) && (y!=4) || (x!=y)

Solution

Code 1:

Code 2:

mov ax, X
cmp ax, 5
mov A, ax

mov ax, Y
jg ax, 4
mov B, ax

mov ax, X
mov ax, Y
jg Y, ax

not A
and A, B
or A,Y
mov ax, A
not ax
and ax, 1

 Write a program to transform a 2-dimentional array, i.e., swap A[i][j] with A[j][i]. You can assume that the array is known so as the two dimensions, rows and

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site