Question: Use the following code as a starting point Create a procedure that uses indirect addressing to calculate the sum of the all the elements of

Use the following code as a starting point
Create a procedure that uses indirect addressing to calculate the sum of the all the elements of the array
INCLUDE Irvine32.inc
INCLUDE macros.inc
.data
array1 WORD 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
array2 WORD 10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160
.code
main PROC
mov ecx, lengthof array1
mov esi, offset array1
call sum
call WriteDec
call CRLF
mov ecx, lengthof array2
mov esi, offset array2
call sum
call WriteDec
call CRLF
exit
main ENDP
; DescriptionLsum up a word array
; Receives:ECX: size ESI: address
; Returns: EAX: sum
; Requirees : n/a
sum PROCUSES ECX Question Blank 1 of 10
mov EAX, Question Blank 2 of 10
Question Blank 3 of 10:
Question Blank 4 of 10 Question Blank 5 of 10, Question Blank 6 of 10ESIQuestion Blank 7 of 10
addQuestion Blank 8 of 10, TYPE Question Blank 9 of 10
Question Blank 10 of 10 TOP
`ret`
sum ENDP
END main

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 Programming Questions!