Question: Computer Science: Assembly Language for x86 Processors VS 2017 [C++] Swap Values In Array Write an ASM program to swap four DWORD values in an

Computer Science: Assembly Language for x86 Processors

VS 2017 [C++]

Swap Values In Array

Write an ASM program to swap four DWORD values in an array with mov and xchg instructions. Your program should show the following outputs as before and after swapped:

Computer Science: Assembly Language for x86 Processors VS 2017 [C++] Swap Values 
INCLUDE Irvine32.inc .data dwArray DWORD 1000h, 2000h, 3000h, 4000h .code ; Fill the requirement to swap DWORD elements in dwArray SwapValues PROC ; Show original data call Display ; fill here, no more than 5 instructions ; ... ; Show swapped data call Display exit SwapValues ENDP ; A procedure to show dwArray memory by calling DumpMem Display PROC mov esi, offset dwArray mov ebx, type dwArray mov ecx, lengthof dwArray call DumpMem ret Display ENDP END SwapValues 

Dump of offset 004050A0 00001000 00002000 00003000 00004000 Dump of offset 004050A0 00002000 00004000 00001000 00003000 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!