Question: Consider the following main - code fragment and the procedure SumThem: . DATA IntArray WORD 1 0 , 5 , 2 0 , 1 5

Consider the following "main"-code fragment and the procedure "SumThem":
.DATA
IntArray WORD 10,5,20,15,45,10
B WORD 20
C WORD 30. CODE
. CODE
mov ax,@data
mov ax, @d, ax
push IntArray ??????
push Intarray+2
push IntArray ; (4) push 4
push 4 call SumThem ; (5)
add sp,10
mov ah,4ch
int 21h
main ENDP
; (6)
SumThem PROC NEAR
push bp
push bp mov bp,sp
mov Contents of cx :
; Just Before Pass 1: di=
,ax=
,cx=
mov ax,
cmp cx,
; End of Pass 1: di=
, ax:
,cx=
jmp le ExitProc
mov di,6
; End of Pass 2: di=
,ax=
,cx=
Theloop:
add ax,[bp+di] ; End of Pass 3: di=
,ax=
,cx=
add di,2
dec cx
; End of Pass 4: di=
,ax=
,cx=
; End of Pass.
jnz TheLoop
; End of Pass 5: di=
,ax=
,cx=
pop bp ret
SumThem ENDP
(8)
END main
(0)
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
; How many passes were actually made?
 Consider the following "main"-code fragment and the procedure "SumThem": .DATA IntArray

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!