Question: ( Assembly Language Programming for the IBM PC and Compatibles x 8 6 ) 6 ) 7 ) 8 ) 9 ) Consider the following

(Assembly Language Programming for the IBM PC and Compatibles x86)6)7)8)9) 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 main PROC mov ax,@data mov ds, ax ; (0 push "\[IntArray\\] push \\[IntArray+21] push \\[IntArray+4\\] push \\[IntArray+6\\] push 4 ; (5) call SumThem add sp,10 ; (9) Also, suppose the ADDRESS of this instruction is 3000h. mov ah,4ch int 21h main ENDP ; (6) Suppose bp value was 4000. SumThem PROC NEAR push bp ; (7) mov bp, sp mov cx,\\[bp+4\\] ; Contents of cx: ; Just Before Pass 1: di=, ax=, CX= mov ax,,0 ; End of Pass 1: di= ax=9 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=1, CX= add di,2 dec cx ; End of Pass 4: di=9 ax=9 CX= ; End of Pass. jnz TheLoop ; End of Pass 5: di= ax=9 CX= pop bp ret ; (8) Sum Them ENDP ; How many passes were actually made? END main Fill in the spaces after each instruction, labeled 0 through 9, is executed. The top of the stack should be on the far right. The bottom of the stack should be on the far left. Separate each value by a space. If there is nothing in the stack, write Empty. Also fill in values in the spaces above. If there is no value to be filled in, write None. (0)(1)(2)(3)(4)(5)

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!