PROGRAM TO EXCHANGE and swaps the contents in 8086-88 assembly language

 Write a set of instructions in 8086-88 assembly language that swaps the contents of CX and DX registers without using XCHG instruction.

SOLUTION:

1st method

MOV CX,1234H

MOV DX,5678H

PUSH CX

PUSH DX

POP CX

POP DX

Output:


2nd method

MOV CX, 1234H

MOV CX ,4321H

MOV DX,5678H

MOV DX,8765H







Post a Comment

0 Comments