Question

Multiply eax by 26, using shifting and addition instructions. Note: To test your program, you can...

  1. Multiply eax by 26, using shifting and addition instructions.

Note: To test your program, you can set eax to any integer, say, 2. Of course, your code must work even if eax is initialized to another integer.

  1. Pack April 15, 2016 into dx   

Note:

  1. Define 3 locations day, month, year and initialize them to 15, 4, an 16 respectively (April 15, 2016).
  2. Your code packs the values in day, month, year into dx.
  3. Your code must work if locations day, month, year are initialized to other values.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) if eax=2

eax*26=eax+eax+eax+....26 times

   =2+2+2+...….26 times

   =52

This will work even if eax is initialized to some other integer. Say, if eax=3

eax*26=eax+eax+eax+....26 times

   =3+3+3+...….26 times

   =78

2) Pack April 15, 2016 into dx

  1. Define 3 locations day, month, year and initialize them to 15, 4, an 16 respectively (April 15, 2016).    day=15 month=4 year=16
  2. Your code packs the values in day, month, year into dx.    dx=April 15, 2016
  3. Your code must work if locations day, month, year are initialized to other values.    if day=28 month=7 year=19 then dx=July 28, 2019
Add a comment
Know the answer?
Add Answer to:
Multiply eax by 26, using shifting and addition instructions. Note: To test your program, you can...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PROJECT 3 INSTRUCTIONS Based on Brase & Brase : sections 6.1-6.3 Note that you must do this Visit...

    continuation to previous question PROJECT 3 INSTRUCTIONS Based on Brase & Brase : sections 6.1-6.3 Note that you must do this Visit the NASDAQ historical prices weblink. First, set the date range to be for exactly 1 year ending on that says "Download Data" to save the file project on your to your computer This project will only use the Close values. Assume that the closing prices of the stock form a normally distributed data set. This means that you...

  •    Lab/HW 3   Write a program that reads in the following data, all entered on one...

       Lab/HW 3   Write a program that reads in the following data, all entered on one line with at least one space separating them: a) an integer representing a month b) an integer representing the day of the month c) an integer representing a year 1. Check that the month is between 1 and 12. If it’s not print an error message. 2. Day cannot be 0 or less nor can it be more than 31 for all months. Print...

  • Hi any help is appreciated! I am using C++. The Julian Day Number (JDN) is a...

    Hi any help is appreciated! I am using C++. The Julian Day Number (JDN) is a sequential count of days since the beginning of the Julian Period. Day number zero corresponds to 1 January 4713 BCE. As a result of calendar reform in the 16th Century, we will only be computing day numbers since 15 October 1582 (which was the first day of the modern Gregorian calendar, having day number 2299161). 1 January 2001 was day number 2451911. To compute...

  • Instructions: Consider the following C++ program. At the top you can see the interface for the...

    Instructions: Consider the following C++ program. At the top you can see the interface for the Student class. Below this is the implementation of the Student class methods. Finally, we have a very small main program. #include <string> #include <fstream> #include <iostream> using namespace std; class Student { public: Student(); Student(const Student & student); ~Student(); void Set(const int uaid, const string name, const float gpa); void Get(int & uaid, string & name, float & gpa) const; void Print() const; void...

  • Need help writing beginner C# program, I will make sure to provide feedback to whoever can...

    Need help writing beginner C# program, I will make sure to provide feedback to whoever can help me figure it out! No public or global variables should be used. You need to consider passing arguments between the methods according to the ways described in the lecture. i.e. all variables should be declared inside the methods and passed to other methods by value/ref/out as needed Description: We want to design a Date class to represent a date using three integer numbers...

  • General Requirements: • You should create your programs with good programming style and form using proper blank spaces, indentation and braces to make your code easy to read and understand; • You sho...

    General Requirements: • You should create your programs with good programming style and form using proper blank spaces, indentation and braces to make your code easy to read and understand; • You should create identifiers with sensible names; • You should make comments to describe your code segments where they are necessary for readers to understand what your code intends to achieve. • Logical structures and statements are properly used for specific purposes. Objectives This assignment requires you to write...

  • employees.txt Instructions You will be using Eclipse for all assignments in this course. You can download...

    employees.txt Instructions You will be using Eclipse for all assignments in this course. You can download Eclipse from the Virtual Desktop. Please write a Java program that follows the instructions below. There are two files to download. AvaCam Inc. is interested in the electronic computation of their payroll. They have reached out, and you have agreed to write a program to help them. They have sent you the file employees.txt (right-click to download the file). Store this file in the...

  • The menu Here is what the menu should look like when running your program:                              &nbsp

    The menu Here is what the menu should look like when running your program:                                         ***********************************                                         *         FUN MENU             *                                         ***********************************                                                 <S>um of natural integers                                                 <L>eap year check                                                 <C>ount vowels                                                 <E>xit Menu tasks Sum of natural integers ask users to enter an integer (n), then use for loop to compute the sum of the first n integers and finally display the result. If users enter negative integer display an error message. Leap year check...

  • In this exam, you will design and implement a Python class called 'Date according to the...

    In this exam, you will design and implement a Python class called 'Date according to the following API specifications. • Do NOT use any existing classes in your answer such as datetime. . You will design your class so that it operates correctly on another planet, where the total days in a year, total days in a month, and months per year may be different. For our planet Earth, you will assume that a year has 360 days and all...

  • Your company needs you to create a program that estimates the amount of various supplies you need...

    Your company needs you to create a program that estimates the amount of various supplies you need for a month based on past sales performance. This way the warehouse can be better prepared for your monthly stock requests. When your program runs, it will first ask you how many clients you have active for the month. Based on the number you provide, it will then perform calculations to estimate how many units of each product you need for the month....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT