Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

assembly language, INCLUDE Irvine32.inc .data array DWORD 3, 5, 8, 7, 13, 19, 17

ID: 3591984 • Letter: A

Question

assembly language,

INCLUDE Irvine32.inc

.data

array DWORD 3, 5, 8, 7, 13, 19, 17, 19

.code

main PROC

mov esi, OFFSET warray

mov ecx, LENGTHOF warray

mov ebx, TYPE warray

  

L1:

Loop l1

call DumpMem ; See the results in Array

call DumpRegs ;display registers

call WaitDec ;display output in decimal form  

call WaitMsg ;will keep window running

exit

main ENDP

end main

Program with a loop use indirect addressing that switches the 1* and 2nd elements of the array. Then does the same for the 3rd and 4th elements. And so on. Your word array is named warray and has the values 3, 5, 8,7,13, 19, 17, 19 in it. Your program is to output the contents of the array output result in decimal One approach is to use this method, but it does not output in decimal mov esi, OFFSET warray mov ecx, LENGTHOF warray mov ebx, TYPE warray call DumpMem : See the results in Array n CLUDE Irvine 32. inc datta wow DwoRo 3, 5,8.7, 93 ,19,17.19 main PRo c mov ecx, LEN GTHOF r 1 osp L1 canter: 82 ecx txis main ENDP ent main 3 58713 19 17 L9 esi suop neses eejc

Explanation / Answer

INCLUDE Irvine32.inc

.data

array DWORD 3, 5, 8, 7, 13, 19, 17, 19

.code

main PROC

mov esi, OFFSET warray

mov ecx, LENGTHOF warray

mov ebx, TYPE warray

  

L1:

Loop l1

call DumpMem ; See the results in Array

call DumpRegs ;display registers

call WaitDec ;display output in decimal form  

call WaitMsg ;will keep window running

exit

main ENDP

end main