Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The aim of program in Figure 2 is to sum the numbers in array marks. However, the program contains errors. include Irvine 32.inc 2 3

image text in transcribed

The aim of program in Figure 2 is to sum the numbers in array marks. However, the program contains errors. include Irvine 32.inc 2 3 .data marks WORD 10,20,30,40,50,60,70,80,90,100 . code main proc mov AX, 0 mov CX, 10 mov ESI, OFFSET marks 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 again: add AX,[ESI] sub ESI,4 inc CX loop again main end exit endp main Figure 2 Debug and execute the program. a. Can the loop in the program be executed properly? [1 mark] b. State the line numbers that are creating the problem. [2 marks] C. Correct the related instructions so the loop can be executed properly. i. attached the correct program code [2 marks] and ii. output from the visual studio [2 marks] The aim of program in Figure 2 is to sum the numbers in array marks. However, the program contains errors. include Irvine 32.inc 2 3 .data marks WORD 10,20,30,40,50,60,70,80,90,100 . code main proc mov AX, 0 mov CX, 10 mov ESI, OFFSET marks 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 again: add AX,[ESI] sub ESI,4 inc CX loop again main end exit endp main Figure 2 Debug and execute the program. a. Can the loop in the program be executed properly? [1 mark] b. State the line numbers that are creating the problem. [2 marks] C. Correct the related instructions so the loop can be executed properly. i. attached the correct program code [2 marks] and ii. output from the visual studio [2 marks]

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

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

Students also viewed these Databases questions

Question

Discuss the techniques of sales forecasting.

Answered: 1 week ago

Question

Write short notes on Marketing mix.

Answered: 1 week ago

Question

Analyse the process of new product of development.

Answered: 1 week ago

Question

how would you have done things differently?

Answered: 1 week ago

Question

3. What information do participants need?

Answered: 1 week ago