Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Each part of this problem contains a design with an until loop. Assume that sum references a doubleword in the data segment and that

2. Each part of this problem contains a design with an until loop. Assume that sum references a doubleword in the data segment and that count is in the ECX register. Give a fragment of 80x86 code that implements the design. I need to have this in assembly language (.asm file).

(a) sum := 0;

count := 1;

repeat

add count to sum;

add 1 to count;

until (sum > 5000);

(b) sum := 0;

count := 1;

repeat

add count to sum;

add 1 to count;

until (sum > 5000) or (count = 40) ;

*(c) sum := 0;

count := 1;

repeat

add count to sum;

add 1 to count;

until (sum 5000) and (count > 40);

(d) count := 30;

sum := 50;

repeat

add count to sum;

subtract 1 from count;

until (count = 0) or (sum 400);

(e) count := 30;

sum := 50;

repeat

subtract count from sum;

add 3 to count;

until (count > 50) and (sum 600);

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

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago