Assembly Programming Language using Visual Studio May be co

Assembly Programming Language using Visual Studio - May be completed in either 32-bit mode or 64-bit mode

Copying a Word Array to a DoubleWord array

Write a program that uses a loop to copy all the elements from an unsigned Word (16-bit) array into an unsigned doubleword (32-bit) array.

Solution

%include \'Function.asm\'

section.data

wordArray dw 0,1,2,3,4,5

length equ $-wordArray

ddArray dd 0,1,2,3,4,5

section .text

global main

main:

mov ebp,esp; for correct debugging

mov esi,wordArray

mov edi,ddArray

mov ecx,)

convert:

movzx ebx,word [esi + ecx *2]

mov [edi+ ecx *4], ebx

inc ecx

cmp ecx, length

jine convert

mov eax, ddArray

call intlineFeed

call exit

Assembly Programming Language using Visual Studio - May be completed in either 32-bit mode or 64-bit mode Copying a Word Array to a DoubleWord array Write a pro

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site