What will be the final value of EAX in this example? mov eax, 0 mov ecx, 10 L1: mov eax, 3 mov ecx, 5 L2: add eax, 5 loop L2 loop L1

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.4: Program Input Using Cin
Problem 9E
icon
Related questions
Topic Video
Question

What will be the final value of EAX in this example?

mov eax, 0

mov ecx, 10

L1:

mov eax, 3

mov ecx, 5

L2:

add eax, 5

loop L2

loop L1

(ii) Write a program that calculates the following expression, using registers:

A = (A + B) − (C + D)

(iii) Write a program that uses a loop to copy all the elements from an unsigned Word

array into an unsigned doubleword array.

(iv) Write a program that displays a string in all possible combinations of foreground

and background colors (16 x 16 =256). The colors are numbered from 0 to 15, so

you can use a nested loop to generate all possible combinations. Also use a delay

of 1s in each foreground color change.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr