Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly Language Only 1. Do the following problems: a. The following instruction sequence multiplies the value in EAX by 3. MOV EBX, EAX SHL EAX,

Assembly Language Only

1. Do the following problems:

a. The following instruction sequence multiplies the value in EAX by 3.

MOV EBX, EAX

SHL EAX, 1

ADD EAX, EBX

Write similar fragments of code that use Shift and Add instructions to efficiently multiply by 5, 7, 9 and 10. (32 BIT ONLY)

b. What are the values for EAX, SF, ZF after executing TEST EAX, 0004H, if EAX initially contained FA75H?

c. Write a code fragment to convert from Fahrenheit to a Celsius temperature, using the formula:

C = (5/9) * (F 32).

2. Do the following problems: 32 BIT ONLY

a. Write assembly code, using procedures, to find the sum and average of the values in a given array. Make sure to obey stack discipline.

b. Write assembly code to implement the following pseudo-code:

Count = 0;

Sum = 200;

While ((Count <= 100) or (Sum < 300))

{

Add Count to Sum;

Add 5 to Count;

}

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions

Question

If 0 {«10 [bx + a(1 - x)]t dx}1/t. lim

Answered: 1 week ago

Question

Explain the strength of acid and alkali solutions with examples

Answered: 1 week ago

Question

Introduce and define metals and nonmetals and explain with examples

Answered: 1 week ago

Question

1. Diagnose and solve a transfer of training problem.

Answered: 1 week ago