Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions